slmnv
Converser
Posts: 22
|
Post by slmnv on Jan 27, 2019 14:49:49 GMT
Nic,
thanks one more time for great MIDI FIRE app, relentless support and updates - it is exceptional. There are very popular guitar effects pedals ZOOM MS. These pedals have extensive MIDI implementation and there is an open source patch editor. Though MIDI is not officially documented you may find all info on github. I am wondering if it is possible to make a scene that will modify guitar patches in live playing ? This may be turning on / off one of the effects in the FX chain or setting BPM for delay. Also would be great to sync ZOOM MS BPM to midi clock coming from a looper (I use Quantiloop).
cheers, slmnv
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Feb 4, 2019 15:03:39 GMT
Hi slmnv , Interesting. I was aware that theses units responded to program change (tested this my self with an ms-70cdr) but did not know they could be controlled further than that. In theory, you could setup a scene that included a streambyter that sent carefully crafted messages to the zoom inside an IF LOAD clause to switch stuff on and off on scene load as well as select the desired patch beforehand. Would need to know what sort of messages these were. I imagine they are sysex messages. Regards, Nic.
|
|
|
Post by rebusknebus on Mar 7, 2019 6:38:33 GMT
Hi, New to Streambyter, but have an MS-50G pedal and thought this would be a good project to learn on. Not sure how ready this is to use, since it doesn't do much error checking or anything to confirm communications, but the basic functions work if someone wants to expand on it. Also the midi clock BPM seems a bit jumpy - not sure if it's the Streambyter timer or the clock source that's causing it. The scripts do the following: - Turn effects 1-3 on and off using one midi CC per effect (value of 127)
- Set the patch tempo to 2x the input midi CC value (limited to 40 to 250 bpm)
- Set the patch tempo to the midi clock tempo for an input midi CC value of 0
There are 2 scripts, Module A and Module B. Module A uses Nic's bpm monitor code to turn midi clock into BPM and store it in a global variable. Module B processes incoming midi CC from a controller and sends sysex to the MS-50G. So you need the following connections: - Midi clock source to Module A
- Midi controller to Module B
- Zoom MS-50G to Module B
- Module B to MS-50G
Anyway, not planning to do anything more with this, but hopefully somebody finds it useful.
# -----------------------------
# Zoom MS-50G Effect Switch and MIDI Clock to Tempo # Module A: Get Tempo from MIDI Clock # Based on bpm monitor by audeonic # Modified to store integer part into global G255
IF LOAD ASS L0 = 0 # intialize tick count ASS GFF = 0 # intialize tempo SET LB0 00 SET LB1 S— END
IF M0 == F8 # look for midi clock msg MAT I0 = L0 % 18 IF I0 == 0 # quarter note ASS I1 = T0 # get timer value SET LB1 I1 # debug IF L0 != 0 # wait for first full quarter note MAT I2 = EA60 / I1 # calculate BPM MAT I3 = EA60 % I1 # round up as needed MAT I1 = I1 / 2 IF I3 >= I1 MAT I2 = I2 + 1 END ASS GFF = I2 # put BPM into global SET LB0 I2 +D END END MAT L0 = L0 + 1 END
IF M0 >= FA IF M0 <= FC ASS L0 = 0 # reset on clock start/stop/continue ASS GFF = 0 SET LB0 SRST END END
# -----------------------------
# Zoom MS-50G Effect Switch and MIDI Clock to Tempo # Module B: Main Event Handler # The MS-50G patch tempo must be set to a note value for the tempo to work
# MS-50G INFO # From GitHub g200kg/zoom-ms-utility
# Midi CC messages with a value of 127 used to turn effects 1-3 on and off # Midi CC message also used to control tempo. A value of 0 uses Module A to get tempo from midi clock # Values between 20 and 127 are multiplied by 2 (but capped at 250)
IF LOAD
# this version assumes the initial state of each effect is off # possible future upgrade to read state from patch
ASS J0 = 0 # initialize switch 1 state as off ASS J1 = 0 # initialize switch 2 state as off ASS J2 = 0 # initialize switch 3 state as off
SND F0 52 00 58 50 F7 # Parameter Edit Enable
END
# Effect Switches
IF MT == B0 # if controller change IF M1 == 16 7F # cc number for 1st effect, value of 127 to activate IF J0 == 0 SET LB0 S1_1 # debug SND F0 52 00 58 31 00 00 01 00 F7 # turn on if off END IF J0 == 1 SET LB0 S1_0 # debug SND F0 52 00 58 31 00 00 00 00 F7 # turn off if on END MAT J0 = J0 + 1 # toggle stored switch state MAT J0 = J0 & 01 END IF M1 == 17 7F # cc number for 2nd effect, value of 127 to activate IF J1 == 0 SET LB0 S2_1 # debug SND F0 52 00 58 31 01 00 01 00 F7 # turn on if off END IF J1 == 1 SET LB0 S2_0 # debug SND F0 52 00 58 31 01 00 00 00 F7 # turn off if on END MAT J1 = J1 + 1 # toggle stored switch state MAT J1 = J1 & 01 END IF M1 == 18 7F # cc number for 3rd effect, value of 127 to activate IF J2 == 0 SET LB0 S3_1 # debug SND F0 52 00 58 31 02 00 01 00 F7 # turn on if off END IF J2 == 1 SET LB0 S3_0 # debug SND F0 52 00 58 31 02 00 00 00 F7 # turn off if on END MAT J2 = J2 + 1 # toggle stored switch state MAT J2 = J2 & 01 END IF M1 == 19 # cc number for change tempo SET LB0 STT # debug SET LB1 S— # debug IF M2 == 0 ASS L10 = 1 # flag to use tempo from clock SND F0 52 00 58 29 F7 # Request Patch END IF M2 >= 14 # min tempo 40 MAT L10 = 2 * M2 # tempo is 2x cc value IF L10 > FA ASS L10 = FA # max tempo 250 END SND F0 52 00 58 29 F7 # Request Patch END END END BX = XX +B # block cc
IF M00 == F0 52 00 58 #check leading bytes of patch data IF ML == 92 # check length of patch data IF L10 == 1 IF GFF != 0 # check for tempo captured ASS L0 = GFF # get tempo IF L0 > FA ASS L0 = FA END IF L0 < 28 ASS L0 = 28 END END END IF L10 >= 14 ASS L0 = L10 END IF L0 != 0 ASS L1 = L0 ASS L2 = L0 SET LB1 L0 MAT L0 = L0 & 01 # tt0 into L0 bit 2 MAT L0 = L0 * 4 ASS K0 = M7D # assemble byte 125 MAT K0 = K0 & FB MAT K0 = K0 | L0 MAT L1 = L1 & 06 # tt2,tt1 into L1 bits 6,5 MAT L1 = L1 * 10 ASS K1 = M82 # assemble byte 130 MAT K1 = K1 & 9F MAT K1 = K1 | L1 # SET LB0 L1 #debug # SET LB1 K1 #debug MAT L2 = L2 & F8 # tt7-tt3 into L2 bits 4-0 MAT L2 = L2 / 8 ASS K2 = M83 # assemble byte 131 MAT K2 = K2 & E0 MAT K2 = K2 | L2 SET LB0 L2 #debug SET LB1 K2 #debug ASS L3 = 0 # byte counter for patch load IF L3 < 7D +L SND ML3 +F # send patch bytes 0-124 MAT L3 = L3 + 1 END SND K0 +F # send patch byte 125 ASS L3 = 7E IF L3 < 82 +L SND ML3 +F # send patch bytes 126-129 MAT L3 = L3 + 1 END SND K1 +F # send patch byte 130 SND K2 +F # send patch byte 131 ASS L3 = 84 IF L3 < 92 +L SND ML3 +F # send patch bytes 132-145 MAT L3 = L3 + 1 END END ASS L0 = 0 ASS L10 = 0 END END F0 = XX +B # block sysex
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 7, 2019 8:16:26 GMT
Hi rebusknebus , Thank you for sharing this! In regards to the bpm jumping about - are you using StreamByterAU for this? If so, the timing is going to be out somewhat due to the way AUs work. The time interval returned by the T variables will be out by +/-5ms or so (depending on audio buffer size) so that would explain that. Regards, Nic.
|
|
|
Post by rebusknebus on Mar 7, 2019 16:49:22 GMT
Nic,
Yes, I’m running the AU version in AUM. I don’t have MidiFire so I can’t test it, but it sounds like the fix would just be to run it inside MidiFire?
Rebus
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 7, 2019 20:49:33 GMT
Hi rebusknebus , > it sounds like the fix would just be to run it inside MidiFireYes, MidiFire will pipe the events ad-hoc through itself rather than the 'traffic light' approach of the AU MIDI mechanism, so the timer variables are much more accurate. It may not be the only fix though. If you didn't have the two modules that rely on shared globals, you could run up the StreamByter app standalone and route via CoreMIDI using AUM which I think would be sent ad-hoc**. As a simple experiment you could just try our your module A in the StreamByter app, connect it to the MS50-G in AUM's routing matrix and see if the BPM that is being shown in the label in the standalone app is more stable. ** - (not sure - would depend upon how Jonatan implemented his code. He's a smart guy, so if he's routing CoreMIDI to CoreMIDI he is probably sending events immediately outside of the render cycle) Regards, Nic.
|
|
|
Post by rebusknebus on Mar 9, 2019 3:54:21 GMT
Nic,
Yep, tried it with Loopy both direct to StreamByter standalone and routed through AUM and the BPM is much more stable. Thanks for the help.
Rebus
|
|
slmnv
Converser
Posts: 22
|
Post by slmnv on Mar 15, 2019 2:30:44 GMT
Thanks Rebus, that's wonderful, i am running to try your script !
|
|