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.
Anyone coding Mozaic here that I can chat with?
I've got a plan that I need to write a moderately complex Mozaic script for, however LLMs seem to have gotten a lot worse at it since last time I was developing with it (and it was pretty bad then too, with most syntax being invalid).
I'm going to figure it out/learn myself as it's some pretty exciting utility that's related to interfacing with other music based code I've written (https://github.com/OscarSouth/theHarmonicAlgorithm).
Anyone out there who's into Mozaic script that I could chat with and bounce ideas off while I develop?
Let me know
Comments
I'm up for it. I'm not always the best coder, not being trained as a programmer, but I have a fairly good grasp of Mozaic.
I'd be impressed if Mozaic can do this, I'd love to know if it could. While not attempting anything this ambitious, I've run into limitations with Mozaic with its math functions, memory options - arrays are somewhat limited, and the length of scripts. Suggest you take a look through the manual: https://ruismaker.com/manuals/mozaic.pdf
One of the things i do to mitigate the script limits and overall complexity in a given script is to use midi cc to trigger actions in other scripts, but the other stuff is harder to mitigate. Good luck!
Do you know if there's anything like a discord for mozaic? The help chat is pretty good actually. Want to get better at it so basically looking for places/people to engage in discourse with in the process of improving.
Cheers
Have read/forgot/reread the manual a few times over the years. I reckon what I'm planning to do will be pretty easily doable -- my Haskell codebase linked there is another app that generates MIDI streams, so Mozaic will be used to intercept those streams and additional streams from live instruments, merging them with some logic and curation into one stream.
I don't think anything I'm doing with Mozaic is particularly mindblowing, I'm just not that experience with it.
Pretty much want to take in one stream representing a live instrument and another that sends blocks of pitches. Each block persists until replaced by a new one. I'll use these inputs to output a stream of MIDI note events from the live stream which are scale-corrected to notes present in the blocks of notes. Main difficulty apart from not remembering much Mozaic is that I'm writing it for a few different input methods that have different formats/playing limitations, so lots of nuance and playability to think about.
I don’t know of a Discord. There is a large library of Mozaic scripts on patchstorage.com between that and the help line thread here, you should be able to get on track.
I've had a look through them and isolated a few useful ones. They'll become more useful as I get more into the flow of reading the syntax/logic. You know if it's possible to read those scripts any easier way than downloading to my ipad and loading into Mozaic?
I don't think there is, but it's a big world out there.
Cheers, yea just scoping out the environment. Happy to jump on a some kind of IM if anyone wants to talk Mozaic in a more ad hoc manner (anything I put in a forum thread gets thought through a bit more) -- I'm going to be pretty limited for the time being while I chip away at understanding on the thing I'm working on right now.
Finding patches is a lot easier using the Available Mozaic Scripts wiki page than on PatchStorage. Loading them into Mozaic is the easiest way IMO. The files can be directly opened in a text editor, but contain all the variable states in binary, so editing is just as much trouble.
My typical MO is to use Textastic on my MacBook for editing. I enable Handoff for a shared clipboard. Then it's just copy and paste between the iPad and MacBook as needed. It's very quick as long as I don't paste when I'm supposed to be copying. 😂
The amazing @_ki has provided a syntax extension for Textastic that is hugely helpful. https://patchstorage.com/mozaic-language-support-for-code-text-editors/
For your dynamic note quantizing, https://patchstorage.com/chord-scale-quantize/ might have some code that's applicable.
Thanks, I'll have a look at that script in particular.
I have sublime text set up with the Mozaic syntax, and another app called AirDroid which makes it really easy to put stuff onto the iOS clipboard. That's alright for editing.
That explains why LLMs haven't got a clue about Mozaic then -- there's no large publicly available corpus of code for webcrawlers to find.
Scale correcting notes is very easy in Mozaic.
There are some built in functions to do this, like 'ScaleQuantize'.
In the example below, when it receives a Midi note through the @OnMIDINote event, it quantizes it, then sends it out.
So perhaps you'd set your own CustomScale then just use ScaleQuantize.
You can do what you want in the @OnMIDI... events of course, so if you have a particular method of altering the note, perhaps with a randomiser or similar then you can. It's also possible to use timers to generate notes without a corresponding @OnMIDIInput event trigger.
When dynamically quantizing notes, one thing to watch carefully for is being sure to quantize the note-off properly. If the scale changes while a note that has been quantized is held and then the note filter changes you have to be sure you don't quantize the note-off to the new filter.
Thanks all -- this is all really useful and I'll keep it all in mind.
Right now (due to not being very fluent with Mozaic at present) I've broken out 4 bits of key functionality that I'll need, and I'm creating them all in isolation. I'll later combine them once I have their internal logic working. I've got #1 and #2 sorted but the midi note off part of #3 has obvious logic issues and my brain is too tired to debug it now, so I'll have to wait for tomorrow.
Here's what I've done so far:
I'm sure alongside the non-functional logic in #3 there I'm also doing things in wrong, unoptimised or unintuitive ways. Trying to approach the problem as literally as possible on the first pass and hopefully I'll reveal some ways I can do things better as I learn Mozaic better.
@OscarSouth : fwiw midibyte3 will always be less than 128. There isn’t a need to test for that in app1
Without having given more than a cursory glance at the Note-Off code, I'll mention my usual approach.
The NoteStates array has one slot for every channel and note combination. So, when a note-on arrives, I save the note number that it was quantized to in there. (If not quantized then I just store the original note in number.)
Then whenever a note-off arrives, rather than re-quantize it, which by now could be wrong, I look up what the note-on was quantized to instead.
Edit: Wim answered at the same time as me, but the function names that access the NoteStates array are below :-)
I didn't read through the logic in detail, but it looks like you are storing the note states. This is useful as Wim says so you don't end up with stuck notes, and Mozaic may have something to help there too so you can avoid your own arrays. There are SetNoteState and GetNoteState commands that provide access to an internal 2d array (i.e. a value for every note) specifically for this kind of purpose... Also, to add to what espiegel123 is saying, @OnMIDICC is an event that only receives MidiCC messages, its pre-filtered. @OnMIDIInput is the 'parent' event that receives everything, so you don't need to worry about values being out of range or a sysex coming through the @OnMIDICC event.
Cheers for the feedback all, really useful and valuable stuff. Picking this up again today with a fresh mind
This is really great, thanks -- might not have noticed it! It's not the exact logic I planned (correct to closest note, prioritising higher) but it's close enough to work with less implementation and I can revisit that logic manually later.
Think I got the code I was working on above sorted:
I think I have enough knowledge accumulated now to have a go at building the full app --
Here goes!
Simple Scaler has a routine for closest / prioritizing higher amongst it's other quantizing options in you want to compare approaches.
OK here's the monophonic version -- seems to be working.
This specific version is intended for use with a Theramini -- the Theramini will scale lock itself to whatever chord is being played on the polyphonic note input on the same channel. It's intended for the Theramini to use a drone sound with some glide, ideally. Alternatively, you can play chords on a keyboard with one hand and play a melody that locks to the chords using the mod wheel.
Please let me know if there are any obvious mistakes, oversights or bad practices here
Logically it looks ok. Stylistically I think your up to the window dressing stage. I always wrap log messages in an 'if _logEvents = true' statement and then declare and set the _logEvents variable in the @onload event. It's easier than commenting and uncommenting log code. Other than that, I'd recommend putting in some code for @onhoststop, perhaps a midi panic of sorts. Quite a few folks use the @onshiftdown ui event to stop any notes as well if things go awry.