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
Do you want another assignment?
Link of this post
https://forum.audiob.us/discussion/comment/1205500/#Comment_1205500
@pejman wrote:
I expect pad num 8 become colorless and pad num 6 become pink.
Please analyze line by line what happens in onPadDown.
Do you see any logic that would result in pad 8’s color being affected if a pad between 0 and 4 is tapped?
I have not yet taken any steps to do so. I mean, I don't know exactly what to do.
So I sent you this patch that we were developing with @wim as a reminder.
I put the variable ( color_a ) in @onpaddown for a test, so don't take it too seriously.
Basically, I shouldn't expect what I need to happen in this patch, after that I analyze @onpaddown .
@pejman : if you can’t look at that script and see what needs to be added so that tapping a pad 0 to 3 affects the pads 4-15 as you want, you may want to start from scratch and start with a script that does nothing but label the pads and light/color the pads as you want. That would out the basic logic in place. Adding midi sending would be easy after that.
I would start by writing a clear list of bullet points that describes what is meant to happen. Then implement it step-by-step.
Ok , it’s very good idea.
I am waiting.
Waiting? Apologies if I wasn't clear, I was suggesting a course of action for you. When you create your bullet points, include them as comments or in the @Description so that they both act as a guide and provide an explanation to someone reviewing your code.
The more precise you are when creating your bullet points, the easier it will be to implement them. An error that people often make is to start writing code before they really know what they want it to do.
The way I understand it is that you want me to send you a patch in which the color of the pads is clear and the labeling and then specify step by step the goals I have in mind. Is there such a thing?
I am suggesting that you start by writing a detailed description of how you want the pads to interact with each other with regards to color and highlighting and then to write a script to do what you described.
There are 4 tracks and each tracks have 12 pattern
4 tracks = 4 first pads , and 12 patterns = pads from pad num 4 to 15 .
When we touch each of tracks : the new touched lastpad, should be yellow and previous pad should be colorless/withe .
The same situation should happen for the patterns pads in the same way, but with blue color
And should be saved colored lastpad of pattern pad , In it’s own Trackpad .
Thats mean I expect to when loading patch for first time :
1, touch track 1 , pattern 1 ( of track 1 ) should be blue as default.
2, touch pattern 3 ( of track 1 ) .
3, Pattern 3 should be blue and pattern 1 should be colorless.
4, touch track 2 , pattern 1 ( of track 2 ) should be blue as default.
5 , touch pattern 6 ( of track 2 ) .
6, Pattern 6 should be blue and pattern 1 should be colorless.
7, touch track 1 again.
8, I EXPECT : when I touch track 1 again , Pattern 3, which we had previously selected in track 1, will should be blue and pattern 6 will become colorless automatically.
My example was only about track #1 and track #2, This should happen to other tracks in the same way.
@pejman : does the script work as you want? If not , please give details of how it doesn’t:
Steps 4 and 8 doesn’t work.
Step 8 doesn’t work , Because I didn't create a situation where the pattern number that is painted is saved somewhere and later by selecting the same track again, that pad number is read and turned blue.
Regarding step #4, I really don't know what to do.
Step 4 doesn’t work , probably because I didn't create a situation for save and recall number of coloredpattern , In the same place, by default, pattern number 1 is blue in upload patch for first time.
I am having a little difficulty understanding your descriptions.
Do you mean that
The 12 patterns of each track are related to the track itself, not related to other tracks.
Every time we choose one of the four tracks, we can only choose one pattern from the 12 patterns in the track, and that pattern is blue and the rest of the patterns are white.
I don't know what exactly you mean by “with a track” , but by default Pattern number 1 of each track should be blue when we load the patch . thats mean pattern 1 of each track should be selected by default. ( when we touch/select each tracks ).
No ( pattern’s ) ? We can only choose one pattern from each track at a time, not several patterns.
So, Tapping a track pad, sets the associated one pattern pad to blue. All other pattern pads should be white.
Yes exactly.
@pejman: in scripting, you need to think about what information (data) you need to keep track of. Create variables (which could be arrays) to track the information you need to keep track of.
Thank about what information you need and create variables for it. Then you need to initialize those variables and update them..and recall the information stored in them when needed.
A place for you start is decide what variables you need and initialize them.
I suggest that you try to think about and describe the things that happen in terms of the steps that happen.
For example:
You need to make sure you have variables that correspond to any information that needs to be recalled.
You can do this many ways. Give it a shot.
@espiegel ,
Do you mean something like that?
// Initialize variables
@OnLoad
var activeTrack = 0 // Active track (0-3)
var activePattern = [0, 0, 0, 0] // Active pattern for each track (0-11)
var trackColors = [2, 2, 2, 2] // Track colors (yellow if selected, white otherwise)
var patternColors = [
[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // Pattern colors for track 1
[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // Pattern colors for track 2
[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // Pattern colors for track 3
[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // Pattern colors for track 4
]
@end
@pejman : is that meant to be pseudo code to give an idea of your strategy or actual Mozaic code?
As a sort of pseudocode representation, it looks like you are on the path of a workable solution. Mozaic doesn’t allow array slots (cells) to contain an array. So, the actual scripting would be different, but the general strategy will work and would be straightforward to code.
There is another strategy, too, but why don’t you pursue this one first. Afterwards we can talk about another way to handle some of this.
Yes it’s a pseudo code.
Can you tell me exactly what you mean and what is wrong in my writing?
Do you mean ( // Pattern colors for track x ) after cell’s? I wrote this for explanation only in pseudo code.
I didn't intend to follow a different strategy, I created them based on your request that you want me to create variables with initialization.
I would very much like to know what made you think that I have adopted a different strategy
My goal is for these initial variations to be added to the previous codes I sent you, not to replace them.
I wasn't saying that you have adopted another strategy... I am saying that there is another strategy that could be used...and that we will discuss it later after you have implemented this strategy.
I recommend that you don't edit your old code. I recommend that you start with new code from scratch based in the pseudo-code you just posted. Get your new code working..just getting the pad lighting/coloring down. The actual midi stuff will be easy to add after you get the pad handling down.
Deleted to not interfere with the current worksteps
Very very sorry for late . And very thanks for attention.🙏
I wrote down the things you asked me somewhere and I wanted to do them at the right time. I apologize for being so late. I was just a bit busy.
If you think your stuff could help me in the direction that Spiegel and I are going, I'd be happy to do it. Do i need to do your exercises?
You ( @_ki ) wrote: Here is a small exercise for you:
Write a short colorization function ColorAllPads for all 16 pads based on the following descripion (with extra implemenation hints in small texts)>:
Loop through all pads and use ‚no color‘ as default, except if the current number equals the active patterns number use yellow color (this can only happen for pads 0-3 as the current pattern number is less than 4). For pads in the tracks pads range (current number >3) there is the special case that the pad with the same number as the active track of the current pattern is colored blue (note the offset 4 between current pad and the current track).
@espiegel
@ki wrote : Regarding you list of intended variables: You don‘t need an extra variable or array to store the track colors - the color of the first three pads directly depend on which track is selecected (activeTrack) and the color of the pads 5-16 depend on the pattern that is selected for the current track (activePattern[activeTrack]).
Having an independ array with the color values is prone to run into errors if these arrays are not 100% correctly synced to the activeTrack and activePattern[activeTrack].
@pejman say : I know that there is no need to set a value for track number one on onload because the patch automatically defaults to pad number one when it is loaded.
This also applies to the color of trackpads, No need to create them in that onload , because rhere was ; ColorPad 0, 2 , ColorPad 4, 7 .
but i create them , Let's see what Spiegel thinks.
@pejman : does the script behave as you intend?
Of course no , I have added this variables for going to next step .
So far I have done what you asked and now I am waiting to see what else you have to offer
Because I don't know what to do next.
Let me clarify my question, do the pads light up as they should? If not , provide steps that demonstrate the problem and explain what does happen and what should happen.
Please add a comment for padrevert and padrev to explain their purpose. Consider using a more meaningful name than padrev
@pejman : I have another request. Please add comments in your handlers that describe what the code is supposed to do. I am unclear whether the functionality that is missing (such as not highlighting the pattern when tapping a track or saving a pattern change when tapping a pattern) is because you haven't tried to implement that functionality or because you ran into trouble.
Problem number 1 .
After loading script The colors of the pads are as they should be. track 1 yellow , pattern 1 is pink. And other tracks and patterns are white. As I expect.
1, Then when I touch pattern 6 for example ,
2, pattern 6 turns pink and pattern 1 turns white as I expect ,
3, but when i select track 2 for example , pattern 6 is still pink instead of pattern 1 of track 2 as default that i expected.
I think this problem is because I haven't used variable ( activePattern = [0, 0, 0, 0] ) in the right place yet. Or that variable has not been used in the script yet.
Roblem number 2 ;
The next problem related to the saving of the color pads, which was related to the patterns, which should be saved in the relevant track or the active track and can be read by selecting the same track again, does not work either.
Copy from previous post.
8, I EXPECT : when I touch track 1 again , Pattern 3, which we had previously selected in track 1, will should be blue and pattern 6 will become colorless automatically.
I think this problem is because I haven't used variable ( Pattcolortrack1 ….. ) in the right place yet. Or that variable has not been used in the script yet.
Pattcolortrack_1 = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Pattcolortrack_2 = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Pattcolortrack_3 = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Pattcolortrack_4 = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@pejman : please add comments in onPadDown and in each section of onPadDown describing what is supposed to happen.
Make sure to have a comment in regular language that explains every thing that is supposed to happen. For example, in the part where you handle a tapped track, it should mention that the new track's pattern should be colored and the previous track's pattern set to white.
In the part that handles a pattern pad, mention each thing that is supposed to happen.
Those comments will suggest to you what to do. And, they will let a collaborator know what is supposed to be hapoening.
@onpaddown
When i touch one of 4 first trackpad ( pads from 1 to 4 ) the last track pad should be yellow and 3 other trackpads should be withe .
After loading script When i touch each of 4 first trackpad , the pattern number 1 [ pad num 5 ) should be pink and other patternpads should be withe as default.
When i touch one of the next 12 pattern pad ( pads from 5 to 16 ) the last pattern pad should be pink and other 11 patternpad should be withe.
So, There should be a place to save the number of the painted patternpad corresponding to the track
each of tracks has own 12 pattern’s separately.
So,When i touch each track , all of 12 pattern’s associated with same track should show which pattern was last selected in that track which we had already chosen, so that pattern should be pink and other should be white.
So there must be a situation where we can recall the last painted pad corresponding to selected crack
@end