| 697 | |
| 698 | #if DISTRHO_PLUGIN_WANT_MIDI_INPUT |
| 699 | void sendNote(const uint8_t channel, const uint8_t note, const uint8_t velocity) |
| 700 | { |
| 701 | uint8_t midiData[3]; |
| 702 | midiData[0] = (velocity != 0 ? 0x90 : 0x80) | channel; |
| 703 | midiData[1] = note; |
| 704 | midiData[2] = velocity; |
| 705 | fNotesRingBuffer.writeCustomData(midiData, 3); |
| 706 | fNotesRingBuffer.commitWrite(); |
| 707 | } |
| 708 | |
| 709 | static void sendNoteCallback(void* const ptr, const uint8_t channel, const uint8_t note, const uint8_t velocity) |
| 710 | { |