Im trying to write a simple application that can prompt the midi-in data from my hardware synth; later I hope to succeed
in designing my own softsynth - when that time comes I think that Jules Demo application will help me but currently
I’m focused on prompting the midi data.
Right now, I have modified the juce application project (hello world window with a quit-button). I have added another button
that when pressed opens the sound manager window (sound configuration)…here I can see that my midi port has been found.
Also, I have included a text editor for prompting the midi values I hope to be able to recieve. So far so good!
Now, I have defined another class containing the following three variables:
MidiMessageCollector midiCollector; Synthesiser synth; MidiBuffer incomingMidi;
along with the following three member functions:
void prepareToPlay (int samplesPerBlockExpected,
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill)
// the synth always adds its output to the audio buffer, so we have to clear it
// fill a midi buffer with incoming messages from the midi input. midiCollector.removeNextBlockOfMessages (incomingMidi, bufferToFill.numSamples); // and now get the synth to process the midi events and generate its output. synth.renderNextBlock (*bufferToFill.buffer, incomingMidi, 0, bufferToFill.numSamples); }
This class I have instantiated in the Main Component.h file but I can’t work out how to extract the midi data from the
midibuffer variable in the class described above and have data prompted in the text editor. I’m far from a skilled programmer
so please bare over with my primitive terminology and if this is trivial.
Can some one please describe what I need to do to get this done?