hi hat controller

Hello all, I’m trying write the code for a hi hat controller, I’m using a teensy 3.6 board and the pedal uses a FSR (force sensitive resistor).

The pedal itself triggers 2 different midi notes.
pedal tapped down triggers note #58 (hh chick)
tapped down but quickly released triggers note #59 (hh splash)

The pedal also controls which one of 3 notes is played on pad #4
pedal up note #60 (open hh)
half way note #61 (half open hh)
pedal down NOTE #62 (closed hh)

Is this a good basic outline as to how to start writing this?

if value of FSR goes below threshold and stays for ? milliseconds play note #58
if value of FSR goes below threshold and stays for ? milliseconds play note #59

if value of FSR > ? PAD #4 plays note #60
if value of FSR > ? but? < pad #4 plays note #61
if value of FSR < ? pad #4 plays note #62

Yes it is for a drum controller, I have the pads working and now need to get the pedal to work.

I'm looking for help with the code

Is this a good basic outline as to how to start writing this?

It is fine, but don't use delay().

If you want someone to write code for you, post in the Gigs & Collaborations sections. You may be expected to pay.

If you want help, post the code you have (using code tags) and explain what should happen and what happens instead.