Loopy Pro: Create music, your way.

What is Loopy Pro?Loopy Pro is a powerful, flexible, and intuitive live looper, sampler, clip launcher and DAW for iPhone and iPad. At its core, it allows you to record and layer sounds in real-time to create complex musical arrangements. But it doesn’t stop there—Loopy Pro offers advanced tools to customize your workflow, build dynamic performance setups, and create a seamless connection between instruments, effects, and external gear.

Use it for live looping, sequencing, arranging, mixing, and much more. Whether you're a live performer, a producer, or just experimenting with sound, Loopy Pro helps you take control of your creative process.

Download on the App Store

Loopy Pro is your all-in-one musical toolkit. Try it for free today.

Mozaic: How to send sysex numbers that are >255?

2»

Comments

  • _ki_ki
    edited November 2020

    Sorry for the confusion with my initial response - @espiegel123 was totally right. The sysex spec only allows 7bits for the sysex data with a zero upper bit, because all midi commands (including end of sysex) start with the upper bit set to easily distinguish them from the data. This allows devices to ‚sync‘ onto the commands in the midi stream

    The value range for 2 bytes is 0..16383 and the conversion code looks like:

    l_byte = value & 0x7F
    h_byte = Div value, 128
    ...
    value = h_byte * 128 + l_byte
    
  • @tja said:

    @espiegel123 said:

    @tja said:

    @espiegel123 said:

    @tja said:

    @espiegel123 said:

    @josh83 said:
    Is there any way to work around this limit? AFAIK Sysex can transmit any kind of data somehow...?

    It depends on the device that is receiving it. You need to find out what it’s protocols and proceed accordingly. Are you sure your device handles values over 255? Some MIDI, btw, isn’t 8-bit...and uses only 7-bits. There are some calculators to be found on the web to convert values over 127 into multiple 7-bit bytes.

    This is not true.

    MIDI uses bytes of 8 bits and therefore can and will use values of 0 to 255.

    You may refer to different usages of MIDI messages, which are distinguished by the highest bit.

    Here more detail:

    https://ccrma.stanford.edu/~craig/articles/linuxmidi/misc/essenmidi.html

    Sysex is weird because (as noted above) the “end of packet” message is an 8-bit byte.

    I only know about this because I had to reverse engineer some sysex stuff where I needed to send values over 127 (in my case up to 999) and things didn’t work until a kind person pointed out to me that most devices use 7-bit bytes inside of sysex streams.

    There is even a site (maybe a page on the MIDI Designer Pro site) that converts numbers into the correct sequence of 7-bit bytes.

    There are many articles to be found about this on the web.

    This discussion may be of interest:
    https://forum.juce.com/t/sysex-messages-containing-bytes-greater-than-127/34792/3

    Those are still sequences of bytes, each 8 bit.

    As i wrote, we talk about the usage type, possibly indicated by the highest bit.

    This may help:

    http://midi.teragonaudio.com/tech/midispec/sysex.htm

    Even if only 7 bits are of interest to an App, the MIDI stream consists of regular bytes of 8 bits each.

    And, as @wim wrote, of course you can also interprete 2 bytes as a 16-bit number or 4 bytes as 32 bit number, as usual with computers. But does not change, that MIDI consists of sequences of bytes.

    The website you mentioned referes to http://www.somascape.org/midi/tech/spec.html#sysexmsgs

    And it says the same!

    The sysex messages are just bytes that have the top-bit set to zero, so take values between 0 and 127, still in 8 bit.

    I think you misunderstood what I wrote. What programmers call “7-bit bytes” are normal 8-bit bytes except that the first bit is ignored. For most sysex applications, this is important because values over 127 need two “7-bit bytes”.

    I think, I start to understand.

    Even while the MIDI stream is a sequence of bytes and sysex only is interested in (or capable of) values between 0 and 127, there may be reasons to send values that are larger than 127.
    But sysex simply cannot interprete or use the full bytes.

    So, some trick is used to convert values between 128 and 255 as 2 bytes, instead of just interpreting or using the 8 bigs available in MIDI. No idea why this is done.

    Anyway, i think i understood and even found an implementation:

    https://blogs.bl0rg.net/netzstaub/2008/08/14/encoding-8-bit-data-in-midi-sysex/

    Thanks for clarifying, @espiegel123

    The reason why it is done is because the MIDI sysex protocol uses 247 as its “end of message” marker. There may be other cases, too, where the leading bit is needed as a signal that the value is special. Pitchbend also uses “7-bit bytes” for its values.

  • The user and all related content has been deleted.
Sign In or Register to comment.