helio-sequencer icon indicating copy to clipboard operation
helio-sequencer copied to clipboard

Possible To Add JUCE MidiKeyboard Component to use with Piano Roll

Open titus-shoats opened this issue 1 year ago • 1 comments

Hello I would like to know if someone can point me in the right direction on adding JUCE MidiKeyboard Component to use with Helio's Piano Roll? I know its possible. I've built Helio from source, and from looking through the code I'm assuming I would need to use Helio's "Synthesizer" class in DefaultSynth.cpp to route all midi through the juce midi keyboard component. But I'm not to sure how I would then add JUCE MidiKeyboardComponent . Im not sure which of Helio's GUI components I would need to also modify to add the juce midi keyboard component to.

Would anyone be able to help me with this?

Thanks so much

titus-shoats avatar Mar 06 '23 23:03 titus-shoats

I would like to know if someone can point me in the right direction on adding JUCE MidiKeyboard Component to use with Helio's Piano Roll?

You can take a look at how JUCE's AudioPluginHost example works with MidiKeyboardComponent: to send notes which are clicked on in the keyboard to instrument(s) of your choice, you maintain a MidiKeyboardState object, and register a specific MidiMessageCollector as it's listener. The list of all instruments is available in Helio's AudioCore class, and the access to instrument's message collector would look like instrument->getProcessorPlayer().getMidiMessageCollector(). Hope it helps.

Im not sure which of Helio's GUI components I would need to also modify to add the juce midi keyboard component to.

I guess it would be somewhere around SequencerLayout class or one of its children, like piano roll, but it totally depends on what you want to do.

peterrudenko avatar Mar 07 '23 11:03 peterrudenko