I have a Hauptwerk virtual organ running on my Macbook Pro successfully controlled by MidiDesigner Pro (MDP) on my iPad. I am able to use MidiFire to connect a Teensy Midi to control MDP. Now I want to route a 39 byte SysEx message from the organ to the Teensy. My connection to the organ is through the Audio Midi Setup as follows: Midi Network Setup
My Sessions: Session 1
Directory: iPad (2)
Participants: iPad (2)
Live Routings: Network Session 1 to Network
Network Session 1 from Network
(Other possible choices): Teensy Midi
When I generate the SysEx at the organ, I see the SysEx message from Session 1 on Midi Monitor, but I don't see it in Midifire. I tried connecting the Network Session 1 to Teensy Midi. That works for Midi generated on the iPad, but there are no events triggered by the organ.
1. How do I connect the organ to send Midi Signals to the Teensy? 2. Can I use MidiFire to only send the 39 byte Sysex to Teensy? There are many other Midi Messages being generated simultaneously by the organ and the iPad that I need to filter out.
My scene - The lower connection works fine. Midi Messages from Teensy are correctly routed to the iPad. I want to see a 39 byte SysEx and other Midi messages from the virtual organ to Teensy, but only see messages from the iPad via Network Session 1 in the upper connection.
1. You need to configure the Hauptwerk organ to send MIDI to the 'MidiFire' port and then in MidiFire, your bottom connection should be:
MidiFire -> Event Monitor -> Teensy MIDI
2. When you have the Hauptwerk sending MIDI to Teensy (remember all of this is taking place on the mac, so you do not need to use the Network port) then you can replace that Event Monitor (or add it extra inline) with a StreamByter module and configure it to filter out everything except sysex as follows:
# block non-sysex if M0 != F0 block end
Now, if you need to filter out other sysex messages (the above just filters out non-sysex) then we need to see the 39 byte message and examine it to find out a 'signature' that makes it unique and update the StreamByter rules accordingly.
How do I configure the organ to connect to MidiFire? The organ Input and Output Midi Ports only show Network Session 1 and Teensy Midi, which I check both. What I observe using Midi Monitor on my MacBook is that the organ responds to message From Session 1 (inputs from my iPad) and outputs responses To Session 1, including the specific 39 byte SysEx I want to send to Teensy. My MidiFire Sources and Destinations are Network Session1, MidiFire, and Teensy MIDI. Nothing indicates the organ specifically.
I have 3 configurations in my scene: MidiFire to Teensy; Network Session 1 to Teensy; and Network Session 1 to MidiFire. All have Event Monitors. None respond to the organ generating midi messages to Network Session 1 as observed in Midi Monitor. Network Session 1 outputs to both Teensy and MidiFire when the iPad triggers the same button on the organ (but not MidiFire to Teensy configuration). But the 39 Byte SysEx and any other organ output is not routed to MidFire or Teensy.
OK, so it would seem that Hauptwerk only supports physical and network midi (not virtual), so we need to create a loopback network session and use that to shunt events between Hauptwerk and Midifire:
- Bring up the 'MIDI Network Setup' from the 'Audio and MIDI Utility' - Use the '+' button to add a new session (my Sessions) - Rename this Session to 'Loopback' so it is easy to distinguish - Check the session to enable it and click on it. - Note the port number shown on right (on my machine it was 5006)
Now, use the '+' button below to add a machine to the 'Directory'
- In the 'Name' field put something like 'my loopback' - In the 'Host' field put 'localhost' (important) - In the 'Port' field put the port number from above (5006 in my case) - Press 'OK', select the Directory entry you just created and press the 'Connect' button.
If all is well you will have created a loopback session that we can use to interconnect Hauptwerk to MidiFire
- In Hauptwerk, configure it to send events to 'Loopback'
- In MidiFire, your bottom chain of modules should be:
Loopback did not work. I am getting frustrated. I monitor midi messages using Midi Monitor and at Teensy input using Teensy's Serial Monitor. I am able to receive midi at Teensy generated by my iPad and a keyboard, but not the organ. MidiFire responds to output from the iPad and the keyboard, but not the organ.
I configure the organ Midi Output Ports to Session 1, the Keyboard, and Teensy Midi. The only output from the organ observed on Midi Monitor is to Session 1, which is not received by MidiFire.
So while I successfully route midi from my iPad to Teensy using MidiFire, I can't route from the organ. It's as if the organ ignores any output port selection except Session 1.
If you tell hauptwerk to send to teensy directly (no midifre involved) - does that work at all?
I believe getting the loopback to work is going to be your only option (although you could connect the teensy to the ipad and do it that way?). In the picture above the loopback port is transparent - that means it is not connected. Can you upload a screenshot of the network midi panel of audio/midi utility?
Once you have the loopback session setup and hauptwerk setup to send to it, MidiFire should be able to see it.
Even when I activate Loopback, it only works with my iPad. No response when I select the equivalent button from the organ. I try to activate Teensy from the organ Midi Port Output, nothing appears at the Teensy input nor at Midi Monitor. I was able to set the organ to use the test button and did receive the message in Teensy and Midi Monitor, but not in MidiFire nor pressing the button outside of test. Strange behavior. I am attaching a screenshot. The leftmost window is the readout from Teensy. One Test: send 'on' from the organ Setup created 2 Teensy messages. The window to the upper right is Midi Monitor, which does show 2 messages To Teensy Midi. Lower right is my Midi Network Setup. For Session 1 I have the iPad (2) as a Participant at Port 5006. I tried all sorts of combinations.
Maybe there is a way to do what I want in the iPad? I have the Stream Byter Plugin to MidiDesigner Pro but have never used it. I know the 39 byte SysEx message is appearing at the MDP input. Can I use the Plugin to route the SysEx to one or more buttons or pickers in MDP and all other midi messages are received by all other MDP buttons that are set to Midi Receive? Alternately, detect and output the 39 byte message and route it to teensy for decoding the individual bytes?
There are 2 functions I am trying to implement with the Teensy (probably need 2 Teensy's).
1. Use external pushbuttons to generate midi messages that can be received by the organ. I have this working using MidFire connecting Teensy to Network Session 1. 2. Decode bytes 20, 21, and 22 of the 39 byte SysEx message from the organ. I modified a Teensy Sketch that sends the data to a Display and initially added print statements to monitor the input. That part works fine for messages from the iPad, but not from the organ.
I don't know hauptwerk at all but in that screenshot you posted, right above the output port dropdown is another dropdown with the words: 'Auto MIDI Output (match to primary input settings)'
Maybe this setting is completely overriding the output port selections? The fact that it won't output to anything except network session 1 and that is what I assume you are using as your 'primary' input makes me suspicious. What other options are in that dropdown menu?
If MDP is seeing the 39 byte sysex you should be able to use the StreamByter inside MDP to remap that sysex to a CC to send to an MDP control depending upon the values (presumably) of bytes 20-22.
The StreamByter Plugin in MDP is a bit old, but you would need code similar to:
# match first 4 bytes of sysex message IF M0 == F0 12 34 56 # if byte 20 is 16 send a CC IF M14 == 10 SND B0 32 01 END # block the sysex XX = XX +B END
The screenshot shows the results of my clicking the Test send on with <all enabled ports> selected. I show the other choices I could select.
What I tried is to activate the IAC Driver in Midi Studio and set IAC as an Output in the organ. I could set it in MidiFire and it responded and routed messages to Teensy. It routes CC messages and 5 byte SysEx messages. But IAC does not route the 39 byte SysEx message, which is routed only to Session 1. Is there a way to trigger Session 1 to output to Teensy in MidiFire?
In the screenshot, only IAC responds and the connection to Teensy functions properly. The StreamByter only allows SysEx messages to pass through.
I tried Teensy selected in the organ Output Ports. But again, I can only send SysEx to Teensy using the test function. Using the normal buttons only outputs to Session 1.
To use the StreamByter plugin, I would need to detect the 39 byte message and output it to Teensy. Is that possible?
Clearly Hauptwerk is not sending data to where we want. Either it is not configured correctly or it is not working.
In my previous post I asked about the very top dropdown menu labelled as 'Output' that specifically says 'Auto MIDI Output (match to primary input settings)'. What other options are available in this dropdown menu? To me, that option suggests that Hauptwerk may only send output to the 'primary' MIDI port, which I understand to be Network Session 1. That would explain things. Maybe if that 'Output' menu is set as shown, the 'MIDI Out port' below is not applicable in that mode?
PS, yes, you will be able to detect and alter the 39 byte sysex message in MidiFire and send to Teensy, but not until we can get the message into MidiFire first! :-)
I feel extremely embarrased about wasting so much time. I do want to thank you very, very much. There are 2 LCD Panel selections under 2 different menus in HW. I selected the wrong one all along, which is why the test worked but the button on the organ that generates the SysEx I want to process in Teensy did not. But not all was lost. Loopback still doesn't work but IAC Driver does! I am able to select output of the message to IAC Driver and MidiFire responds as desired.
In MidiFire I route IAC Driver Bus 1 to an Event Monitor to Stream Byter to Event Monitor to Teensy MIDI.
But now I have another problem. The Stream Byter using the following code filters CC messages and passes the 5 Byte SysEx to Teensy but not the 39 Byte. # block non-sysex if M0 != F0 block end
Below is the Midi Monitor readings for the 5 byte and 39 byte midi messages.
The 5 Byte starts with F0 70 and the 39 Byte begins with F0 7D. I define the 70 and can set it to another other value. 7D comes from the organ and I can't change it. So I think the best option is to pass only the F0 7D and block all others.