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
@pejman : please reply to this message and add your answers . Make sure to answer each question.
Let’s start with trackSelected. There is a comment:
“//Update the pattern pads so the track’s associated pattern is pink (and all others are white)”
How do scripts store and recall information?
How does your script know which pattern is associated with a track?
—-
SelectPattern:
You said the following did not work:
“ ColorPad selectedtrack[selectedpattern], selectedpattern”
What happened?
“It doesn’t work “ is not an answer. From now on, if something does not work, explain what you mean. Always make sure to check the log for messages from Mozaic.
@espiegel123
Via variables and Arrays. And saving to call @xxxxx and recall with @xxxx
With put Array : selectedtrack = [0,1,2,3] in @Onload Which I didn't do and it just occurred to me
And With using : selectedpattern[selectedtrack] In @ trackSelected .
Log Shows number of pads instead of pattern number , after that i touch pattern 6 and then touch each of tracks 1 to 4 , log shows 9 insted of 6 Because we have not defined the number of patterns for pad numbers 4 to 15
In addition after touching pad num 0 , pad num 0 , It turns pink.
Anyway, I tried these tests through trial and error without any knowledge or understanding of the subject, Just a guess
In addition, I did not do anything special in the @patternSelected section to see the results of my tests because these two sections/handlers are related.
See comments inline and then at the end
I am not sure what you mean by "saving to call @xxxxxx" and "recall with @xxxx
Can you explain?
Variables (which includes array) is the right answer for Mozaic. So, anytime you have information your script needs to "know" or remember. You need a variable (which might be an array) from which to get the information. And if you need to save information to recall later, you store it in a variable.
Read the paragraph a few times -- maybe create a page somewhere where you write down programming tips. This is an important one for you. You will want it available to remind you until it is obvious.
I guess we should wait to look into this after you have trackSelected working.
We have to figure out so that you aren't trying things without any knowledge or understanding. I am not sure yet what you aren't understanding, but we need to figure that out as this is fundamental to writing any scripts. So far, the script requires the same level of knowledge as the previous exercise we did.
Let's get trackSelected working and then address what you aren't understanding with the pattern list.
In trackSelected, what information does your program need to know or remember to implement this:
"//Update the pattern pads so the track’s associated pattern is pink"
If you have any idea about that, add it to the script.
If you try some things and they don't work, please keep track of them and create a post for anything that you try that doesn't work if you don't understand why it does not work.
@espiegel123
you wrote: I am not sure what you mean by "saving to call @xxxxxx" and "recall with @xxxx
Can you explain?
Like informations that we put in or ( called ) : call @trackSelected and recall all of same information in @ trackSelected.
The @xxxxx isn’t relevant. In Mozaic, all variables in a script are global (available anywhere in the script).
@espiegel123
I could not move forward even a single step .please a little guidance , about trackSelected.🙏
@pejman: we said that variables hold information.
what information does your script need to know what pattern is associated with the current track?
In the previous project we worked on, how did the script know what note was associated with a pad.
@espiegel123
@onload
notenum = [49, 51, 54, 56, 58, 61, 63, 66] ???
@pejman: in that project, what was notenum’s role?
Does that give you any ideas about what your current project needs?
@espiegel123
in that project, what was notenum’s role?
Saving/putting notenumber in array cells for pads
@onload
Selectedpattern = [4,5,6,7,8,9,10,11,12,13,14,15] ???
@pejman: please answer the question I asked:
What is the role of the notenum array in that project?
====
Some additional questions:
You wrote: “ Selectedpattern = [4,5,6,7,8,9,10,11,12,13,14,15] ”
How does this relate to associating a pattern with a track?
=====
We said you need something to provide/remember which pattern is associated with a track.
How many tracks are there?
You need a way to know when track 0 is selected, what is the pattern. When track 1 is selected, what is its pattern.
How might your script keep track of the pattern for track 0, the pattern for track 1, etc
@espiegel123
I have edited my last post
Please create a new post rather than editing the past one. It makes following the thread difficult/confusing. I don’t even know which post you mean.
You have also left the questions I asked unanswered.
Saving/putting notenumber in array cells for pads
4 track
Selectedtrack = LastPad
Selectedpattern[selectedtrack]
See comments inline:
I don't know what this means. Notenumber is the array.
Its purpose is to associate pads with the notes they send out. So that the cell number (the index) corresponds to pad numbers. Cell 0 has the note for pad 0, cell 1 has the note for pad 1.
In the new project, you need something similar. You need a variable that associates each track with the its pattern.
So, you need something that holds the pattern number associated with those four tracks
Try it, keeping in mi d what was said above.
The issues you mentioned here are exactly the things that I know should be done, but I don't have a solution to write the codes for them.
I don't know how and where to use the codes that I wrote for you as an example, I just wrote them to see if they are approved by you or not.
I think you need to give me more clear guidance Please.
@pejman : since there are four tracks and each track has one associated pattern, you will want to use an array with four cells (slots).
Let’s call it trackPattern
trackPattern[0] holds the number of the pattern associated with track 0
TrackPattern[1] holds the pattern associated with track 1
Initialize the array with the pattern you want each track to have.
@espiegel123
@pejman:
you have proposed adding to onload:
trackpattern = [0,1,2,3]
in @trackselected there are these comments:
//Update the pattern pads so the track’s associated pattern is pink (and all others are white)
// NEEDED: we need to add the code to update the pattern pads
So you need to retrieve the patternnumber from trackPattern and use that to set the color of the appropriate pattern pad.
We will also need to take care of turning the previous pattern's pad to white. But first, add the code to set the trackpattern's color.
The process is similar to how you got the notenumber from the notenumber array. You may want to studynthe previous example carefully to remind yourself how that worked.
@espiegel123
I really don't know what to do, I feel that the matter is getting more complicated for me
@espiegel123
Unfortunately, I can't find any connection between this project and the previous one to find a solution
Please give more clear guidance again.
@pejman
In the previous project, when a pad was touched, you were able to get the number of the note to play from the note number array.
Post here the line or lines from that script where you retrieved the notenumber.
You will use the same process here to get the number of the pattern to select
SendMIDINoteOn 0, notenum[LastPad], LastPadVelocity
SendMIDINoteOff 0, notenum[LastPad], 0, 100
SetKnobValue 0, notenum[LastPad]
LabelKnob 0, {note #} , notenum[LastPad]
@pejman : do you understand how the notenumber is being retrieved?
If so, use that same logic to retrieve the pattern number from trackPattern
Then use the patternNumber to set the pattern’s color
@espiegel123
Yes, but I still don't know how to connect these two scripts
You retrieve the pattern number from trackPattern, the way you retrieve note numbers from the notenumber array.
What expression would you use, to get pad 2’s note number from the notenumber array?
What expression would you use to get the pattern for track 2 from the trackPattern array which you set up as
trackpattern = [0,1,2,3]
[LastPad]
trackpattern[LastPad]
So if trackPattern [lastPad] is the pattern number what is required to set the color of that pattern’s pad?
ColorPad trackpattern[LastPad], 7
@pejman :
if the values in trackPattern are pattern numbers (which is what it looks like), you need an offset so that you color the correct pad.
try to make it work and report back with your script and an expkanaof what is or isn’t working.