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
Hi @wim
These are the cases where I used else and the script didn't work as I expected.
Because I thought that when I use else in relation to if linkstate... there is no need for condition if linkstate … after else
It was a very valuable experience that I got from you again. Thank you very much for answering me. ❤️
Hello .
Please help.
I send different values with CC# 14 (modecc) , BUT Where ( //do something if x = 3 for example . ❓❓❓ ) I expect the correct value to be displayed, the number zero is displayed instead of the value sent. Why ?
@OnLoad
speedcc = 13
modecc = 14
x = 0
resetmode = 0
countnote = 0
countcc = 0
@End
@OnXYChange
resetmode = Round TranslateScale (GetXValue), 0, 127, 0, 1
@End
@OnMidiCC
if MIDIByte2 = modecc
x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7
endif
if resetmode = 0
if MIDIByte2 = speedcc
if MIDIByte3 > 0
Inc countcc
elseif MIDIByte3 = 0
countcc = 0
endif
endif
if MIDIByte2 = speedcc and MIDIByte3 > 0 and countnote = 1 and countcc = 1
//do something if x = 3 for example . ❓❓❓
log x
endif
endif
if countnote = 0
countcc = 0
endif
@End
@OnMidiNoteOn
if resetmode = 0
countnote = 1
endif
@End
@OnMidiNoteOff
countcc = 0
countnote = 0
@End
@pejman, I see numbers other than zero in the log when I try it.
Also - just a suggestion (see spoiler)...
It will make your scripts much easier to write and debug if you make use of indents.
is so much easier to follow than
@wim , I send with same format as you. But I don’t know Why are they lined up in a column when i use spoiler .
remember ... put three back-ticks on a line by themselves before and after the code to avoid having the forum reformat your code.
@pejman : I suggest you add logging to where you assign x to make sure it is being triggered when you expect. I would log both original cc value and the x value after it is calculated .
@espiegel123 . Hello espiegel .
I have used a lot of logs per line but deleted them when I wanted to post them. For checking cc,s and countnote and count cc . In each lane. Everything seems right to me.. Except exactly where I expect it.
For example:
@wim
I use steppolyarp app for sending cc , in the first step i create value 6 for x , but log show value 0 insted of 6.
@wim
>
Add the log message back in for your x assignment. Make sure to also log the raw midi value you receive.
See what the log says after steppolyarp sends the cc
You probably should also log information about what was received at the very top.
Do that then screenshot the log that results when steppolyarp sends the midi cc
@espiegel123
Is that exactly what you mean?
@espiegel123 .
The second log was read first after lodging script. Why?
That log seems to show speedcc arriving before modecc is set
As I said, I suggest logging the received midi cc number and value at the start of the routine. So that you can see what events are arriving and their order.
@espiegel123 .
But speed cc is higher than zero.
@espiegel123 .
Sorry, I sent this post by mistake. Please give me another chance.
Speedcc being greater than 0 has no impact on the x value.
What are you expecting?
X only is greater than 0 if the last value of modecc is greater than 127/7
You said:
“ That log seems to show speedcc arriving before modecc is set.”
So i send one screenshot from speedcc .
@espiegel123 .
@pejman : what are you expecting to happen in your code that isn’t happening?
I expect it to show log the correct value , when steppolyarp is on step number 1 in this section that I show in the screenshot.
I think you are either not understanding your code or the events you are sending are different from what you think. It would help you track down the problem and helps us understand what you expect if you were to to something like the following:
Step 1:
Write down all cc events you are sending [cc number and value) and the value you expect x to have before and after each event is sent
Step 2:
Add the log line that I have suggested that logs each event received as the first line of your cc handler. No conditionals (if clauses} needed. Something simple like:
Log {cc received. #:}, midibyte2, { value: }, midibyte3
Step 3: run steppolyarp and screenshot the log. Compare the log to the list of events and x values you wrote down in step 1. Circle anything different from what you predicted
I also suggest that you change the text printed in your log to be more meaningful. “Second log” isn’t meaningful. Something like“ new x value” is more meaningful to someone looking at the log.
@espiegel123 .
Thanks for explanation.🙏
I will definitely do the things you mentioned and send it to you as soon as possible.
And I'd rather check with you one by one before I try to do everything at once.
Hi @espiegel123 .
You wrote: Step 1:
Write down all cc events you are sending [cc number and value) and the value you expect x to have before and after each event is sent.
Is that what you mean regarding Step #1?
@OnMidiCC
// 🔺CC#13 value 20 . CC#14 value 100
if MIDIByte2 = modecc
x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7
// 🔺i expect here value of CC#14 = 100
endif
if resetmode = 0
if MIDIByte2 = speedcc
if MIDIByte3 > 0
// 🔺i expect here value of CC#13 = 100
Inc countcc
elseif MIDIByte3 = 0
countcc = 0
endif
endif
if MIDIByte2 = speedcc and MIDIByte3 > 0 and countnote = 1 and countcc = 1
// 🔺i expect here if value of CC#13 > 0 SO log shows translated of value 100 of value associate CC#14
log x
endif
endif
if countnote = 0
countcc = 0
endif
@End
@pejman : for step 1, I did not intend for this to be added to the script. write down on a piece of paper the cc events you will send in the order you intend to send them . For each event also write the value of x you expect before the event is processed and the value after
Maybe have column headers like
X-start……… cc number……cc value…..x-after
@pejman : the goal is to compare what you expect to happen to what happens. If your list is different from the log, we can then figure out what the issue is.
You wrote:
For each event also write the value of x you expect before the event is processed and the value after
Can you please explain what you mean by befor and after event?
X-start……… cc number……cc value…..x-after
By pre-event, do you mean before if?
And after the event, that is, after the if or after the and if.?
I mean when mozaic receives the event what will the value of x be before the cc event is called . And after is the value of x after all the code in the cc handler has been executed.
@espiegel123 , Ok , I did all 3 steps.
I think I understand what you mean.
From these steps, we can conclude that I should not expect X associated with modecc ( cc# 14 ) to show the correct value after if MIDIByte2 = speedcc with cc#13.
@OnMidiCC
//Log {cc received. #:}, midibyte2, { value: }, midibyte3
//The log shows what I expect.
if MIDIByte2 = modecc
//x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7
//Log {cc assign to x. #:}, midibyte2, { value: }, midibyte3
//The log shows what I expect.
endif
if resetmode = 0
if MIDIByte2 = speedcc
if MIDIByte3 > 0
Inc countcc
elseif MIDIByte3 = 0
countcc = 0
endif
endif
if MIDIByte2 = speedcc and MIDIByte3 > 0 and countnote = 1 and countcc = 1
log {x after : } ,x
//X is not what I expected.
endif
endif
if countnote = 0
countcc = 0
endif
@End