VST not accepting midi messages from Live 8.2.7


#1

my VST seems to not accept midi messages from my Oxygen midi keyboard or pc keyboard when used in Live (8.2.7)? The keyboard on the VST does not respond or light any keys as well.

Here’s the code inside the getNextAudioBlock function

    void SynthAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill)
    {
        // the synth always adds its output to the audio buffer, so we have to clear it
        // first..
        bufferToFill.clearActiveBufferRegion();

        // fill a midi buffer with incoming messages from the midi input.
        MidiBuffer incomingMidi;
        midiCollector.removeNextBlockOfMessages (incomingMidi, bufferToFill.numSamples);

		if (!incomingMidi.isEmpty()) {
			printf("works");  //<----------------------never gets in here
		}

        // pass these messages to the keyboard state so that it can update the component
        // to show on-screen which keys are being pressed on the physical midi keyboard.
        // This call will also add midi messages to the buffer which were generated by
        // the mouse-clicking on the on-screen keyboard.
        keyboardState.processNextMidiBuffer (incomingMidi, 0, bufferToFill.numSamples, true);

        // and now get the synth to process the midi events and generate its output.
        synth.renderNextBlock (*bufferToFill.buffer, incomingMidi, 0, bufferToFill.numSamples);
    }

Is there something i am missing to get my VST to work with ableton?

Heres part of my jucePluginCharacteristics.h as well

#define JucePlugin_MaxNumInputChannels  2
#define JucePlugin_MaxNumOutputChannels 2
#define JucePlugin_PreferredChannelConfigurations   {1, 1}, {2, 2}
#define JucePlugin_IsSynth              1
#define JucePlugin_WantsMidiInput       1
#define JucePlugin_ProducesMidiOutput   0
#define JucePlugin_SilenceInProducesSilenceOut  1
#define JucePlugin_TailLengthSeconds    0
#define JucePlugin_EditorRequiresKeyboardFocus  1

Thanks,
Aaron


#2

The MIDI IN happens in the processBlock of the AudioProcessor class processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages), there you receive the MIDI messages and you can add your own to send to the host. SynthAudioSource::getNextAudioBlock is not the place for MIDI processing i don’t know why are you doing it there


#3

Perfect i’ve gotten the midi mapping to my synth correctly thanks!

I’m still a super noob when it comes to VST’s/juce but i’m finding the people on these forums super helpful and quick to respond!

Aaron