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
@McD
"11.3.4 PROG
Program Change sends a Program Change message"
Does this mean that it can send a PC message of a user set value between 0-127?
@Gravitas : CC0 and CC32 are bank number selectors. It varies a little bit from device to device how they are interpreted. Theoretically, the "real" bank number CC0 value * 127 + CC32 value
But some devices and software use only CC0 or CC32. Some use CCO as something like parent bank ID and CC32 as the ID of a sub-bank/folder of the parent.
Currently going through stuff online to find out the exact numbers.
Thanks for this.
Currently looking at Arrays in the Mozaic manual.
@Gravitas : if you have any array questions, let us know. Arrays is the subject most likely to be a source of confusion for people that haven’t done scripting/coding.
Yes. The Moziac manual provides details for every supported MIDI message type. Sending ProgramChange messages for example:
SendMIDIProgramChange , [,]
Description: Sends a MIDI Program Change (PC) message
Parameters and output:
The desired MIDI channel (0-15)
Number of the patch
Optional delay (in milliseconds) before the MIDI message is sent out. If left out or set to 0, the message is sent out immediately.
Example:
So if I needed to select patch 38 in bank 3 on Midi Ch 9 it would be
@OnLoad
SendMIDIBankSelect 0, 3
SendMIDIProgramChange 9, 38
@End
@espiegel123
Thank you for your offer of assistance.
Arrays may complicate things unnecessaily so at the moment.
I think let's get a working version of PC messages > CC messages befoe getting into Array's.
@espiegel123
Still it looks I will need to learn about Arrays anyway so a quick question for the future,
In this example from the manual the numbers are fixed,
notenum = [49, 51, 54, 56, 58, 61, 63, 66]
what happens if I needed those numbers to be user selectable or input by the user?
Would that take some form of
notenum = [a, b, c, d, e, f, g, h]
@Gravitas : I’ll get back to you about arrays. I just have a sec.
I wanted to mention, what we call midi channel 1 is really 0. So midi channel 9 is 8!
No worries.
Opps, I forgot about that.
1-128 is 0-127
1-16 is 0-15
Here is a little exercise that I hope will clarify.
Write a little script that when it loads,
hint: notenum[0] = GetKnobValue 0
Then add code so that when a knob is turned, the knob's value is stuffed into the right slot of the notenum array.
Bonus points for rounding the value when you assign it to the notenum array.
@espiegel123
Let me focus on PC>CC first.
You posted this earlier which if I'm reading correctly converts a CC message to a PC message?
"@OnMidiCC
If midibyte2 = ccNumberICareAbout
SendMIDIProgramChange midichannel, midiByte3
Endif
@End "
How is that coded when it's the other way around as in CC message to PC message?
I found this in regards to PC messages
https://www.recordingblogs.com/wiki/midi-program-change-message
it lists the hexidecimal numbers which if I'm not mistaken Mozaic uses
So I was thinking that it should be something along the lines of
@OnMidiInput
whatever the code is for detecting a PC message the closest I found was this in the manual,
MIDIByte1, MIDIByte2, MIDIByte3
= MIDIByte1
= MIDIByte2
= MIDIByte3
Description: return the raw data of the incoming MIDI messages.
Regular (non-sysex) MIDI messages can either 1, 2 or 3 bytes long.
Check the event type of the incoming MIDI (using MIDICommand)
to make sure these bytes contain meaningful data.
Parameters and output:
Mozaic 1.3 of 62 90
the raw value (ranging 0-255) of the incoming MIDI event data
Example:
@OnMidiNote
vel = MIDIByte3 // the third byte contains velocity in note messages
if vel = MIDIVelocity
Log {That was to be expected}
endif
@End
and then presumably the next bit we need is this to complete the conversion?
SendMIDICC
SendMIDICC , , [,]
Description: Sends a MIDI CC message
Parameters and output:
The desired MIDI channel (0-15)
The CC number you want to change (0-127)
The value which needs to be sent to the Continuous Controller (0-127)
Optional delay (in milliseconds) before the MIDI message is sent out. If left out or set
to 0, the message is sent out immediately.
Example:
@OnMetroPulse
v = GetLFOValue 0 // get the current value of LFO 0
SendMIDICC 0, 15, v // send the value to MIDI CC 15
@End
I also found this whilst browsing which lists PC messages in hexidecimal
which I think will be useful for creating static PC numbers.
0x00 = 0
0x7F = 127
https://www.recordingblogs.com/wiki/midi-program-change-message
..........actually on reading your code would it be
@OnMidiInput
If midibyte3 = hexidecimal number
SendMIDICC , , [,]
@End
@Gravitas :
To handle a pc event in onMidiInput
If midiCommand = 192
// do program change handling
//midibyte2 has the program number
endif
It can be a bit easier to remember working with with hexadecimal numbers when dealing with
@MIDICommand.0xC0is the equivalent of 192. The MIDICommands in hex are as follows:In my scripts, I prefer
if MIDICommand = 0xC0for program change detection.So this should work no?
@OnMidiInput
If midiCommand = 192
SendMIDICC 0, 1
@End
If so let's move on to arrays and then layout.
@espiegel123
In regards to the
"If MidiCommand = 192"
Should that be "If MidiCommand = 0xC0, //and then whatever PC number it is"
and then if we're to create an Array then would we be using MidiCommand like this
MidiCommand 0xC0 [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07]
or like this?
MidiCommand[0][1][2][3][4][5][6][7]
"If MidiCommand = 192" And
“ If MidiCommand = 0xC0” are equivalent. 192 is decimal and 0xC0 is hexadecimal for 192.
I am not sure what you mean about the array and the rest.
Can you describe in natural language what you want to store in the array?
Also, don’t use a reserved word (words that have already defined meanings) like MIDICommand as a variable name.
Something like the following isn’t legal syntax:
MyVariable 0xC0 [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07]
If you explain what you are trying to do, I’ll advise
I'm not sure either otherwise I wouldn''t be asking.
As mentioned in the OP, a line of CC knobs that can be variable.
However I've been doing some thinking this afternoon and this doesn't need a layout.
It just needs to be able to translate PC messages directly to CC messages.
I discovered this for myself.
PC messages to CC messages.
I found a template inside Mozaic which uses
@onload
note 0 = PC 0
note 1 = PC 1 etc.
@End
to translate notes to PC messages
So is there a way that replicates what I found in Mozaic in regards to notes to PC messages
but going the other way and instead of using note's it uses PC messages which get translated to cc messages.
I did try this
PC 0 = CC 0
which didn't work and
I tried
PC 0 = MidiCommand 0xC0, 0
In regards to using Arrays though it's pointless for the PC to CC messages application,
I started thinking that one could use an Array to create a simple CC midi controller
using Layout 1 which has 21 knobs so I'll get back to you on that one.
@Gravitas :
isn’t valid Mozaic syntax. Can you copy/paste the exact script?
Describe in natural language very specifically what you want to happen.
For instance, if PC 0 is received send CC 0 out with a value of ___
Or it might be something like, use knobs 0 to 7 to set the cc number to use for a pc message where the pc is 0 to 7
something along those lines. I’m not 100% clear on what you want.
Keep in mind that a pc message has only channel and number. CC messages have channel , cc number AND cc value.
What is the valid script?
It’s in Midi Filters / Note to PC
I thought that that’s what I’ve been describing all along.
How to convert PC messages to CC messages?
If PC = 1 then send out CC message 1 etc, etc.
That’s why I mentioned not using Arrays in my earlier comment.
and creating something much more direct like the given example in Midi Filters.
Yup, I am keeping that mind.
@Gravitas : @Description doesn’t contain a script. That’s essentially help text describing what the script does.
The actual script is the three lines starting with @onMidiNoteOn
There is essentially one line of code. The sendmidiprogramchange command
@Gravitas : what value do you want to send for the cc?
If PC 1 comes in, what value are you sending for the cc? You need both a cc number and a cc value
If PC 1 comes in then it should go to CC 1, 127
If PC 2 comes in then it should go to CC 2, 127
If PC 2 comes in then it should go to CC 3, 127
So if it's PC 2 then it will be MidiCommand = 0xC0, 1?
and then repeat this for every instance needed?
Is there a way to create a range so that PC x = CC message x, 127 ?
x= number between 0-127
The script says:
Any time midi input come in look at the Midi Command
If the MidiCommand is a program change, send out a midi cc message with value 127 using the received program change number as the cc number.
If it isn't PC message, send the original message through.
I don't know what this means. MidiCommand is a single value that tells you what type of midi message was received.
Yup, I got that bit.
As mentioned earlier the PC messages come in two parts,
One is the part saying that it is a PC message and the second part saying what the value is?
So what I'm trying to say is using your example script
which only translates one PC message to CC message?
when PC message 2 comes in then that gets converted to CC message 2?
so in that way it can be used for assigning more PC messages.
My apologies the second part of what I wrote earlier should've been
"SendMIDICC MIDIChannel , MIDIByte2 , 127 "
However I've got the jist of it now.
We can move forward onto other things.
Apologies all for taking up the thread.
@espiegel123
Thank you for the lesson and your assistance with Mozaic.
@gravitas: I just want to make sure the script is clear. MIDIByte2 is the received PC Number. We are using MIDIByte2 (the received PC number) as the cc number. So this always use the received PC Number as the outgoing CC Number.
@espiegel123
Your script works as expected.
Tested using the Mozaic auv3 preset “Note to PC” to Mozaic auv3 with your script.
It sends out the corresponding CC message when a PC message is received.
Screenshot,
This is going to make a lot of Elektron users very happy,
Thank you once again.
You are welcome!