|
Post by tugatq on Aug 24, 2021 22:25:46 GMT
G'Day, I'm trying to use data from a SysEx dump to send CC messages. Not sure if this is possible so I'm following the advice in the help message and asking for assistance. For starters, I have a limited understanding of Midi implementation so you'll have to bear with me if I use incorrect terminology. What I'd like to do is put the data from an amplifier preset dump into an array of some sort and then call on specific "cells" and send as CC to a layout in Midi Designer. Here's an example of what the Amp sends to MD: f0 08 21 12 02 00 00 00 00 53 74 61 64 69
75 6d 00 20 52 6f 63 6b 20 20 0a 20 20 40
5a 21 6a 14 2f 07 61 78 6e 03 36 03 00 00
20 7f 00 7f 7f 7f 00 7f 7f 7f 7f 79 7fHere’s what I think I know 🤔 f0 08 21 12 02 00 = start to sysex message. 00 00 = Preset Number. C00 in this case. 53 74 61 64 69 75 6d 00 20 52 6f 63 6b 20 20. = Preset name. Stadium Rock in this case. The rest should be specifying tone stack type, tone stack position, drive circuitry, effect type, reverb type, timbre, etc as well as Volume, Gain,Treble, Middle, Bass, Presence and Reverb. I can work that out by changing parameters on the Amp and seeing what changes in the Sysex message. (I've also asked Fender for a translation but not holding my breath on that one) I know I could be dreaming here but I'd like to give it a crack and I've purchased StreamByter so why not? Thanks in Advance Attachments:MDP2 log One Preset.pdf (570.44 KB)
|
|
abadam
Developer 
Rotten Apple
Posts: 50
|
Post by abadam on Aug 25, 2021 9:37:04 GMT
There's someone on the audiobus and MD forum (spookyzoo or something along those lines) who posted about having done this with a Novation thingo so it is definitely possible.
You could write a little general script that converts each value in the sysex to an incrementing CC starting from (say) cc1 simply enough. Something like this:
if M0 == F0 08 21 12 # is this the message we want? assign I0 = $27 # index of 1st value in sysex message assign I1 = 1 # first CC number to use while MI0 != F7 # loop from 1st value to end of sysex send BF I1 Mi0 # send cc I1 on channel 16 calc I0 = I0 + 1 # next value field calc I1 = I1 + 1 # next CC to send end end In MD only setup the CCs you want and the others ignored. Hopefully not more than 126 values in the sysex message
|
|
|
Post by tugatq on Aug 25, 2021 14:23:49 GMT
Thanks Abadam, Much appreciated.
I'm working on deciphering your script...a noob to this stuff ;-)
In general is the script doing this? 1. Identifying the message at line 1, 2.Identifying first value I want use (Decimal 27 in your example) and making that I0 3. Assign the CC I want to use with I0 4. Send BF (not sure what that is) to CC 5. Loop until hitting F7 (End of message)
I'm pretty sure the CC's aren't sequential and as I work through comparing dial changes on Amp with values in Sysex it looks Volume is using two values. Dial 1-5 on Amp equates to 0H-74H and then dial 6 is 12H and climbs to 7EH at dial 10. I'm trying to identify the second value that's changing.
There are 55 values in the sysex, 47 of which I'll want to use so I guess that's good?
We're back in lockdown here so plenty of time to play with it and learn some stuff.
Thanks again Mate.
|
|
|
Post by tugatq on Aug 25, 2021 15:02:38 GMT
Further to last re Volume
Sysex value $33 is 0FH for dial settings 1-5 and changes to 1FH at around 6 for dial settings 6-10. Sysex value $36 increases from 0H to 7F and starts again at 0H when $33 changes to 1FH.
Gonna have to do some math to get a single CC value from 0-127 out of that.
Also the CC's in MD reflect the Amps Midi stuff (you'd know that anyway) so Vol is CC 103, Gain 102 etc etc.
|
|
abadam
Developer 
Rotten Apple
Posts: 50
|
Post by abadam on Aug 25, 2021 15:09:29 GMT
1. Yes 2. It's the position in the M array of what I thought was the first data byte (index 27, 28th byte, value is 40) 3. Yes, I0 counts up each time by 1 4. BF means 'CC on channel 16' 5. Correct
Given the above input message you should see messages like:
BF 01 40 BF 02 5A BF 03 21 ... BF nn 7f
If the CC's are not sequential, forget the loop and just send 47 CC's separately (47 SEND rules)
For 14 bit (two bytes for volume for example) you'll need to send two CCs MSB and LSB I guess
|
|
|
Post by tugatq on Aug 25, 2021 15:21:54 GMT
Your a legend... Bear with me while I confirm I'm understanding all this...
1. Index 0 is 1st byte ergo Index 27 is 28th byte. 2. The B in BF means CC and the F is OFH ie 16? 3. Understand what messages I would see if we progressed down the loop path...which as you say won't be appropriate due non sequential CC's
The 14 bit MSB LSB thing has got me stuffed...I'll try to understand with a google/youtube search.
|
|
|
Post by tugatq on Aug 25, 2021 16:32:22 GMT
I've got the MSB LSB sorted out...I think. I gather this is done to achieve higher resolution for the CC change?
|
|
|
Post by tugatq on Aug 27, 2021 11:08:00 GMT
How can I do this simple task?
Send byte 36 from incoming SysEx message to CC08 on channel 3.
I know this should be so easy but I'm struggling to get the "number" out of the message?
This is what I tried based on abadam script:
if M0 == F0 08 21 12 # This definitely the correct message. assign I0 = $35 # Also tried 24H Send B2 08 I0 End
|
|
abadam
Developer 
Rotten Apple
Posts: 50
|
Post by abadam on Aug 27, 2021 13:04:38 GMT
You need the 'M' in the send - it refers to the incoming message:
assign I0 = $35 send B2 08 MI0
or just
send B2 08 M$35
|
|
|
Post by tugatq on Aug 28, 2021 1:27:01 GMT
Thanks Abadam, I put the "M" in front but still got a "00" return. Please refer to screenshot attached. Here's what I think is happening?? This will make more sense to you, I'm sure!! You can see the message request for the Sysex preset value dump at line 1 & 2 (not sure why it's repeated) and then at line 5 it gives correct response by sending B2 08 7E. This appears to happen before the 55 byte message is received but whatever,,it's there and it responds correctly. Then it reads message at line 10 and because there is no value at index 36 it returns zero, so the "indicator" slider initially reads 7E (126) but immediately jumps back to 00 (0). This also occurred when I used the IF statement. Another question, This is all going into "Input Rules", Is that correct? Thanks for your patience and assistance again. 
|
|
|
Post by tugatq on Aug 28, 2021 9:06:48 GMT
Disregard the last...I've filtered the messages with IF ML == $55
|
|
|
Post by tugatq on Aug 29, 2021 11:44:19 GMT
After all that I only needed to add the message filter to your original suggestion!
if M0 == F0 if ML == $55 Assign I0 = $24 # INDEX Assign I1 = $24 While MI0 != F7 Send B0 I1 MI0 calc I0 = I0 + 1 calc I1 = I1 + 1 End End End
|
|
abadam
Developer 
Rotten Apple
Posts: 50
|
Post by abadam on Aug 30, 2021 7:45:47 GMT
Cool. You don't need first condition since only a sysex message can be of length 55.
|
|
|
Post by tugatq on Aug 31, 2021 0:59:43 GMT
Thanks, 1st condition deleted I made this page in MDP to extract the numbers.  And came up with this.  The matrix is the "Common" control for Volume, Gain, Treble, Middle & Bass. "Main" controls for Volume, Gain, Treble, Middle & Bass are as follows: Lo = Main control is 1-5 (approx) on the amp dial and sending 0H-7FH. Hi = Main Control 6-10 (approx) on the amp dial and sending 0H-7FH. Any ideas on where to from here?
|
|
abadam
Developer 
Rotten Apple
Posts: 50
|
Post by abadam on Aug 31, 2021 19:55:17 GMT
Can't understand how 5 independent variables with range 1 to 10 could be encoded into a 0-127 range of a CC. What's the amp model? Sysex spec would be useful. Manufacturer should make available according to MIDI association, I think,
What values does CC32 range through when you turn just one knob (eg. treble) on its own?
Don't all guitar amps go up to 11?
|
|