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 StoreLoopy Pro is your all-in-one musical toolkit. Try it for free today.
Comments
I succesfully adapted your code and it works perfectly! Thanks again!! 🙏🏻
Gr8!
My RM50-Mozaic-Loopy script is almost finished and this inspired me to do another one: my beloved Yamaha RX7!
But I ran into a problem: certain parameters are 2 bytes i.e. var5 and var6 combined.
Is there a way to script this in Mozaic? Below are the parameters I need (hope this make sense):
VOICE EDIT PITCH : -360 ~ 240 (2 byte) - as is written in the manual, see next post
Below is the actual data in HEX when this parameter was changed on the device :
Any help would be much appreciated! Thanks in advance!!
@hotswank: I am not quite sure what you mean by “ certain parameters are 2 bytes i.e. var5 and var6 combined.” What does var5 and var6 combined mean?
Sysex is a stream of 7-bit bytes. If you need sysex to contain bytes to represent a 2-byte value, you convert the single two byte value to 7-bit bytes with these formulae.
MSB = 2bytevalue / 128
LSB = 2bytevalue MOD 128
You then need to know whether MSB or LSB is supposed to go first.
MSB and LSB are most and least significant byte.
I’m not sure which is send first but this is stated in the manual. I would also like to know how to formulate this formulae in Mozaic? We are looking at the very first parameter “0” and the notes on the bottom…
Okay, maybe better look the “easier” parameter 3: “bend range”. According to the notes this is 7-bit 2’s complement and if I convert say, -59 with this online converter: https://www.omnicalculator.com/math/twos-complement
it gives 0011 1011.
If I look at the sysex output of -59 send from RX7, the last two bytes are 0x03 0x45, which does not congregate with the 2’s complement of -59 (0011 = 0x03 and 1011 = 0x0B). So this is incorrect.
Edit: damned Yamaha! when I convert -40 it’s 0010 1000 (0x02 0x08 and the actual sysex output is 0x03 0x58 ! That 0x03 stays the same btw the whole -60 to +60 value range! This is really doing my head in.
Question still is how to formulate this in Mozaic? Is there a standard function for calculating 2’s complement from negative values or perhaps a decimal/hex to binary extract function? I can’t find any of this logic in the Mozaic manual.
Those last 2 values 03 and 45 are var5 and var6 in the SendSysex data, and what I meant by “combined” (did not know how to word this differently, please educate me).
I think I better hard code (and a lot of work) this in the Adjust AU MIDI widget or might even use CC (with Bank Select) and convert that with the good old “if else” statements with OnMidiInput… This seems easier then figuring all this sysex shit out because I think I’m starting to lose my mind lol
@hotswank : maybe @uncledave can help on the two’s complement conversion.
As for “var 5 & var6”, we would need more context to know exactly what you mean. Your conversion is going to take a single value (one variable) and assign values to two variables: one with the most significant byte and another with the least significant byte. Maybe that is what you mean ?
>
Nor sure how to put it another way... in my sysex data string the last two variables are the ones above but they are supposed to send with one knob with values -360 ~ 240. It's not msb lsb as far as I know.
But nevermind, I'm gonna hard code it. Thanks for reaching out but it's too hard for me to explain everything when I thought I already did 🥴
@hotswank : I think what you are needing to do is split a single variable (derived from a knob that probably needs scaling) into two variables one that represents the MSB and one that represents the LSB. That is how 14-bit values are handled in MIDI, including sysex.
Pitchbend is really represented as an unsigned value from 0 to 16,383 but is often displayed as a signed value by subtracting 8192 from the unsigned value. I don’t know if the same thing applies here.
Hi. First, remember that MIDI data bytes can have only 7 bits, so it's a little tricky interpreting them. The values in your table do look like the msb and lsb of a binary value. In a Sysex, those can just be consecutive data bytes in the same message, not like the business with CCs. You get the combined value as
It looks like the data is in offset binary, actually running from 0..600, which makes sense since MIDI is kinda averse to negative values. Checking, (04,78) is 0x278, or 632 decimal. And the "0" value, (02,78) is 0x178, or 376 decimal.
Edit: I saw your previous post with the manual copy, referring to two's complement. That does not appear to apply to the data in the table, since it would require all the negative values to have 4x as the msb.
Since this is a Yamaha device, there should be a separate "MIDI Implementation" document with the definitive format of the messages. Content in a user manual could have been preliminary, and not updated to "as built". But it appears there is not; too bad.
Thanks guys. Unless there is a better way to solve this (because the biggest problem with the “Adjust MIDI AU Parameter” widget is it forces you to add every single parameter change on a seperate ‘item’ because ”Item Source” is unavailable for stepped dials and adding 127 items for multiple knobs (ergo step dials is BONKERS.
So I ended up using this: (please correct if there is a better way to actual do it with “Adjust MIDI AU” without adding hundreds of ‘items’). In Loopy I added one fader (CC48) for the ‘lsb’ var4 and radio buttons (CC16) for the ‘msb’ var5. In the end I had no use for your
val = (120*msb)+lsbfunction (120 because 0x00 0x78 represented an octave)PS it was almost impossible to select ‘Code’ on my iPad Pro because the ‘selected’ text obscured the Format dropdown box, can this be fixed please?
You can use 3 "backticks" (left single quotes) alone on a line before and after the code section, instead of using the menu. The backtick is a long press option on the single quote on the Apple screen keyboard, or upper left on a normal ASCII keyboard.
On further reflection, I believe that the document is correct, except for the sign. And the data is in ten cent steps, not one cent. That is necessary to pack the pitch offset into 7 bits. The trick is to realize that 0x78 is 120 decimal. So, the data is unsigned (offset 360). The first byte is the octave, the second byte is the tens of cents in the octave. It looks like they avoid using 0 in the lowest byte. So, for example, the "middle" value of 0, or 360 offset, is (2,78), not (3,00). It looks like that's what you've implemented, so all good.
Thank you