I cannot get any Pitch Wheel output from my Midi Effect VST 3 using JUCE. I attempt to add the pitchWheel message upon any input Midi Message, using a similar way according to the “Modifying MIDI Notes” section according to the official JUCE tutorial.
The test code below should create a random midi note, along with a random pitch bend value, upon every incoming message. Upon running this in Ableton and Bitwig, both creates the cluster of midi on messages, each with random velocities. Though, absolutely no pitch messages.
void XenMidiRetunerAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
{
buffer.clear();
MidiBuffer processedMidi;
int time;
MidiMessage m;
for (MidiBuffer::Iterator i (midiMessages); i.getNextEvent (m, time);)
{
// No pitch messages outputted?!?
processedMidi.addEvent(MidiMessage::pitchWheel(m.getChannel(), random(0,16383)), time);
// Note messages clearly are present
processedMidi.addEvent(MidiMessage::noteOn(m.getChannel(), random(0,100), (uint8)random(0,100)), time);
}
midiMessages.swapWith(processedMidi);
}
No pitch data is also present when sending out an event with a constant value.
Is there something I’m missing?