Ensoniq MR/ ASR-X sysex question – it splits bytes strangely

Home Forums General Programming Ensoniq MR/ ASR-X sysex question – it splits bytes strangely

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #62743
    carillonaudioblog
    Participant
      • Topics: 6
      • Replies: 9
      • Total: 15

      Hello Everyone,

      Hopefully someone has some insight into how to program this within CTRLR.

      The Ensoniq MR series and ASR-X series SYSEX splits the data strangely and I can’t understand how to implement it in CTRLR.

      From the manual:
      “Where specified, the MR will encode/interpret a consecutive group of 4-bytes:

      Byte #0 b31b30b29b28b27b26b25b24
      Byte #1 b23b22b21b20b19b18b17b16
      Byte #2 b15b14b13b12b11b10b09b08
      Byte #3 b07b06b05b04b03b02b01b00

      as the following 5 consecutive SysEx bytes:

      Byte #0 0 b06b05b04b03b02b01b00
      Byte #1 0 b13b12b11b10b09b08b07
      Byte #2 0 b20b19b18b17b16b15b14
      Byte #3 0 b27b26b25b24b23b22b21
      Byte #4 0 0 0 0 b31b30b29b28

      In the event that less than 4 bytes need to be encoded, the remaining bytes will be zero padded in order to satisfy the format. This will typically only occur at the end of a dump.”

      So when trying to create a sysex message here I can not figure out what the actual SYSEX string would be in CTRLR. Any ideas?

      From the manual:
      3.2 Parameter Change Request

      This multi-context command will allow for a consecutive group of one to four bytes within a given data structure to be edited and is applicable to Sound Programs, Drum Kit Programs, and Performances. When three or less bytes are specified the MR expects the Parameter Value field to be bit ordered as if it was performing a full 32-bit (4-byte) parameter change. For example, when editing a two byte parameter, Byte #0 will occupy the bit range of b24-b31 while Byte #1 will occupy bits b16-b23. The remaining bits (b00-b15) in the parameter value field should be set to zero.

      3.2.1 Sound Program Parameter Change Request

      F0 System Exclusive Status Byte
      0F Ensoniq Manufacturer Code
      09 MR Family ID Code

      00 MR-Rack Model ID Code
      or
      01/02 MR-61/76 Model ID Code

      nn Device ID Number (0 to 127)
      05 Parameter Change Request Command

      01 Sound Program Parameter

      pp Program Number (0 to 127)
      bb Bank Number (0 to 127)

      01 Program Parameter (See Section 5.0)
      or
      02 Layer Parameter (See Section 6)

      yy Layer Number minus 1 (LSByte)
      zz Layer Number minus 1 (MSByte)

      bb Parameter Offset – 0 b06b05b04b03b02b01b00
      bb Parameter Offset – 0 b13b12b11b10b09b08b07
      bb Parameter Offset – 0 b20b19b18b17b16b15b14
      bb Parameter Offset – 0 b27b26b25b24b23b22b21
      0b Parameter Offset – 0 0 0 0 b31b30b29b28

      0b Parameter Byte Size (1 to 4)
      00
      00
      00
      00

      bb Parameter Value – 0 b06b05b04b03b02b01b00
      bb Parameter Value – 0 b13b12b11b10b09b08b07
      bb Parameter Value – 0 b20b19b18b17b16b15b14
      bb Parameter Value – 0 b27b26b25b24b23b22b21
      0b Parameter Value – 0 0 0 0 b31b30b29b28

      F7 End of System Exclusive

      #62807
      Puppeteer
      Participant
        • Topics: 16
        • Replies: 185
        • Total: 201
        • ★★

        I think what they are saying is that internally the synth uses 32 bit parameters.
        SYSEX is a 7 bit message, so to fit the 32 bits in they need to use 5 sysex bytes, rather than the 4x 8 bit bytes.

        The b31, b30 etc are the bit numbers. They count down for the internal messages from 31 to 0.

        For the sysex format they count down 6 to 0, 13 to 7. In the sysex format the first bit of all bytes is a 0 for data bytes.

        So the internal structure has bit’s 0 and 1 sent at the end of byte 3, but for sysex these are sent at the end of byte 0.

        You will need to write a lua function to do this encoding and decoding. I’ve done a similar thing for the pC3, and it’s included in the step by step guide.

        The Puppeteer
        http://godlike.com.au

        #63137
        carillonaudioblog
        Participant
          • Topics: 6
          • Replies: 9
          • Total: 15

          Thanks,

          I have been looking around for info on how to code that, but haven’t had any luck. Or maybe it is way over my head. Is there some sort of Lua for dummies?
          What would the Lua function look like?

          Nick

          #63213
          Puppeteer
          Participant
            • Topics: 16
            • Replies: 185
            • Total: 201
            • ★★

            Some introductory LUA stuff and my bit-packing example (similar to what you’ll need to do) are in the v25 word document available here.

            Ctrlr – Step by step guide (in DEV version)

            The Puppeteer
            http://godlike.com.au

            #63789
            carillonaudioblog
            Participant
              • Topics: 6
              • Replies: 9
              • Total: 15

              Thanks Puppeteer.

              I have been reading the document you mentioned, waiting for it to soak in, but I think it is beyond me. From what I can tell, the code you have seems to operate on the input.

              I tried copying it into a panel and watching the midi monitor to see I it re-arranged bits on the knob SYSEX message, but it did nothing as far as I could tell.

              Is anyone interested in helping me design the Lua script for this panel? Once the Lua code is written I should be able to have it apply to all the components, right? Hopefully an ASR-X owner who can benefit from me doing the leg work.

              Any help?

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The forum ‘Programming’ is closed to new topics and replies.
            There is currently 0 users and 113 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