|
Post by matsou on May 5, 2018 11:14:29 GMT
I have combed this board for a solution to my MidiFire problem. Using Stream Byter I can transpose an incoming note but I can't find a way to have a program change transpose all subsequent notes; I also want to have a program change prevent a channel from sending note messages. How do I store a local variable when a program change occurs that I can test against? Any help is greatly appreciated!
|
|
|
Post by matsou on May 5, 2018 14:44:49 GMT
I've basically gotten this to work using Global Variables and multiple Stream Byter modules; one does the setting up of globals and catches the program changes, while multiple SB modules filter for one channel that is transposed based on a corresponding global variable (as adjusted by the program changes on that channel). I'm not sure how efficient this is, and it does seem to add latency (my project has scores of SB modules) but at least I figured it out -- mostly due to poring over the examples on this message board... I do think the documentation could be much improved (not to mention the clunky user interface) but I am thankful that it does what I want (I created a custom Midi Designer2 controller for my iPhone that sends MIDI across bluetooth to MidiFire on my iPad, allowing me to transpose octaves or add sustain to a number of virtual MIDI channels and zones created in MidiFire to control Beatmaker 3). Cheers!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on May 5, 2018 16:23:38 GMT
I’m sure I can streamline this for you. If you can post the code for your global setup and modifying modules I can take a look.
Regards, Nic.
|
|
|
Post by matsou on May 6, 2018 5:56:16 GMT
Cool, thanks much Nic!
I'll first describe my MidiFire setup, maybe you (or others on this board) will have suggestions to improve my implementation.
I've built a portable iPad music rig, with a Korg 25-key bluetooth MIDI controller, Akai 8 pad and 8 knobs bluetooth controller, a BlueBoard bluetooth MIDI foot controller and my iPhone as an additional controller. I found MidiFire super useful as a master MIDI input, with my various controllers all outputting to one MidiFire output; in my iOS DAW (the amazing Beatmaker 3) I only need to turn on MidiFire rather than multiple sources. I created virtual zones for the Korg by creating 4 modules, one pair blocking Note On and Off for a note range, the other pair allowing, thus creating virtual upper and lower zones; I have 4 modules to disable/allow the sustain and pitch bend for the zones (for performance uses) and remap to channels 2 and 3. I bet those modules could be streamlined in code, but I've only dug into Stream Byter in the last week. I recently replaced channels strips for each of the 8 virtual channels with two SB modules, they add additional channels for the upper and lower zones (useful to control multiple synths):
# channel 3 is the lower # add channels 4 and 5 X2 = X3 +C X2 = X4 +C
# channel 2 is upper # add 6, 7, 8, 9 X1 = X5 +C X1 = X6 +C X1 = X7 +C X1 = X8 +C
Then I have two modules that process global variables based on program change messages (I'll only post the smaller one, which is still large). I named the globals that control the octave transpositions after the channel numbers, and corresponding globals with added zeroes for program change messages that allow blocking each channel. IF LOAD ASS G3 = 0 ASS G30 = 1 ASS G4 = 0 ASS G40 = 1 ASS G5 = 0 ASS G50 = 1 END
# the following is for program changes 00 and 01 for each channel # the default is on; PC 01 will block the channel, 00 restores IF M0 == C2 00 ASS G30 = 1 END IF M0 == C2 01 ASS G30 = 0 END IF M0 == C3 00 ASS G40 = 1 END IF M0 == C3 01 ASS G40 = 0 END IF M0 == C4 00 ASS G50 = 1 END IF M0 == C4 01 ASS G50 = 0 END
# the following is for program changes 02,03,04 for each channel # which will transpose down octave; restore; up octave # the default is no transpositions IF M0 == C2 02 ASS G3 = -12 END IF M0 == C3 02 ASS G4 = -12 END IF M0 == C4 02 ASS G5 = -12 END IF M0 == C2 03 ASS G3 = 0 END IF M0 == C3 03 ASS G4 = 0 END IF M0 == C4 03 ASS G5 = 0 END IF M0 == C2 04 ASS G3 = 12 END IF M0 == C3 04 ASS G4 = 12 END IF M0 == C4 04 ASS G5 = 12 END
Now I have another SB module for each channels, that follow this pattern:
# mute channel if global set by PC 01 IF G50 == 0 N4 = XX +B END
# block all but the current channel X0-3 = XX +B X5-8 = XX +B
# transpose the track based on PC 2-4 IF M0 >= 80 IF M0 <= 9F MAT M1 = M1 + G5 END END
All output to the single MidiFire MIDI output. I'm happy to say it works, if perhaps a bit laggy...
Thanks again for any feedback. Any help on reducing the number of modules or other tips to streamline are greatly appreciated!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on May 8, 2018 9:21:34 GMT
Hi matsou, I sent you a PM about this. Regards, Nic.
|
|
tap
Converser
Posts: 35
|
Post by tap on May 8, 2018 18:44:04 GMT
I'm sure my advice can't hold a candle to Nic's, but in my simple world, I'd put together a scene, save it, change the Channel Strip module(s) to transpose up 12 steps, save the scene again under a different name, then just drive what you're trying to do via jumping between scenes. I do that with a Blueboard pedal, but I don't know if that's an option for you in this case.
|
|
|
Post by matsou on May 8, 2018 23:28:57 GMT
Hi Tap, I hadn't considered the scene switching you describe, thanks for the tip. I'm not sure it will work with current setup and needs, but I'm glad to know about this approach, I'm sure it will come in handy... Thanks again!!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on May 9, 2018 14:40:40 GMT
Hi matsou (sent me a scene file to examine), OK, so I wrote a whole bunch of stuff with suggested changes, but have just decided to delete that. I would probably do things differently, but actually, I don't think it matters. If it is working logically, and you understand what you've done, then I'm only going to add unnecessary complication and possibly introduce other bugs. The MidiFire routing engine is pretty efficient and MIDI data is pretty sparse (compared to audio for example) that I am not (yet) convinced that your large number of modules and logic is causing the lag you are experiencing. But I am not averse to be proven wrong! I ran up your scene and compared the timing between the event received from the port directly and also post processing. I measured about a 5-6ms delay between the two, so right now I don't think the lag is due to your extensive scene. tap has a good point in that you may find that setting up multiple simple scenes and switching between them either via the GUI or remotely from one of your devices might be another way to approach this, but that's your call. I would like to explore the lag issue a little further if you are amenable. Maybe you could try some really simple tests with just the KORG and BM3: 1. connect KORG directly to BM3 (no MidiFire) and get a feel for responsiveness 2. connect KORG to MidiFire -> MidiFire out -> BM3 (ie. no processing at all) and see if response time changes 3. revert back to your setup and observe response time All of the above with just the KORG connected (no other devices). Please let me know at which point you start noticing the lag (if any). Regards, Nic.
|
|