I was going through the JUCE tutorial “Build a MIDI synthesizer,” and I came across something under the sections titled “Providing a MIDI input to the SynthAudioSource” and “Listing MIDI inputs,” respectively. There’s a part of the former section that says:
“In our MainContentComponent class we’ll add this MidiMessageCollector object as a MidiInputCallback object to our application’s AudioDeviceManager object.”
In the latter section, it says
“Notice that we add the MidiMessageCollector object from our SynthAudioSource object as a MidiInputCallback object [12] for the specified MIDI input device. We also need to remove the previous MidiInputCallback object for the previously selected MIDI input device if the user changes the selected device using the combo-box [13].”
Since the tutorial doesn’t seem to indicate how to format those two instructions in the specific code and the links to the objects like MidiMessageCollector and MidiInputCallback show several functions and ways of formatting for coding, I don’t know how or where I’m supposed to add and remove the MidiInputCallback objects suitable for these sections or the particular parts of the coding (in the .h file attached to the ZIP file for the tutorial’s demo project). What should I do, or how/where should I format it?
