Hi,
I've taken a break from C++ for years and have gotten curious again.
i'm trying to edit the [url=http://www.lifeorange.com/SOFTWARE/audiocpptutorial.html]AM FM MIDI Example[/url] over at www.lifeorange.com. I'm guessing I'll need a for loop but I've forgotten to syntax needed to put an array of anything into string form and into something like a label.
I'm to replace:
//FYI juce::MidiInput* midiInput midiInput = MidiInput::openDevice(MidiInput::getDefaultDeviceIndex(), this); std::cout<< "midi dev index = " << MidiInput::getDefaultDeviceIndex();
with this: (updated code)
controlChange = false; textEditor1.setMultiLine(true, true); //textEditor1.setReadOnly(true); textEditor1.setCaretVisible(true); textEditor1.setScrollbarsShown(true); textEditor1.setColour(TextEditor::outlineColourId, Colours::black); textEditor1.setColour(TextEditor::backgroundColourId, Colours::limegreen); addAndMakeVisible(&textEditor1); textEditor1.setSize(400, 200); const int devices = midiInput->getDevices().size(); std::vector myMidiDevices(devices); for (int j = 0; j < devices; j++) { textEditor1.insertTextAtCaret(String(myMidiDevices[j])); textEditor1.moveCaretDown(true); }
I know that this is horribly wrong. I've tried other things, can't seem to get it right. Could someone please help?
Malik