Question about keyboardstate etc

I have a plugin that will take input from my host’s piano roll and process it accordingly. All I do in my process block is assign the incoming midi to my own MIDI buffer that then gets professed in a different callback function. I want to add a keyboard component and I’m not sure I’ve followed the correct steps. It’s working but I’m getting no note offs when I click on a key and slide to another key before releasing. I set up a MidiKeyboardStateListener but I’m not sure I needed to that. I call midiKeyboard = new MidiKeyboardComponent(filter->keyboardState, MidiKeyboardComponent::horizontalKeyboard); in my filter constructor, should this be enough to have my note presses sent to the filters processing block? Apart that is from creating the keyboardState object? Do I need a keyboard listener?

in your process block, feed your midikeyboardstate with the MidiBuffer you get from the host, this will add events from the gui and/or update your midikeyboardcomponent to show what notes are comming in.

Thanks Atom, that works and it’s much simpler than how I was doing it, and it also addressed the problem of the noteoff’s not coming through.