|
Post by antonio on Jul 29, 2023 21:10:48 GMT
Hello all, I’ve been using Midiflow for many months, to route and control messages from two keyboards to many synths. However, Midiflow has many limitations and today I found MidiFire, with the message streamer, and I’m really amazed. One of the features I’m using is a matrix of 2x4 buttons in a Roland A800, to enable or disable key events from each keyboard (A500 and Kord D1) to different synths (korg module pro, korg wavestation, Moog model D, and Trooper). This allows me to change or layer up to 4 sounds in real-time. It’s fairly easy to assign values to variables according to the buttons matrix and, using scripting, check the value of the variables and send appropriate SEND command to each synth, using MIDI channel to identify each of them. However, I suppose that I’ll be sending messages to the root MIDI system, making all the synths receive all the messages, possibly increasing cpu usage and delay. So, my question is: is there any way to send a message to a specific output port? I’m sorry to bother, but I’m in hurry to return from vacations and try the configuration I’m making offline. Could you help me please about the best way to do this in order to minimize delay? Thank you!
|
|
|
Post by mo13 on Jul 30, 2023 7:05:28 GMT
Not sure if this is exactly what you're after but this will enable/disable 2 of your incoming keys and remap them to chosen channels:
|
|
|
Post by antonio on Jul 30, 2023 10:31:20 GMT
Hello, Thank you for you detailed answer, and your care providing example code! However, I suppose I didn’t express myself correctly. My question is: using MidiFire, I can route events through blocks, until they reach an output to a specific device. Alternatively, I suppose that it’s possible to use the SEND command to send Note On/off events directly, and don’t linking to any specific output. With the second approach, that seems perfect for me, the script will not be sending to one, but to all devices, I suppose, maybe leading to higher latencies, noticeable when playing piano (I felt it with Midiflow). In order to avoid it, can I define an output port with the SEND command? Thank you, again! I’ll share my scene, when complete, for whom to it can be maybe useful.
Best regards!
|
|
abadam
Developer 
Rotten Apple
Posts: 52
|
Post by abadam on Jul 30, 2023 16:42:23 GMT
In a way, this is what channels are for, but you could do it by putting a StreamByter in front of every port and then send your messages from another streambyter (attached to each 'front end' streambyter) encapsulated in a special sys ex message with a filter byte (or bytes) at the front to specify which output should be used. Something like: send F7 7D 22 01 90 44 31 7F from outside of frontend (where F7 7D 22 is special message tag, 01 means output 1, 90 44 31 is final message to send)
and the '01' front end
if M0 == 7D 22 # 'secret message' if M2 == 1 # for me? other frontends have different number here send m4 m5 m6 # send the actual message (just 3 byte messages supported in this example) else block end end
Could use a bitmap for filter byte so you can send to multiple outs if you want to get clever.
|
|
|
Post by antonio on Jul 30, 2023 19:53:53 GMT
Hi Abadam, Thank you for your clever tip on encapsulate the event in a sysex message. I’m sure it will be very useful in different situations. Meanwhile, i found some minutes to make some tests using my holidays friend (keystation mini). This is a simplified excerpt of the code:
If load set slider_display 1 set Q0 qbutton1 +toggle set Q1 qbutton2 +toggle End
If MC == 0 If ML == 3 # keyboard 1 and 3 byte length message If Q0 == 0 SND 9A M1 M2 End If Q1 == 0 SND 9B M1 M2 End Block End End
This worked nearly like a charm: non perceivable latency, scalable to 4 synths without lag (even if 4x messages were being sent, and only 25% used). I need to try with the piano, as it can generate much more notes, but I found that I can apply a channel filter before each output, without noticeable negative effects, as well. So, congratulations to MidiFire team! I was looking for it for years!… Anyway, the Q comparisons are being made with zero, because i didn’t find a way to show the controls box, yet, but later that will be done by hardware buttons from the A500 controller. To finish the scene I’ll have to create that part, as well as CC manipulation, but I suppose it will be fairly easy to do. I’ll share the final result. Thank you, again!
|
|