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
But to answer my original question, I cannot insert a variable directly in an array, correct?
Your original solution is to replace/change the sysex array directly with sysex[i] = new value
I was thinking at appending to the end of the array with CopyArray to get the final result.
Both valid. I appreciate the different view/angle/approach.
Correct. You can't insert a variable directly in an array.
Yes. But
=
assignment will only work for a single position/value.Yes, you can use CopyArray to copy a whole array into another array, or to copy a portion of an array into another array at any position. The manual explains it a lot better than I can.
Hi,
Long time since my last attempt to write any script, so quite rusty...
Can’t wrap my head around a simple (I guess?) task atm...
Basically lottery pulling... say I have 10 numbers ‘in my bag’ and each bar I pull 1 number out (without putting it back)... how do I make sure that after 10 bars my bag is empty?
Hope my description is clear enough and that help is on the way
Thanks in advance!
Numbers from a sequential range such as 0-9? Or a list of numbers such as [2, 14, 12, 8, 3, 4]? If a list, is there always a known amount of numbers?
Both, sequential range (0-9) and the amount of numbers is always known (10).
The only ‘rule‘ is that same number cannot be picked twice, so after 10 picks all numbers get picked.
There is more than one way to do what you want, but here's one kind of quick and dirty way that should work.
Can’t you use an index to a location in the array and assign a variable there?
MyVariable = 88
MyArray[44] = MyVariable
Log {MyVariable is }, My Variable, {MyArray at location 44 is }, MyArray[44]
——-
Log windows shows:
MyVariable is 88 MyArray at location 44 is 88
So, If there’s a large block of sysex data you could just punch in the variable data to precise locations.
Just remember Arrays count up starting with location “0”.
So, MyArray[44] is the 45th element of the array.
I tested it with this script:
Log output On Load shows this:
REMEMBER LOGGING STARTS AT THE BOTTOM AND ADDS OUTPUT GOING UPWARDS:
10
9
8
7
99
5
4
3
2
1
10
9
8
7
6
5
4
3
2
1
Nice!
Time to pimp it up!
Thank you 😊
Is there a script for strumming chords, preferably that would work in BM3? Something similar to what FL has where you can choose up, down, random and strum length?
Will learning Mozaic help you learn other code? Or could it be considered an introduction to coding in any way?
I’ve been toying with trying to learn for awhile and it recently occurred to me that maybe learning Mozaic would help give me an intro to coding? I know it’s different, and simplified in a sense, but I'm speaking more generally could it be a decent way to start learning code?
@Poppadocrock Yes, definitely. I used it to learn coding. I had tried a few different coding courses before Mozaic was released, and some definitely tried to teach similar concepts. But I just never felt like I could do it, until I tried Mozaic.
Coding courses are often more linear, so if you're stumped, you can't set aside a project and decide to return to it later. FreeCodeCamp allows you to jump around during its programming exercises, but a lot of them use built-in JavaScript methods, which adds complexity, or they're more "brain teaser"-esque, in the sense that you're tasked with writing a short function that wouldn't be part of a useful program, even if it might utilize a similar concept.
Most other coding courses are geared toward finding a web development job, so they don't really develop the ability to build any random idea that you might have; it's all about making forms that populate a database or retrieve data from it.
My first Mozaic project was a midi echo. My second Mozaic project was to automate the XY pad cursor along vectors, and I felt like that was where I started to "learn programming".
Here's how I learned. I would maintain a list of project ideas, and then I would just pick an idea that seemed challenging but not too challenging, and then I would try to write the most difficult part of that program. Then I would usually leave the program unfinished, and move on to another challenging idea.
Some of the Mozaic scripts that I have on Patch Storage are buggy and amateurish, but I'd like to update them at some point, and release more. I've been focused on memorizing chords and scales lately.
It would definitely lay some groundwork for learning to code AND don't be intimidated. The manual is really good. In 30 to 60 minutes, I think you will learn enough to write some simple useful utilities and customize simple scripts.
If someone is intimidated by the notion of coding, one can think of Mozaic as not being coding.
My first reaction is ... not so much, if you're interested in getting into development in modern object oriented languages such as Swift, Objective-C, C++, or even Java. But, yes, it's a relatively pain-free way to get used to some basic things such as variables and arrays and event driven programming.
Mozaic is similar in syntax to an old programming language called Pascal. It lacks some fundamentals of modern languages such as parameterized functions, classes and inheritance. It deals with only one variable type (numbers) and only with one-dimensional arrays.
Maybe that's good, letting you get your feet wet without too many overwhelming distractions. But it's quite a leap from there to object oriented languages.
Let me put it another way ... you could become an excellent Mozaic programmer but still be utterly lost if you walked into anything more than a beginner programming class. Just my opinion. ymmv.
Sure is fun and satisfying though! And you get to use what you make. I recommend anyone interested in music and in learning a little bit about programming.
Do you mean strumming incoming chords played on a keyboard? Mozaic doesn't lend itself well to that. You might do better looking into purpose-built apps such as MIDI Strummer and RhythmBud.
@wim I mean like how I currently use your randomized script. I paint chords in on the piano roll and then I add Mozaic Ranbo to randomize the timing and velocity. I’d like to do the same thing except get a full strum down or up. To get around not having this functionality, I play the chords in strummed on my midi keyboard (Poorly) and them manually edit further to get the speed of the strum where I want it. I’m more proficient at painting in chords than playing them so I’m hoping for something that all owes me to paint them in and then add an effect to to strum them. FL Studio on desktop has a strum effect (Alt S) that you can apply at different degrees. I wouldn’t even want to use midi route to actually move the midi notes visibly on the piano roll, I just need them to sound strummed and then I can sample to audio on another pad. I use your Ranbo script like this currently.
Sure, I get it, but I just don't believe Mozaic is suited to trying to do that. FL Studio isn't applying that effect live, it's looking at notes already recorded in the piano roll where it's easy to identify what a chord is and adjusting the timing from there. Incoming live chords are a problem to detect because you can't tell on the fly what the full chord is without introducing at least some delay to "wait" for notes and make decisions. There's been lots of technical discussion on this since Mozaic came out, which I don't have the time to go into now. It's my opinion that this just isn't practical to do in Mozaic.
Ranbo just introduces some random delay, velocity change, and probability to incoming notes individually. It has no concept of trying to identify a chord and act on it.
The Chordulator does have some nice strumming and other effects, but it's not acting on detected chords, it's generating the chords itself from single notes.
I think most beginner programming now is taught using Python, which would be a natural progression from someone who starts with Mozaic. Mozaic is a specialized scripting language (laser-focussed on midi), Python is a general purpose scripting language, so a natural progression. Moving from Python to a compiler-based environment (like Java, C, Objective-C) is also a pretty big step.
Yeah, the nice thing about Mozaic is a typical use case (and good beginning use case) is to solve a relatively small and well-defined problem, something that will take from, say, 5 minutes to an hour of programming. And as part of solving the problem you (1) use programming skills and (2) probably learn something about midi, too, which will help generally when doing anything in computer music.
Mozaic is pretty ok as an introduction to programming, but I haven't said "I wish Mozaic had String variables" for a while now, and this seems like the perfect opportunity.
Another way of commenting here is for sure it covers some of the basics, control flow, functions (without parameters) etc... but it is also so focussed on MIDI it is also missing other simple characteristics of a programming language that you'd expect even in BASIC from 40+ years ago.
The focus on MIDI event handling/creation is the point.
But Mozaic has a learning curve. But most of us just look up that hill and turn around and buy another app. As an owner of Drambo, NanoStudio 2 and several other DAWs, I know I need to provide the motivation. Sometimes I just don’t put in the effort after a few steps up the hill. Next…
For those that like solving programming problems, Mozaic is a real kick and offers wonderful challenges. You can see a demo of some new clever hardware sequencing app and consider leveraging it’s behaviors into a Mozaic script.
“Swift” is probably the right choice to have more control of Strings and their presentation in an app. Swift makes you own the
User Interface so a lot of time is spent on non-musical problem solving and you have to resort to the App Store to distribute the solutions.
As designed Mozaic can provide hours of fun building MIDI processors based on a very robust engine to manage the truly difficult parts.
Using the Logging and Description windows you can generate a lot of text and also label items in the optional GUI windows.
I get the impression that @brambos knew his event processing engine needed to make MIDI “Job 1” and not tack on extra language statements managing computational manipulations of text that might compromise the mission.
Thanks so much @Skyblazer @espiegel123 @wim @McD @belldu @hes @king_picadillo for the recommendations, and information. I was thinking in terms of structure, format, basic principles and ideas, not necessarily the code itself, but an idea of how code works. The order of things. Very Intro, 101. I’m not intending to do a deep dive into Mozaic just use it as a fun way, at my own pace to “get my feet wet” as @wim said with the added benefit of hopefully creating some useful results to share on Patchstorage. Then consider bigger and better from there.
Mozaic’ s code blocks are fired off when incoming events happen:
A MIDI Note or CC
A User taps a Mozaic GUI Pad
The DAW metronome pulses
A timer you set goes off
This is radically different from typical beginner’s programming patterns which is typically more like a recipe of steps:
1. Print question to user
2. Read user response
3. Calculate math with users input
4. Print results
5. Go to 1 or more likely 1-4 in a loop structure
These recipes might appear in Mozaic code is response to an incoming event.
If you spend a lot of time making music then Mozaic is probably worth looking into and there’s a lot of help here to solve problems as you go.
The List of Mozaic events are:
Events:
@OnMidiInput
@OnMidiNote
@OnMidiNoteOn
@OnMidiNoteOff
@OnMidiCC
@OnAUParameter
@OnNewBar
@OnNewBeat
@OnMetroPulse
@OnTimer
@OnHostStart
@OnHostStop
@OnLoad
@OnPadDown
@OnPadUp
@OnKnobChange
@OnXYChange
@OnPedalDown
@OnPedalUp
@OnShiftDown
@OnShiftUp
@OnSysex
@Description
Good programming problem to get started could be:
Make a MIDI Echo script (repeat Incoming Notes with a fixed delay, softer each time.
@Brambos knew users would need some help and he wrote a manual that teaches you how to write scripts as he covers all the Mozaic features:
https://ruismaker.com/wp-content/uploads/Mozaic.pdf
I just went through a Python scripting tutorial that is closer to what a college student might get in a first language class:
https://futurecoder.io/course/#toc
Thanks for the headsup