Home › Forums › General › Using Ctrlr › How to program checksum
- This topic has 18 replies, 5 voices, and was last updated 12 years, 9 months ago by Filch.
-
AuthorPosts
-
July 10, 2011 at 2:18 pm #372
I’ve started to delve into global parameter data for the Blofeld and I’m now having to deal with checksum. I haven’t had to use anything with checksum in CTRLR yet, so I’m not really sure how to implement it.
The sysex is implemented as follows :
GLBD 14h Global Parameter DumpA Global Parameter dump is used to transfer Global Parameter date
from and to the Blofeld.The full format of a GLBD Dump is:
Index Label Value Description
0 EXC F0h Marks Start of SysEx
1 IDW 3Eh Waldorf Music ID
2 IDE 13h Blofeld ID
3 DEV 00 Device ID
4 IDM 14h here GLBD (Global Parameter Dump)
5-59 GDATA see 3.6 Global Parameter Data
37 CHK GDATA&7Fh Checksum
38 EOX F7h End of SysEx
I tried the following string in ctrlr for a modulator to perform a bank change, it’s not workingF0 3E 13 00 14 02 xx F7
02 here is the Global Data parameter from the following list :
3.2 GDATA – Global Data
*****************************************************************************Index Range Value Parameter
0 reserved
1 0..1 off,on Multi Mode
2 0..7 A..H Bank
3 0..127 1..128 Sound
4 0..7 A..H Bank
5 0..127 1..128 Sound
6 0..7 A..H Bank
7 0..127 1..128 Sound
8 0..7 A..H Bank
9 0..127 1..128 Sound
10 0..7 A..H BankJuly 10, 2011 at 5:26 pm #2896if the request needs to contain some sort of a checksum then either you need to tell me how that checksum is calculated so i can add it to the SysEx editor (like i added the Roland checksum) or you need to write a LUA method that will count that checksum and send/translate it.
July 10, 2011 at 7:19 pm #2897IF it can implemented into CTRLR directly, that would be great. If it takes to much time from other important features, I can try to teach myself enough to make it work. I was studying your midi example and it’s making sense. I wanted to get the Blofeld to respond to the send request first in your example before I started experimenting with my own code, which is how I ended up at checksum.
Here is how the documentation says checksum is calculated. I just realized though that I can just put in 7F and it will all be accepted automatically.
CHK : Sum of all databytes truncated to 7 bits.
The addition is done in 8 bit format, the result is
masked to 7 bits (00h to 7Fh). A checksum of 7Fh is
always accepted as valid.
IMPORTANT: the MIDI status-bytes as well as the
ID’s are not used for computing the checksum.July 11, 2011 at 7:11 pm #2898Filch – for something like a dump request (or any momentary button) use 7f. With waldorf synths, any simple request has a checksum of 7f.
If you are sending values with a sysex slider/knob the checksum is xx as it’s variable.
In some cases depending on the type of message you must add two values together to 7F to get the checksum… be careful to not mix hex and binary values!!!!! The manual is pretty clear here, it’s usally BB and NN values you are adding together, but depending on what type of sysex message the manual will explain. You probably already got this, but remember xxh you can drop the h… that just is labeling the value as hexidecimal, not binary.
Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen
July 12, 2011 at 2:11 pm #2899Here’s what I’m unsure of though. The blofeld sends and receives global dumps in the following format :
F0 3E 13 00 14 CHK F7
Where each byte index is as follows :
0 EXC F0h Marks Start of SysEx
1 IDW 3Eh Waldorf Music ID
2 IDE 13h Blofeld ID
3 DEV 00 Device ID
4 IDM 14h here GLBD (Global Parameter Dump)
5-59 GDATA see 3.6 Global Parameter Data
37 CHK GDATA&7Fh Checksum
38 EOX F7h End of SysExSo the second to last byte is the checksum addition. What confuses me is the global data part. It’s defined as Index 5-59. I assume I can send a long string containing multiple global data parameters? The index of Global Data is as follows :
3.2 GDATA – Global Data
*****************************************************************************Index Range Value Parameter
0 reserved
1 0..1 off,on Multi Mode
2 0..7 A..H Bank
3 0..127 1..128 Sound
4 0..7 A..H Bank
5 0..127 1..128 Sound
6 0..7 A..H Bank
7 0..127 1..128 Sound
8 0..7 A..H Bank
[edit]So how would the string go if I were to send a message to select the Bank for 1st multi (Index 2) and the value for that bank (0 for bank A)?
July 12, 2011 at 2:27 pm #2900that "global data" is propably a fixed size of data (like 54 bytes) so you need to always send 54 bytes and put the values of parameters in those 54 bytes at the right place, but it’s always 54 bytes. This is how dumps work always ALL parameters are sent/received.
July 12, 2011 at 2:55 pm #2901Okay, That’s starting to make more sense. Except that the table for Global Data is more than 54 parameters. The Blofeld doc could likely use some updating. I’ll have to look into this more. I have a Blofeld editor/librarian someone built. I may try to play with it and capture it’s sysex and see if I can figure out what it wants.
But, sending all global data seems like an obtuse method to change the current program. I might be missing specific Bank and Program change somewhere
July 12, 2011 at 3:09 pm #2902program/bank change just sends a number of the bank/program and the device deals with changing the values internaly. Sending a program (the actual data for each parameter) is different, you deal with putting those values in a message and sending it to the device. Theese are 2 different things program change and the actual program.
July 12, 2011 at 3:27 pm #2903Yes, I understand the difference between changing the program/bank on the hardware and sending all the program parameter data. ” title=”Smile” />
What I mean is that the only place in the midi spec that I see to change the program is in the Global Dump parameters list. It has each bank and program number of the 16 multi slots. It seems awkward that if I want to change to a new program that I would dump all the global data. (there is no sound data sent in the global index dump).I’m just trying to figure out how to program a bank select button (0-7) and a program select knob (0-127) and have the hardware change to that program in the edit buffer. I haven’t even got to the part of having the blofeld dump it’s sound paramater data to update the panel. ” title=”Smile” />
July 12, 2011 at 4:50 pm #2904i don’t think i get it, if you send a program change and/or a bank change the edit buffer of the device is filled with the data of the selected program and is kept there until a new program change is received.
July 12, 2011 at 9:07 pm #2905Well, I asked on the Waldorf forums, and I was basically told to just send a bank/program change, without being told how to send a bank/program change. Google search I was able to find the following :
[quote:1uw7owl4]Bank MSB (CC#0) and Bank LSB (CC#32) are currently interchangeable,
this may change in the future.Bank Select *LSB* (CC 32) plus Program Change
Banks 0-7 correspond to banks A-H in the Blofeld (global channel in
sound mode, multi part channel otherwise). You can switch up to 16
programs back-to-back without problems (in other words, set up a full
multi). Some controller surfaces might send more program changes in a
shorter time than the Blofeld needs to fetch the new program from
memory, so you should slow down a bit as you approach the final
destination (or rate limit the controller data if that is possible).Bank 127 is for switching between multi programs on the global channel
(although it currently works on all channels). After switching to a
new multi you need to leave some time before you can switch the
programs in that multi (about 30 MIDI bytes over USB) so that Blofeld
can finish loading the multi before it gets new program changes.[/quote:1uw7owl4]Does any of this make sense to you? I’m still lost. I don’t care about Multi’s. I just want to tell the blofeld to change to Bank X and Program xxx
July 12, 2011 at 9:23 pm #2906AH okay… I captured the data from an editor. So there’s two messages sent to change the bank/program
00010830 16 — B0 00 00 1 — CC: Bank MSB
00010830 16 — C0 11 — 1 — PC: Percussive OrganB0 00 (xx) is a CC control, that’s easy. 0-7 selects Bank A-H
C0 (xx) is a Program Change message? I’ve never seen this before. Hence my complete and utter confusion about this.July 12, 2011 at 9:28 pm #2907Ahh, read the manual ” title=”Smile” /> http://www.blitter.com/~russtopia/MIDI/ … dispec.htm
there is a load of messages that belong to the MIDI specs, believe me even the program change/bank change is not that simple, it’s explained in the specs.July 12, 2011 at 10:24 pm #2908HA!
I didn’t even realize there was an dropdown option in CTRLR for Program Change message. Good god I can’t believe it took all damn day to figure it out.
derrrr…
July 12, 2011 at 10:26 pm #2909have you got ANY idea how long it took me to figure all this out, don’t worry you’ll get there, be patient oh young one. may the force be with u.
July 22, 2011 at 6:03 pm #2910bahhaa sorry filch, i wish i jumped on this sooner….i delt with the same bank/program change mystery with a few of my controllers! good job figuring it out!
July 23, 2011 at 12:10 pm #2911Trust me, I’m having plenty of slapped forehead moments through this process ” title=”Smile” />
July 27, 2011 at 4:27 am #2912"Filch":3n4evz5z wrote:But, sending all global data seems like an obtuse method to change the current program. I might be missing specific Bank and Program change somewhere[/quote:3n4evz5z]Hello:
There are 3 methods for bank select…
1. Using the Bank Select Message
1.1. Only MBS Bank Select (CC# 0) Bn 00 mm (v.g. SoundBlaster Soundfont bank)
1.2. Only LSB Bank Select (CC# 32) Bn 20 ll (v.g. Emu Vintage, UltraProteus, Morpheus ZPlane, and Waldorf.Blofeld see at user’s manual page 114)
1.3. Using MSB and LSB Bank Select (v.g. Korg, Roland)
2. Using a Program Change ( Cn xx ) (v.g. Yamaha SY-77)
3. Using System Exclusive messageSo,
If you have to select a Program (Waldorf.Blofeld) you have to send:
– Bn 20 ll (ll=> 0:Bank A, 1: Bank B, …
– Cn pp (pp => 0: Program 1, 1:Program 2)Regards.
July 27, 2011 at 2:42 pm #2913Yes sir.
I got it working once I figured out there was a specific midi message Program Change that was different from CC and Sysex ” title=”Smile” />
-
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.