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.
MoZaic Script Help
Hi,
SoOOOoooO….first let me tell you what I am trying to accomplish.
I run my violin into AUM via Xtone (by Xsonic). I am using A2M to convert my audio input to MIDI. (I can use Jam Origin’s Guitar 2 MIDI, but for this very simplistic purpose, A2M works perfectly fine.)
GOAL: To play one note on the violin, and create a lush, ethereal string pad from that one note. Just one note. So if I play a D (one note - a ‘D’ note), the string pad will be something like D, F#, A, D (octave or two higher)
FYI….. the string pad is basically a chord being played on a synth (like Moog or other synths); and the string pad will be “held” or “continuously” played at a low volume; while I play other parts on top of it. KEY POINT: The lush string pad has to play continuously - like the note is held out. The string pad WILL NOT change. Whatever my first note is, that’s the string pad (chord I get) until the song ends.
CATCH: C’mon…..you know there’s gonna be a catch to it, otherwise I wouldn’t need help from the amazing forum team here. When I play this ONE single note, I am going to use a fair amount of (violin) bow, so let’s just say I am playing for 1 or 2 full seconds.
I already have - a wonderful Mozaic script that makes the one note - into a chord. It comes with the software…. you gotta luv Mozaic (see the screenshot below). I even played around with this script, and I think I understand what the code is doing. It’s not complicated.
CHALLENGE: Even though I am pulling the bow, or playing the note, or bowing for 1 or 2 full seconds or so…… I only want to capture and produce the string pad based on the ONE note I’m playing. I am or will be only playing ONE NOTE. But from a ‘violin perspective’, this one note will go on for about 1 or 2 seconds or so. The goal of the Mozaic script is to capture that one note, turn into a chord…and most importantly….. DO NOTHING ELSE or stop any other MIDI messages. For example - if for some reason, A2M or Mozaic wants to send a note off….or resend note on messages….. I don’t want any of that, because it will mess up my continuous lush string pad.
THE PROBLEM is - it’s a violin, not a keyboard, and it looks silly playing a super short note, or barely moving the bow, but yet somehow generating this lush string pad. I really HAVE TO move the bow for a few seconds for it to be plausible. Therefore - I need the Mozaic script to capture that one note up front, which it already does nicely…. and then I need the Mozaic script to purposefully ignore or not to send out ANY other MIDI messages - while I finish out playing or bowing this one note. SooOOoo if my bow pressure lightens up, if my bow scratches, if I sneeze, if a fly lands on my strings - the Mozaic script after it captured the ONE NOTE I’m playing….. will not process any more MIDI messages.
You can see the Mozaic script I have below, and the MIDI Monitor I’m using to see what MIDI messages are being sent through. The script now seemed to send a NOTE on and NOTE off, even though I held out the violin bow for about 2 seconds.
My traditional programming thinking was to capture in the script the first note played, send the MIDI notes to the synth(s), and then somehow tell Mozaic to ignore ANYTHING else (do NOTHING else). But I don’t know if Mozaic can do that? I need some type of “global” boolean variable that once set, can NOT be reset. Some special global variable that once the very first NOTE is captured, the variable is set - and then conditional language can test if the variable is sent, and IGNORE any other MIDI or anything. I am almost certain that I DO NOT even want a MIDI note off message sent, as I finish up bowing this first/one note.
PLEASE NOTE: Ahhhh man, I had to say it like that didn’t I. Once I play or pull the bow, or bow this first note for about 1 or 2 seconds…. then after the lush string pad has started, I can reach over to my iPad and “disengage” Mozaic, or a channel in AUM, or something in AUM, to ASSURE that no other MIDI messages are sent to the synth(s) that are playing this wondrous, angelic, sweet, etheral string pad :::: but until I finish bowing this first “one note”; I can’t really do anything.
These things (Mozaic, etc.) are created believing that MIDI is generated by a keyboard or MIDI controller, rather than a violin, guitar, saxophone, etc.
OK…. Sorry to be so verbose, but I needed to explain CLEARLY what I’m trying to accomplish here. @Poppadocrock and others who know Moazic…. I GREATLY appreciate your help here.
Thanks!!
AJ
Comments
Your script is receiving a midi note off and sending it and notes off for the chord notes.
There several solutions. One is to add an if statement and ignore the noteoff event that is coming in and triggering your other note off events. Then have something that sends out note off events when you have done whatever you want to do to trigger them
Perhaps I didn’t make it clear……. the string pad will play throughout the song. When the song is finished I can manually turn off the synth. I want to assure nothing else, from a MIDI message perspective, gets sent after I evaluate the first note I play, and that very first note gets sent out.
Can you set a variable in Mozaic - before anything else happens? like this
if the variable notePlayed is equal to false; (aka no note has been played since the plugin started running) then:
else (the global or initial variable notePlayed already equals true) - so DO NOTHING
You can turn on a variable when the script loads. All variables are global within the instance.
The pseudo code is
On load
Set noteStarted to no
End load
Onmidinoteon
If not noteStarted
Send note thru
StartPlayingChord
Endif
End midinoteon
On midiniteoff
//Donothing
Endmidinoteoff
On whatever event you want
Send note offs for the notes that are playing
Just pseudocode, but I think you want 'Set notestarted to yes' in there:
@espiegel123 …. YES…. I tried that and IT WORKS!!! Thanks. I’m getting close.
So here’s a problem. What IF - I play one song in the key of D. I start up my AUM app, load this session, and it WORKS…… the song finishes and manually stop the synth plugins. Then another song starts up, in a different key, and again I want to play one note, but a different note this time, and have it feed the synths.
How can I ‘reset’ the onLoad variable…..without shutting down the AUM session?
Also, you can avoid having to stop the synth by sending the note off when the host transport stops. There's an event
@OnHostStop
that will do this for you, though you will need to memorize the channel and note in order to send it. I'll give you that part of the code for no charge.I won't derail @espiegel123 's admirable "teach a man to fish..." approach any further than that though.
There's a hint in the code above about how you can solve the starting fresh on host start.
To reset, just set noteStarted back to 0 when you send the note offs. You could use a pad down to be your trigger to send the note offs and reset
Well…. Thanks everyone. I am pretty close
QUESTION - will the values for a variable set inside one function (like @OnMIDINote)…..be maintained, or have the same values inside a different function later in the script like @OnHostStop
????? - see my screen snapshot here
@Vmusic : as i explained earlier, all variables in a script are global to the script. The subroutines don't have private variables...which sometimes you need to be careful about.
The script isn’t working right…..
I don’t understand when or how it uses Hex vs. Base 10 numbers??
When I stop the host transport in AUM….. it seems the @OnHostStop is running twice?
One time it has the correct MIDI Channel (Channel 1), the other time it’s set to Channel 16?
Something is messed up “SEEMINGLY” with Hex vs. Base 10 numbers.
Can’t I just set the variable curChannel = 1 and then when I use the SendMIDIOut command using the variable curChannel it will be on channel 1? That doesn’t work though.
Thanks for explanations here on
1) Hex vs. Base 10
2) If these variables, or the values assigned to a variable inside one function (@MIDINote)….remain the same in a different later function (@OnHostStop)
T H A N K S!!
@Vmusic : you want to use sendmidinoteon
hex vs base 10 isn't relevant to anything here.
why are you setting the channel to midibyte1? Just use the Mozaic MIDIChannel variable.
Also use @onmidinoteon to catch the note on.
Have an @onmidinoteoff handler...this will block note offs from being passed through
The variable curChannel is global inside your Mozaic instance, can be accessed or changed anywhere. So if its value is changing, it's happening in one of the lines where you're assigning to it in your Mozaic code. You don't show all your code, so it's hard to tell where that might be.
In AUM you see midi channels numbered as 1 thru 16. However, if you're sending in Mozaic the corresponding channels are zero-based, 0 thru 15. So this command would send to Channel 1 in AUM:
@Vmusic : it looks like you are setting curchannel to the first midibyte of a midi message. MidiByte1 is not the midi channel.
You might find it worth your while to spend a little more time with the mozaic manual.
WhaaaaAAAAAAAAa….. there’s a manual that explains the language. What a GREAT idea!!
Let me give it a shot.
I'm surprised you got this far without the manual!
@Vmusic - best manual ever. It covers everything and is a great primer for midi in general. You're gonna love it.
YES….. @brambos - Thank you for a very lovely manual.
I GOT IT TO WORK!!!
When I play a single note on my violin, A2M converts it MIDI, and then my Mozaic script checks to see if something has been sent off to the synth or not; if not - it will send a chord (4 notes) off to the synth based off the note I played.
If I stop the transporter; the Mozaic script sends Note Off messages for all 4 notes to the synth. Once I start the transporter, and of course, play an input note on my violin - I get the lush string pad again.
Thanks for everyone’s help!!