Suggestions/help for processing binary sysex

Home Forums General Programming Suggestions/help for processing binary sysex

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #117146
    EnzoF04
    Participant
      • Topics: 17
      • Replies: 102
      • Total: 119
      • ★★

      I get a midi message from my synth. The data / parameters are spanned over several bits in 16 bytes. I want to process the sysex in binary format. How can I do this.
      My plan is to pull clusters of bits from the sysex data in binary format and push them into decimal variables to be assigned / set into modulators on my panel.

      Any one have an suggestion how to do this?

      The first 5 bytes are in the attachment to get an idea how the parameters are spanned over the bytes.

      Thanks for all help!

      • This topic was modified 4 years, 1 month ago by EnzoF04.
      Attachments:
      You must be logged in to view attached files.
      #117176
      BillFM
      Participant
        • Topics: 2
        • Replies: 15
        • Total: 17

        Hello.

        There are functions (methods?) to get/test bits in bytes/bit-positions. You could then assemble a normal byte to represent the single synth parameter byte. I’ve not tried this (and I’m no Lua expert) so you may need to experiment a bit. Maybe it’s somewhere to start.

        getBitRangeAsInt (value, startBit, numBits) : Get’s a number of bits (numBits) starting at position startBit as an Integer and returns that integer.
        setBitRangeAsInt (value, startBit, numBits, valueToSet) :
        clearBit (value, bitToClear) : Clears a bit at position bitToClear in the value and return that modified value.
        isBitSet (value, bitPosition) : Return true if a bit at position bitPosition in value is set, false otherwise.
        setBit (value, bitToSet) : Set’s one bit in an integer at position (bitToSet) and return the modified value with the bit set.

        #117292
        EnzoF04
        Participant
          • Topics: 17
          • Replies: 102
          • Total: 119
          • ★★

          Thanks for the reply, BillFM; I’ll get into it! This is what I think I have to do with the received data. I have to learn more. Thanks for your input! 🙂

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