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
Like most very cool things... it's addicting.
Most professional developers write code in their spare time just to tackle interesting problems or
make cool apps. Either way... someone can fall into this world. Problems or bon-bons or both:
solve the problem, get the treat. Classic addiction stimulus-response mechanism to train a behavior.
Who says we cannot change? Just find new addictions that are positive and lose those that are not.
I made a new script that has a lot of new ideas for me using scales and parallel harmonized
melodies.
This morning i got the following request
And i though this might be a good example for a easy-to-read and understandable development of a Mozaic script - thats why i post the answers and even the development ideas and pitfalls in this workshop thread (after asking for permission to do so).
.
The request seems straight forward and complete:
In Mozaic each incomming midi event fires several events (Other languages name this behavior ‚calls user-defined functions or subroutines) . Regarding notes, there are three relevant events:
If a script declares such an event, it will be called.
.
So in our case, the first idea might be to use the OnMidiNote event, since the script will behave the same for NoteOns and NoteOffs according to the request:
Here is this simple, but fully working first version:
But there are at least two bugs lurking in there:
Bug 1
If the incoming note number is in the lowest octave, there is no possible note below that - same for incoming notes in the highest octave. The computation of
MidiNote-12
orMidiNote+12
will overflow to an illegal value (the valid note range is 0..127)This problem can simply be solved by adding more conditions - only play an additional note, if possible:
Bug 2
Now try the simple script again
It turns out, that the simple idea on using the same code for NoteOn and NoteOff does not work. The other two event functions need to be used with slightly different implementation:
Sounds complicated, but in fact isn‘t as Mozaic already offers support for these kind of tasks:
oh this is brilliant, and makes sense. thanks so much for breaking it down and explaining what is going on. excellent lesson. your awesome !
Adding a GUI
The above working and tested script does not provide any GUI or feedback on what to except or how the current state is.
The user needs to know that knob 0 turned left means ‚no lower octave‘ and turned right means ‚add a lower octave‘. The same for knob 1.
.
First lets setup a clean GUI by setting all labels, knob positions and XY pos to better (clutter-free) default values. This is done once in the OnLoad event:
Add above, code and try again: Looks a lot cleaner now:

From there we can start to add the labels for our two knobs:
This functionality can be applied by adding
Call @RedrawOctaverKnobLabels
where needed.So we need to add that line to end of the OnLoad event and also to a new added OnKnobChange event.
This results in the following complete script with GUI
Did you notice that the for loop in OnLoad now only runs from 2 to 9 ?
I tend to write longer scripts, therefore i add some more steps right from the start to not hinder further development into a more complex script:
LatchPad padId
to toggle a pads highlighting, or even use different colors for the pads states withColorPad padId
Here a variant using these suggestions, offering an additional volume modificator knob for both added octave notes and applying pad highlighting:
Remarks:
.
So one question. how do you know which pads are in the code. all i see is Pad_Low and Pad_High.
but there are 2 high pads and two low pads. how do you assign pads and knobs in the code. for instance if i want to make another pad trigger a note 3 semitones up. how do i assign that to the right pad?
The PAD_LOW=1 and PAD_HIGH=3 constants are defined in OnLoad - all other pad commands then use these two constants. To show that these variables are constant values, the are written in all caps.
Changing the single definition line to PAD_LOW=0 will change all later code that refer to this gui element, so the pad label printing and OnPadDown functionality to the first leftmost pad.
For the current additional notes there are four things each:
To follow this lead, you need to add
all defined in the OnLoad at the same places where the other respective vars were defined.
Then look at the code for each occurence of either PAD_LOW, playLow or volumeLow you need to add code to support
you new PAD_THIRD, playThird and volumeThird.
You then will see that it will look better if the GUI is reanged:
PAD_LOW = 0, PAD_HIGH=2 and PAD_THIRD =1 looks a lot better, and fits nicely with KNOB_VOL_THIRD = 1
As we were using constants for the placement, such re-arrangement is super simple and doesn't need touching several code places
The most 'tricky' part is to store/recall this playThird variable as you need to introduce a new 'bit':
All other needed code modifications are similar to the existing code, just add a new case all using the xxxThird variables.
BTW i think that three semitones will not sound as good as adding 7 semitones .
When adding other values than octaves it might be better to apply a user-defined note scale to the computed note - which would need to add a scale knob and a root note knob to the GUI and code handling the GUI and computation code.
Ooops i just fixed a bug in nearly all the above samples:
The
if played & 2
part in the OnMidiNoteOff did send the note for the lower octave (-12) instead of the high octave - all examples are corrected now. Sorry for any inconvience this may have caused. This error class is called 'Copy Paste error' btwBeautiful lesson @_ki. That's of professional best practices in your basic code examples with:
OK... I have a new idea... smaller scripts that do useful tasks. Then run a lot of them in parallel or series or in networks.
https://www.dropbox.com/s/vm1aryuyfsc9lrf/POs.aumproj?dl=0
Download this AUM.project and after everything installs (AUM, Zeeon, FAC Alteza, Mozaic) open the AUM keyboard and press C4 a few times and wait a few more seconds... the E4 (same deal) and finally F4.
Then I can document what the 3 Mozaic scripts are doing... I call them "PAD Objects ".
I Programming an Object is a combination of some data and some behavior (i.e. Code).
The 3 Objects only differ in the "data" sections @OnLoad. The code remains the same.
OK. I had a request to change the Mozaic scripts embedded in this AUM project.
USER REQUEST #1: I would like to assign each voice a midi channel.
USER REQUEST #2: guessing rests in the sequence are achieved with a low register note (C0)?
per note length and/or tie would also be something I’d like to add.
is really trivial.
requires some explanation of how to handle sequence playback (skip an implied beat or implement a more complex rhythmic scheme. Note length and termination which is implied in a tie. All related.
I need to go and get the code... be right back.
.
Here's the code for what I call a "Drummer's Pad Object".
@OnLoad
@End
@OnMidiInput
OK Request 1: MODIFY THE MIDI CHANNEL for EACH INSTANCE.
In AUM, You don't need to do this. You can configure each MIDI FX instance to it's own target AUv3 app.
But we can change the code to allow this:
Add a variable for the Midi_Channel in the @OnLoad section:
Midi_Channel = 1
And modify all the SendMIDINote commands to specific the channel requested:
SendMIDIOut MIDICommand + (Midi_Channel - 1), Note, MIDIVelocity, new_delay
SendMIDIOut MIDICommand + (Midi_Channel - 1), Old_Note, 0, new_delay
Mozaic counts channels as 0 to 15 but we'll allow the user to think of 1-16 and just subject 1 on output.
that’s helpful. there’s an edge case in AUM when routing multiple MIDI FX to a single AUv3 app (multitimbral). the midi filter in this case would me more granular on the output of individual FX.
@McD Thought I’d respond here rather than my video thread.
Interesting concept . I like what E4 is doing.
Issues:
Constant hung notes. I’ve seen other Mosaic programmers talking about preventing this.
I’m not a fan of the black box concept. I would like to be able to adjust what’s going on inside the plug in (scales / root note/ etc)with pads and or knobs without having to go in and change code.
Keep it up!
I can't unpack this statement yet...
multiple MIDI FX? make me a list with some description
What does MIDI Filter man to you? granular output? MIDI is predicatable so I don't get this either.
I owe you a couple more answers too of "rests" and "ties". I need to create some script variations to post the answers.
AUM’s midi channel filtering is at input. thus every input source is subject to that configuration.
sorry, should have made it clear I was talking about channels.
I tend to just leave AUM set to OMNI/all MIDI channels open and then select the MIDI FX apps I would like to be active for a given app. Every MIDI FX to App "wire" is vital between the 2 and not subject to any MIDI filtering that way. So every MIDI FX message can do out on channel 1 but only those configured to accept that app will get the notes being sent.
Outside of AUM I could see the benefit of pre-coniguring MIDI FX to output on a given channel so you could use the MIDI standard to manage routing.
https://forum.audiob.us/discussion/34071/aum-midi-mute-best-hack/p2
@wim was talking about stuck note prevention in this thread.
Hope this helps.
I get where you're coming from. But this particular comment actually has it back-asswards. Being able to go directly to the code is the opposite of black box. Having to adjust pads and knobs is working with a black box. Whatever software you're using, there is always code behind those pads and knobs. If you can't go in and change the code directly, then you're working with a "black box", fiddling with the outside with no idea of what's inside. If you can go "inside the box" to view and change the code, then you have full transparency, full power over your tools.
Of course, I do get that if you don't understand the code then it may as well be a black box. (And I get that your definition of "black box" may be a little diffferent.) But coding in Mozaic is pretty easily learned by anyone who's already familiar with the midi concepts. Just offering up a little different perspective. . .
trying to reverse engineer a Mozaic script is giving me insight into how fiendish code is. everything’s dependant on something else!
One out of three is pretty good! Batting 333.
The E4 sequence is the most musically interesting for sure. It does up and comes back down
based on a C Harmonic Minor Scale.
C4 just goes up 2 octaves of the diminished scale... yawn. But good for foggy moods.
F4 only has 3 notes spaced by perfect 5ths. Good for a drone.
Each is intended for a different use case... melodic, mood, drone.
This is great feedback from someone that is a master of Drum Pad Performing.
If you haven't seen Hynopad's Videos please check them out:
https://www.youtube.com/channel/UC8Wh4RnkHf96cbpQthBwhAw/videos
One out of three is pretty good!
C4, E4 and F4 are all the same script with changes in the data:
So, you can change the behavior by:
ACTIVATING NOTE: Base_Note
MELODY: Sequence[] Array
SCALE: Scale[] Array
LENGTH OF MELODY: Length (I could also count the valid notes I suppose to save a step)
SPACE BETWEEN NOTES: delay (I think I'll ad some randomization here or maybe a Timing[] Array
Octave: Move the melody up/down octaves for bassline versus bells
Sure. I want to start with the fewest Cod lines possible to get more people to "fork" the code and add cool features and share them here. I can add a little function to delete all note outstanding and should because when it happens it's annoying. It usually happens when the targeted synth gets overloaded and misses a note off event.
This is an attempt to help more people stop buying more sequencing/generator apps when they are so trivial to make yourself or get someone to code you one. But begging app developers to add special tweaks for your own worklflow also works well. Still... I have over $100 in apps that just output interesting MIDI patterns... most bought before Mozaic gave me a better way to save the money and get more control.
I would like to be able to adjust what’s going on inside the plug in (scales / root note/ etc)with pads and or knobs without having to go in and change code.
Adding 3 Knobs for these variables is also pretty trivial:
Root = 0 (range +/- 12 to allow for transposing keys)
Base_Note = 60 (range from 36-72 - C2 to C5)
delay = 600 (range 10-1270)
Octave = 4 (range 1-7)
Setting custom Sequences and Scales can be input from PAD's too.
So, requests for essential new features.
1.Function to clean hung notes (use the Mozaic NoteIndex Array like @wim does)
Add Knobs for:
Root = 0 (range +/- 12 to allow for transposing keys)
Base_Note = 60 (range from 36-72 - C2 to C5)
delay = 600 (range 10-1270)
Octave = 4 (range 1-7)
Use PAD's to input custom Sequences and count the length.
Does anyone want to "fork" the script and add one of more of these?
Here's a starting Script to fork:
@hes said Of course, I do get that if you don't understand the code then it may as well be a black box. (And I get that your definition of "black box" may be a little diffferent.)
You’re right. I used the wrong term but the blank outer interface of the device I was describing might as well be a black box to me. I kind of thought the knobs and pads were there to help people like me ( non coders) program certain parameters (if available)of the device to suit our needs so we didn’t have to go “under the hood “. I hope this doesn’t offend the “makers” .I think this outer UI is important to some of the non coding “users” out there. We rely on your expertise to make these incredible devices but feel like we also want to have some of that control and flexibility for ourselves without getting grease on our hands.