Hi this is my first topic on a forum, please excuse any bloomers
The problem is when I use MidiMessage::createSysExMessage() to send a SYS EX message, nothing is sent
If it try MIDI output using MidiMessage::noteOn() it works fine !
I have debugged into the code and can see the createSysExMessage constructs the SYS_EX packet Ok
the SYS EX MIDI output using MidiMessage::MidiMessage() was previously working but mysteriously stopped some weeks ago when I was not looking ! (several weeks ago I updated from 3.1.1 to Juce 3.2.0 but I cannot tell if this had any relation to when the fault occurred.)
1) can you spot what I am doing wrong ?
2) can you point me to an example of MIDI sysex output ?
3) I would prefer to use MidiMessage::MidiMessage() to send raw MIDI data (which was previously working)
I have been trying to get this going for 4 days now and it's starting to drive me potty
Please can you help me.
I have written in C for several years and wrote my first MIDI sequencer in 1983
but this is my first C++ project and I am using the excellent Juce framework 3.2.0 for the first time
My PC AMD w 16Gb RAM, I am using savihost3x64_1v42 http://www.hermannseib.com/english/savihost.htm to host my VST3 x64 plugin
It is receiving MIDI commands from the USB device and The Juce keyboard works Ok outputting notes to my USB MIDI device
//----------------------------------------------------------------- // This is served every Audio block (few 100 us) for PlugInProcessor void GgPuAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) { const int numSamples = buffer.getNumSamples(); keyboardState.processNextMidiBuffer (midiMessages, 0, numSamples, true); processGuitarMidiBuffer(midiMessages); // Pass any incoming midi messages to Guitar neck display & Replace MIDI Output messages } //--------------------------------------------------------------------------- void processGuitarMidiBuffer (MidiBuffer& midiMessages) { MidiMessage midiMess; MidiBuffer::Iterator iIter (midiMessages); MidiBuffer processedMidi; MidiMessage message (0xf4, 0.0); // I do not know why this is req'd int time = 0; //------------------------------------------------ // MIDI Input while (iIter.getNextEvent (message, time)) { processMidiRxEvent (message, time); // Service all MIDI Rx Input events } //-------------------------------------------------------------------------------------- // MIDI Outut - message to test MIDI output SYS EX send byte *pMessTest; pMessTest = new byte[16]; // test buffer *(pMessTest + 0) = MIDI_SYS_EX; // 0xF0 (will be prepended by createSysExMessage) *(pMessTest + 1) = 0x1A; *(pMessTest + 2) = 0x2A; *(pMessTest + 5) = MIDI_SYS_EX_END; // 0x7F (will be appended by createSysExMessage) // Referenced by MidiEventList::toMidiBuffer(). //----------------------------------------- // The data passed to createSysExMessage() in is wrapped with header and tail bytes of 0xf0 and 0xf7. OK // midiMess = MidiMessage::MidiMessage(pMessTest, 4, 0.0f); // This test does not send any MIDI message midiMess = MidiMessage::createSysExMessage(pMessTest + 1, 2); // This test does not send any MIDI message //----------------------------------------- // midiMess = MidiMessage::noteOn(5, 127, 1.0f); // this sends MIDI message OK to host //----------------------------------------- processedMidi.addEvent (midiMess, time); } //---------------------------------------------------------------------------