How to program checksum

Home Forums General Using Ctrlr How to program checksum

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #372
    Filch
    Participant
      • Topics: 22
      • Replies: 173
      • Total: 195
      • ★★

      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 Dump

      A 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 working

      F0 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 Bank

      #2896
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        if 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.

        #2897
        Filch
        Participant
          • Topics: 22
          • Replies: 173
          • Total: 195
          • ★★

          IF 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.

          #2898
          msepsis
          Participant
            • Topics: 219
            • Replies: 732
            • Total: 951
            • ★★★

            Filch – 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

            #2899
            Filch
            Participant
              • Topics: 22
              • Replies: 173
              • Total: 195
              • ★★

              Here’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 SysEx

              So 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)?

              #2900
              atom
              Keymaster
                • Topics: 159
                • Replies: 2945
                • Total: 3104
                • ★★★★★

                that "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.

                #2901
                Filch
                Participant
                  • Topics: 22
                  • Replies: 173
                  • Total: 195
                  • ★★

                  Okay, 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

                  #2902
                  atom
                  Keymaster
                    • Topics: 159
                    • Replies: 2945
                    • Total: 3104
                    • ★★★★★

                    program/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.

                    #2903
                    Filch
                    Participant
                      • Topics: 22
                      • Replies: 173
                      • Total: 195
                      • ★★

                      Yes, I understand the difference between changing the program/bank on the hardware and sending all the program parameter data. <img decoding=” 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. <img decoding=” title=”Smile” />

                      #2904
                      atom
                      Keymaster
                        • Topics: 159
                        • Replies: 2945
                        • Total: 3104
                        • ★★★★★

                        i 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.

                        #2905
                        Filch
                        Participant
                          • Topics: 22
                          • Replies: 173
                          • Total: 195
                          • ★★

                          Well, 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

                          #2906
                          Filch
                          Participant
                            • Topics: 22
                            • Replies: 173
                            • Total: 195
                            • ★★

                            AH 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 Organ

                            B0 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.

                            #2907
                            atom
                            Keymaster
                              • Topics: 159
                              • Replies: 2945
                              • Total: 3104
                              • ★★★★★

                              Ahh, read the manual <img decoding=” 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.

                              #2908
                              Filch
                              Participant
                                • Topics: 22
                                • Replies: 173
                                • Total: 195
                                • ★★

                                HA!

                                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…

                                #2909
                                atom
                                Keymaster
                                  • Topics: 159
                                  • Replies: 2945
                                  • Total: 3104
                                  • ★★★★★

                                  have 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.

                                  #2910
                                  Layzer2
                                  Participant
                                    • Topics: 21
                                    • Replies: 55
                                    • Total: 76

                                    bahhaa 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!

                                    #2911
                                    Filch
                                    Participant
                                      • Topics: 22
                                      • Replies: 173
                                      • Total: 195
                                      • ★★

                                      Trust me, I’m having plenty of slapped forehead moments through this process <img decoding=” title=”Smile” />

                                      #2912
                                      F7h
                                      Participant
                                        • Topics: 2
                                        • Replies: 6
                                        • Total: 8
                                        "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 message

                                        So,

                                        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.

                                        #2913
                                        Filch
                                        Participant
                                          • Topics: 22
                                          • Replies: 173
                                          • Total: 195
                                          • ★★

                                          Yes sir.

                                          I got it working once I figured out there was a specific midi message Program Change that was different from CC and Sysex <img decoding=” title=”Smile” />

                                        Viewing 19 posts - 1 through 19 (of 19 total)
                                        • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                                        There is currently 0 users and 85 guests online
                                        No users are currently active
                                        Forum Statistics
                                        Threads: 2,495, Posts: 17,374, Members: 77,605
                                        Most users ever online was 12 on January 22, 2019 3:47 pm
                                        Ctrlr