0

I'm working on a Raspberry Pi project at the moment and I'm searching for a possibility to play a note as long as ey press a button (connected with gpio). I use pyFluidsynth and got it working but it's note holding a note as long as i press a button, it repeats it really fast but to slow not to hear it.

Is there any control I don't know? I'm just using noteon and noteoff, is there maybe something like "notehold"?

thanks!

  • In MIDI if you send a note on message it stays on until you send a note off. Maybe you are sending a note on every time you check the state of the button? If so, you shouldn't, send the note on/note off only when the button state changes. – Matteo Italia Mar 16 '14 at 10:37
  • You are right. I've done it this way, now it works as I want it to (and also got less complicated). Thanks a lot! –  Mar 16 '14 at 16:59
  • I'll move my comment to an answer then :) – Matteo Italia Mar 17 '14 at 07:55

1 Answers1

1

In MIDI if you send a note on message it stays on until you send a note off. Maybe you are sending a note on every time you check the state of the button? If so, you shouldn't, send the note on/note off only when the button state changes.

Matteo Italia
  • 123,740
  • 17
  • 206
  • 299