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
@espiegel,
I totally get what you're saying , but I didn't change it because I didn't have a suitable option somewhere. Do you think it should be like this?
nn = notenum
noten = 0
Can you explain what purpose they are playing?
Remember that we aren't solving the duplicate notes issue yet. So, you don't need anything in your script to deal with it.
Because nn and noten were already used in onknobchange, I introduced them in onload in order not to deal with syntax erreo.
In onknobchane, we need when we turn the knob, the note that is in the lastpad should not be played anymore.
And to avoid repeating the notes when we rotate the knob, we should add this option.
If the note produced by turning knob number 0 has already been produced, do not repeat it again.
I really don't know what to write anymore. If you have something else in mind, please explain with a simple example.
@pejman: as I mentioned, in previous messages, and perhaps this was not clear enough, I'd like you to remove the things you added for solving the duplicate note (repeated note) issue and for us to then talk through solving the issue.
I don't think there is any other solution that I want to talk about, what I did was the only solution that seemed to me.
I think again we had a very serious misunderstanding.
I thought you were saying delete the stuff about duplicate and find a solution and talk about it.
So I sent you this sentence : @pejman ‘’I don't think there is any other solution that I want to talk about, what I did was the only solution that seemed to me.’’
And that doesn't mean I'm not interested in talking about it.
This means that I have no other solution in mind that I can talk about.
Anyway , I apologize if I could not express my meaning correctly, I am interested in continuing the path with great interest because the subject has become more interesting to me
We just need to find a suitable solution to avoid these misunderstandings.
This is a patch that was supposed to delete a series of codes that are about duplicates
@pejman : somewhere in the recent changes the onKnobChange handler became broken. What happens for me is that if I tap a pad and turn the knobs, nothing happens when the knobs turn. If I turn the knobs before tapping a pad, the color or note number of pad 0 changes (and notes are sent out).
Before trying writing a fix, see if you can spot the problem just be reading through this line by line and imagining the program execution line by line.
Unfortunately, when I deleted the commands related to double, I forgot to put elseif Lastknob = 0 … instead of if Lastknob .
I had already solved this issue for myself. This mistake was caused by forgetfulness.>
@pejman : great!
On to the duplicate note avoidance.
Your initial attempt to solve the issue is the kind of solution that is sometimes necessary. And, after we deal with the current problem, I'll have you add some functionality to explore that case.
But, for our current situation, we already have what we need without needing to add anything in the onLoad section or adding any new variables.
The problem that we are solving is that when you tap a pad and turn the knob, we can get the same note playing several times. It's not the end of the world, but this is an opportunity to work out a solution that sometimes is important. (For example, my MPE controller sends out a zillion CC events when you slide our finger -- so many that sequencers crash -- and almost all of the events are duplicate CCs).
One way to solve the problem is that when we get a new knob value we can check to see if the note number it produces is different from the last note that was played.
If you look at the script, at the time that a knob is turned, we already know what the last note number sent was.
While there are a few ways to solve it, I'd like you to see if you can solve it by adding just two lines of code in the part of the knob change handler that handles note events.
Unfortunately, no matter how much I think and how much I review the lines, I cannot find another solution
Look at the whole script. Think through precisely what happens when you press a pad and turn the note knob.
When you press a pad, where does it get the note number from?
When you turn the note number knob, without writing code, describe what happens in the original script.
Then describe (but don’t write any code) a series of steps starting with “when the note is turned…” that you should happen when it’s fixed.
Starting with something like “when the note knob is turned, get its integer value…”
Hint: as the script is now, there is a variable that has the value of the last note sent. Do you see what it is? If not, tap a pad and go through the script line by line saying to yourself what happens. Then turn a knob and narrate to yourself every step that happens.
If you get stuck, let me know and I’ll explain.
IF ( if noten <> notenum[LastPad] ) or ( if notenum[LastPad] <> noten ) is what you mean, I must say that I tried it before and unfortunately I did not get any results.
No.
As I said, don’t write code yet.
Have you identified the single variable that currently always has the last note played?
Have you narrated to yourself by walking through the code everything that happens when you tap a pad and then turn the knob?
Yes, I did exactly what you asked me to do, but unfortunately I don't know why I can't find it.
@pejman : take a screenshot of the onPadDown handler and one of onKnobChange change.
Using the markup tools in Photos, circle lines of code related to the note number sent.
I will send you a DM with my narration of onPadDown to see if that will help you narrate onKnobChange to yourself and help identify the variable where we store the last note number sent.
Once you identify it, it is simply a matter after reading the knob to see if the new number is different from what was already sent.
Sorry for late, I was trying to upload the screenshots for several hours, but it could not be uploaded. I don't know why? until finally,
@pejman : do you see that notenum[lastPad] has the last note sent?
So, to eliminate duplicates when the note knob changes, compare the new (rounded) knob value to notenum[lastPad] which we know was the last note sent. If the values are the same, don’t do anything.
The solution I recommend will add two lines one of which is endif
No matter how I try, unfortunately, I do not succeed.
if notenum[LastPad] <> noten
if notenum <> noten
if notenum[LastPad] <> nn
.
.
.
.
endif
@pejman : without writing code describe what should happen in order with words starting with. This will help you clarify your thinking or may communicate where you are stuck
“When a new knob value is detected…”
———
Here is an example of a description of what happens when a pad is pressed…
When a pad is pressed,
Would it be possible to create a script with a singular knob that sets a delay time in between every received msg so it then sends it out with time gaps? The reason for this is that I have a synth with over 50 sysex parameters and sometimes it freezes when I’m using the randomizer function in the editor. Be glad to hear if it’s doable in Mazaic!
Yes, it’s doable.
@Mo13 has a very easy method to delay midi messages such as Notes and CC's by simply adding a delay in milliseconds as the last parameter. However the delay parameter isn't available for sysex messages.
So, it gets quite a a bit more complicated. It sounds as if the messages are getting blasted out by the editor. So, you'll have to allocate variables to store those incoming messages and then use a timer to work through the stack at intervals until they're all sent.
Yes it can be done. No, it isn't just a few simple lines of code.
@espiegel , sorry for late and Very thanks for explanation and example .
I understand the lines of code well, but I still could not solve the puzzle, and the fact that you said I only need two lines of code, one of which is the endif line, I am more confused.
1, check if the padusedflag is 0 don’t do anything.
2, If Lastknob = 0
Noten = Value knob 0
Number of note of lastpad = noten
3, If lastknob = 0
Sendmidinoteon and off via knob
Label knob and lastpad show number of note that is playing.
Please write up a for the onKnobChange handler a narrative/description like I did for onPadDown. I don't want you to put any code in the description. I want you describe things in a similar manner as I did for onPadDown
What you just posted is missing important detail that we can use as a basis for helping you to figure out what needs to be done.
Sometimes when people are new to scripting, they get focused on the lines of code rather than what is happening. I am hoping that by writing a summary that doesn't have code, I can help you see what is happening in a way that you will see where to test to see if anything needs to be done. Once you see that, we can talk about how that translates into code.
So, right not focus on what the current process is -- and then we will figure out where to add something to prevent duplicate notes.
espiegel ,
That's all I get ( narrative/description ) from onknobchange regarding knob 0.
1, check if the padusedflag is 0 don’t do anything.
2, If Lastknob = 0
Noten = ( ROUNDED ) Value knob 0
Number of note of lastpad = noten
That is, the ROUNDED values of knob 0 should be put in noten and the same noten should be put in notenum in the last touched pad
3, If lastknob = 0
Sendmidinote on and off via ROUNDED value of knob 0.
Label knob and lastpad show number of note that is playing.
If I have a miscellaneous question (outside of the issue we are working on), where should I ask to get an answer?
You can ask if here.
I’ve sent a DM to clarify. Try to summarize in natural language like I did with my onPadDown description.
This is ( or ) and it works properly .
But with ( and ) it doesn’t work. WHY ???
1, I want to if i press note 125 and 127 together, send midi cc . In this case, it doesn't matter which note is pressed first.
2, And in another case , I want use subcondition for note 127 with note 125, thats mean , if i press note 125 first and then press note 127 , send midi cc.