X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fmidi_device.h;h=498443931ab368ba931d2ead88192a969a27b116;hb=beead04c23b42c815f448cd0126d87f9627bbfde;hp=3c1e6b2f4e63bf1cd4390329c037630d4748dc9f;hpb=9c29ca89b638194f5771c22fadf6bf490d4595a3;p=nageru diff --git a/shared/midi_device.h b/shared/midi_device.h index 3c1e6b2..4984439 100644 --- a/shared/midi_device.h +++ b/shared/midi_device.h @@ -16,6 +16,11 @@ typedef struct _snd_seq snd_seq_t; class MIDIReceiver { public: + // Pitch bend events are received as a virtual controller with + // range -8192..8191 instead of 0..127 (but see the comment + // in map_controller_to_float() in midi_mapper.cpp). + static constexpr int PITCH_BEND_CONTROLLER = 128; + virtual ~MIDIReceiver() {} virtual void controller_received(int controller, int value) = 0; virtual void note_on_received(int note) = 0;