Showing generated notes in MidiKeyboardComponent

Hello!
I’m new to Juce. It’s fun and exciting.

I’m writing a simple power chord player and trying to use the MidiKeyboardComponent for visual feedback. I’m modifying single key press into a chord in processBlock. I would like some help with sending the generated notes to the MidiKeyboardComponent.

Thanks in advance,
Kal

I figured it out!

I had to write my keyboard implementation (very basic) with Timer and MidiMessageCollector. I build the midi events in processBlock and add it to the collector and on the timerCallback, I do a repaint where I get the data from the collector using the removeNextBlockOfMessages method.

Thanks,
Kal

1 Like