I'm trying to build a MIDI learn class to assign CCs to several sliders.
The problem is that the MIDI buffer is always empty when I use it on effect plugins. I also tried the example from the tutorial:
MidiBuffer processedMidi;
int time;
MidiMessage m;
for (MidiBuffer::Iterator i (midiMessages); i.getNextEvent (m, time);)
{
if (m.isNoteOn())
{
DBG(m.getNoteNumber())
}
else if (m.isNoteOff())
{
}
else if (m.isAftertouch())
{
}
else if (m.isPitchWheel())
{
}
processedMidi.addEvent (m, time);
}
This doesn't work on effect plugin even if I enable the "Plugin wants MIDI input" option from Introjucer.
However it does work if I compile a synth.
What am I doing wrong? What's the best way for adding MIDI learn capability to my controls?
