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 Store

Loopy Pro is your all-in-one musical toolkit. Try it for free today.

MOZAIC Help Line

18911131416

Comments

  • @pejman that is a step in the right direction. It isn’t quite what I had in mind , but we’ll get there. For this stage , keep it organized in terms of what happens. Getting the description organized is important. It will be a roadmap to what to do.

    Break this into distinct pieces of functionality listed as bullet points rather than as paragraphs. Here is my version on tapping a track based on what you said.

    —-
    When a track (pad 0-3) is tapped:

    • make the pad pink
    • make all other track pads white
    • Update the pattern pads so the track’s associated pattern is pink (and all others are white)
    • Remember that this track is the current one
      —-

    Do this for what happens when a pattern pad is touched. You don’t need to re-do the track part unless I missed something .

  • I edited my last post.

  • When the script loads for first time

    @OnLoad

    When the script loads for first time

    GUI pads feature:

    • the first track ( pad 0 ) of four track ( pad 0 - 3 ) should be yellow and other tracks should be white , and first pattern => ( pad 4 ) of 12 pattern ( pad 4 - 15 ) should be pink and other patternpads should be white as default

      • each of tracks has own 12 pattern’s separately.

    @onpaddown

    • when touch each of 4 first trackpads the last trackpad should be yellow and 3 other trackpads should be withe .

      • when touch each of 4 first trackpads, the first pattern pad ( pad 4 ) should be pink as default automatically and other patternpads should be white.

    Patternpads status:

    • In the next step , touch one of the trackpad ( pattern 1 associated with same track is selected/pink as default )

    • if touch each other patternpad Except pattern 1 , the last touch patternpad should be pink ( update pattern ) and previous selectted pattern should be white.

      • So, There should be a place to save the number of the painted patternpad corresponding to the track

      • If touch each track , all of 12 pattern’s associated with same track should shows 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

  • @espiegel , I edited my last post with espiegel format
    —-
    When a track (pad 0-3) is tapped:
    * make the pad yellow
    * make all other track pads white
    * Update the pattern pads so the track’s associated pattern is pink (and all others are white)
    * Remember that this track is the current one
    —-
    When a pattern (pad 4-15) is tapped:
    * make the pad pink
    * make all other pattern pads white
    * Remember that this is the current pattern associated with the last track

  • @pejman : great. The next step is to put this information as commments -- more less as it is -- into the appropriate place in the onPadDown handler. As an example, I'll add the "when a track" part to the code.

    I would like you to finish by putting the lines of the "when a pattern" part into the code in the appropriate places as I have done for the tracks part.

    Notice that I put an ADDITIONAL comment that starts "NEEDED", to indicate that this functionality hasn't yet been implemented.

    Don't do any additional coding. We will have a brief discussion after onPadDown has all the comments in place.

    @OnPadDown
    
      // When a track (pad 0-3) is tapped:
      if LastPad < 3
          // make all other track pads white [by making previous pad white]
          ColorPad trackrevert, 0
          // make the tapped pad yellow 
          ColorPad LastPad,2
    
         //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
    
    
         // remember that this track is the current one
          trackrevert = LastPad
    
           elseif LastPad > 3
    
                 ColorPad patternrevert, 0
                 ColorPad LastPad, 7
                 patternrevert = LastPad
    
                 endif
    
                 for p = 4 to 15
        LabelPad p, {pattern: },p-3
    
      endfor
    
    
    @End
    
    
    
  • edited June 2023

    OK...I tried.....

    Looking for a way to reduce whatever HostBar is reporting to whatever bar it would be for a 4 bar loop.
    Examples:

    • If AUM is on bar 258, that would bar 2 of a 4 bar loop
    • If AUM is on bar 5, that would be bar 1 of a 4 bar loop
    @OnNewBar
    i = HostBar + 1  // +1 is because bar 1 in AUM is bar 0 in mozaic
    j = i _with some math here to reduce to 1-4_
    Log  j
    @End
    

    Am I even going about this the right way?

  • The math you're looking for is modulo (% operator), which gives you the remainder of the first number divided by the second. It'll be much easier if you do the calculation first, then add 1 to it if you prefer to think of it counting from 1 to 4.

    @OnNewBar
    i = HostBar % 4
    j = i + 1
    
    log j
    @End
    

    0%4 = 0
    1%4 = 1
    2%4 = 2
    3%4 = 3
    4%4 = 0
    5%4 = 1
    6%4 = 2
    7%4 = 3
    8%4 = 0
    9%4 = 1
    etc

  • @AlmostAnonymous : the modulo operator is what you want. In Mozaic it is %

    For example:

    numberOfBars = 258
    barsPerCycle = 4
    MeasureinCycle = numberOfBars % barsPerCycle

    //result is 2
    Log measureInCycle

  • edited June 2023

    I'll give that a whirl. I went about this backwards cause i was trying to make Div work
    (which apparently is the opposite and discards the fraction)

    Thank you!

  • wimwim
    edited June 2023

    @AlmostAnonymous - that modulo technique is useful for all kinds of rotating counters, such as using pads to increment through values and wrap around to the beginning. Saves a lot of code.

    For example, changing channels using taps on a pad:

    @OnLoad
      channel = 0
      LabelPad 0, {Chan. }, (channel+1)
    @End
    
    @OnPadDown
      if LastPad = 0
        // increment through channel 0 - 16
        channel = (channel + 1) % 16
        LabelPad 0, {Chan. }, (channel+1)
      endif
    @End
    
  • @wim said:
    @AlmostAnonymous - that modulo technique is useful for all kinds of rotating counters, such as using pads to increment through values and wrap around to the beginning. Saves a lot of code.

    For example, changing channels using taps on a pad:

    @OnLoad
      channel = 0
      LabelPad 0, {Chan. }, (channel+1)
    @End
    
    @OnPadDown
      if LastPad = 0
        // increment through channel 0 - 16
        channel = (channel + 1) % 16
        LabelPad 0, {Chan. }, (channel+1)
      endif
    @End
    

    Great @wim👍, very interesting, thanks.

  • edited July 2023

    @espiegel,

     @OnPadDown
    
      // When a track (pad 0-3) is tapped:
      if LastPad < 3
         // make all other track pads white [by making previous pad white]
          ColorPad trackrevert, 0
          // make the tapped pad yellow 
          ColorPad LastPad,2
    
          //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
    
    
          // remember that this track is the current one
           trackrevert = LastPad
    
     // When a pattern (pad 4-15) is tapped:
            elseif LastPad > 3
    
                  // make all other pattern pads white [by making previous pad white]
                  ColorPad patternrevert, 0
                  // make the tapped pad pink 
                  ColorPad LastPad, 7
    
                 // remember that this pattern is the current one
                  patternrevert = LastPad
    
           //Remember that this is the current pattern associated with the last track
           // NEEDED: we need to add the code to update the pattern pads
                  endif
    
                  for p = 4 to 15
         LabelPad p, {pattern: },p-3
    
       endfor
    
    
     @End
    
  • A miscellaneous question.

    How to change value of ( SetTimeInterval ) in different places/line commands ?

    It means that a series of commands or functions should be done with (SetTimeInterval 100 ) and another series should be done with (SetTimeInterval 500, for example.

  • @pejman said:

    @wim said:
    @AlmostAnonymous - that modulo technique is useful for all kinds of rotating counters, such as using pads to increment through values and wrap around to the beginning. Saves a lot of code.

    For example, changing channels using taps on a pad:

    @OnLoad
      channel = 0
      LabelPad 0, {Chan. }, (channel+1)
    @End
    
    @OnPadDown
      if LastPad = 0
        // increment through channel 0 - 16
        channel = (channel + 1) % 16
        LabelPad 0, {Chan. }, (channel+1)
      endif
    @End
    

    Great @wim👍, very interesting, thanks.

    Yep. I got it.

    I don’t really do anything w/ counters as I script hardware controllers w/ mozaic usually.
    Show Layout 4 // for the win!

  • @pejman said:
    A miscellaneous question.

    How to change value of ( SetTimeInterval ) in different places/line commands ?

    It means that a series of commands or functions should be done with (SetTimeInterval 100 ) and another series should be done with (SetTimeInterval 500, for example.

    SetTimerInterval immediately changes the timer interval to the value you assign it. So, put your settimerinterval calls wherever you want it to change.

  • @espiegel123 said:

    @pejman said:
    A miscellaneous question.

    How to change value of ( SetTimeInterval ) in different places/line commands ?

    It means that a series of commands or functions should be done with (SetTimeInterval 100 ) and another series should be done with (SetTimeInterval 500, for example.

    SetTimerInterval immediately changes the timer interval to the value you assign it. So, put your settimerinterval calls wherever you want it to change.

    I mean after some of code lines change value of SetTimeInterval .

    Please give a small example.

  • @pejman said:

    @espiegel123 said:

    @pejman said:
    A miscellaneous question.

    How to change value of ( SetTimeInterval ) in different places/line commands ?

    It means that a series of commands or functions should be done with (SetTimeInterval 100 ) and another series should be done with (SetTimeInterval 500, for example.

    SetTimerInterval immediately changes the timer interval to the value you assign it. So, put your settimerinterval calls wherever you want it to change.

    I mean after some of code lines change value of SetTimeInterval .

    Please give a small example.

    You would put it wherever you need to change the timer interval.

    What is it that you have in mind? If it it isn't obvious where you would need to change the timer interval, you might need to develop your scripting skills some more.

    Here is some pseudo-code:

    Pseudo-code for script to send a notes when the timer is running. One pad toggles the timer on/off. Other pads set the timer interval
    
    
    Initialize variables
    --slowTimer 500 ms
    --fastTimer 100 ms
    --noteNum 36
    --noteDuration 90
    
    Padpresses
    --pad 0: settimerInterval slowTimer
    --pad1: settimerinterval fastTimer
    --pad2: Start/Stop Timer
    
    OnTimer
    -- send noteon noteNum 
    -- send noteoff noteNum with delay noteDuration
    
    
  • edited June 2023

    @espiegel,
    Thank you for the complete explanation and example that you sent me, but unfortunately this is not what I have in mind.
    I apologize if this question causes us to temporarily deviate from our main path.

    If you think this issue can be long and time-consuming, then ignore this issue and we will return to our main topic because I am very interested in following our main topic, and we will continue this topic on another occasion.

    In this patch as you can see, The pads are colored automatically in the @ontimer one after the other with a time interval of one second and then turn white after one second

    But I need the pads to be colored one after the other with a time interval of one second, but at a much higher speed after the next pad is colored, they will be white (for example, with a time interval of 50 milliseconds).

    NOTE : This is just an example to show you what I mean by changing value of SetTimeInterval automatically, without hitting a certain pad or turning a certain knob manually.

    @OnLoad
    SetTimerInterval 1000
    StartTimer

    ShowLayout 0
    channel = 0
    ColorPad 0, 0
    channelrevert = 0


    @End

    @OnTimer

    if LastPad < 4
    // for example ; SetTimeInterval 50 For instant whitening
    ColorPad channelrevert, 0
    // for example ; SetTimeInterval 1000 To color the pad with the original speed that we have already considered in @onload
    ColorPad LastPad, 7
    channelrevert = LastPad
    endif

    LastPad = channel
    channel = (channel + 1) % 4
    ColorPad LastPad , 7
    FlashPad LastPad

    @End

  • @pejman : I am having difficulty understanding what you are trying to accomplish. It would be helpful if you gave a clear non-scripted description of what you want to happen.

    I also think you should spend time experimenting with a super simple script with super simple logic to understand how the timer and timer interval work.

  • wimwim
    edited July 2023

    Pardon me for commenting, but that does seem like an advanced topic that could develop into a serious sidetrack.

    It involves setting the timer interval to trigger the faster action (50ms in your example). Then incrementing counters to keep track of when to trigger the longer 1 second actions. It's tricky.

    Honestly, @pejman that seems to me like a lot to take on until you're farther along.

  • edited July 2023

    @espiegel, @wim ,

    Wim seemed to understand exactly what I meant.
    @wim, But I don’t understood your meaning from the last lines you wrote :
    @wim wrote:
    It involves setting the timer interval to trigger the faster action (50ms in your example). Then incrementing counters to keep track of when to trigger the longer 1 second actions. It's tricky.

    Honestly, @pejman that seems to me like a lot to take on until you're farther along.

    @espiegel, Because you said that I should give you a simpler example and you did not understand my previous example, I will send this issue to you again.

    • The pad num 0 should turn on and off with a time interval of one second

    • At the same time, pad number 1 should be turned on and off with a time interval of 200 milliseconds، automatically, without using intermediaries like LFOs or touching a pad or turning a knob for changing the value of SetTimeInterval , which you mentioned in your previous script.

    • Problem : Pad number 0 turns on and off with a time interval of 200 ms instead of 1000 ms

    • It seems that mozaic always takes the last SetTimeInterval into account

    • I know that the script I wrote is not logical, that's why I am asking for your help to solve this problem without intermediaries of pad and knob for changing SetTimeInterval VALUES.

      @OnLoad
      SetTimerInterval 1000
      StartTimer
      ShowLayout 0
      @End


      @OnTimer
      // pad num 0 with timer interval 1000ms Turn on and off

      SetTimerInterval 1000
      StartTimer

      FlashPad 0


      // in need to pad num 1 with timer interval 200ms Turn on and off At the same time that the pad number is zero, it turns off and on with a time interval of one second

      SetTimerInterval 200
      StartTimer
      FlashPad 1

      @End

  • @pejman: there is only one timer and one timer interval at a time. Whenever you set the timer interval, the new timer interval is used. So, you have to work within those constraints.

    To do what you want is possible, however it would a pretty solid understanding of how to track things. You would probably not alternate timer intervals. Instead, the timer would fire frequently and you would keep track of what actions if any would be taken each time the timer fires. As wim said, you would probably use counters to keep track of timer cycles. Some events would happen on multiples of 5 and some very cycle.

    I don't feel that I could guide you through that at this time as the logic is more complicated than the project you are already having trouble with. When you have mastered the basics enough to tackle the problem, you will be able to read what wim and I have written and see how to solve the problem.

  • @espiegel,

    Ok and thanks , Glad to know there is a solution.

    As I thought it must have a complicated solution for me at this time .
    So we will postpone the issue and return to our main project. Thank you very much.

  • edited July 2023

    @espiegel123

     @OnPadDown
    
      // When a track (pad 0-3) is tapped:
      if LastPad < 3
         // make all other track pads white [by making previous pad white]
          ColorPad trackrevert, 0
          // make the tapped pad yellow 
          ColorPad LastPad,2
    
          //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
     
     
          // remember that this track is the current one
           trackrevert = LastPad
     
     // When a pattern (pad 4-15) is tapped:
            elseif LastPad > 3
               
                  // make all other pattern pads white [by making previous pad white]
                  ColorPad patternrevert, 0
                  // make the tapped pad pink 
                  ColorPad LastPad, 7
    
                 // remember that this pattern is the current one
                  patternrevert = LastPad
     
           //Remember that this is the current pattern associated with the last track
          
                  endif
     
                  for p = 4 to 15
         LabelPad p, {pattern: },p-3
     
       endfor
     
     
     @End
    
  • @pejman : before we add the missing functionality, it is time to take a little break to talk about structure and organization.

    The short version is that it is generally a good idea to bundle together lines of code that work together for single purpose and put them in their own module or handler. onPadDown is growing.

    We can see that there is bundle of lines that handles track pad touches and another bundle of lines that will handle pattern pad touches. It makes sense to break these out into their own handlers so that onPadDown looks something like this:

    @onPadDown
    
        if lastPad < ?
           call @trackSelected
        else  // NOTICE THAT WE DON'T NEED ELSEIF here. We only need an ELSE
           call @patternSelected
       end
    
        // QUESTION: Does this belong in onPadown?
        // it doesn't appear that the labeling is affected by pad presses.
       //  this probably belongs in @onLoad
        for p = 4 to 15
            LabelPad p, {pattern: },p-3
       endfor
    
    
    @End
    
    
    

    The next step is to create a new post with a new version of the script that includes the logic I just explained and includes the new @trackSelected and @patternSelected handlers.

    If creating handlers is unfamiliar and you have questions, please ask.

    Here is some additional information and some instructions. Please make sure to do each one and when it is done, make sure that the code uploads into Mozaic correctly and runs without syntax errors. Then double-check that each item in this list is understood.

    • you will notice that I put a ? in the "if lastPad < " line. Check your logic and then test to see what number needs to be there.
    • I have added a question about the for-loop where you label the pads. This seems like it belongs in the loading section since tapping pressing a pad doesn't change the labeling.
    • I have made a comment about using ELSE instead of ELSEIF. If you have any question about this please let me know.
    • you should now add @trackSelected and @patternSelected as handlers
    • copy/paste into @trackSelected all the lines (including comments) from the part of the script that handled touches in pads 0-3
    • copy/paste into @patternSelected all the lines (including comments) from the part of the script that handles pattern pads touches.

    Please also consider giving a more meaningful name to the variables you call trackRevert and patternRevert. Think about what their function is and pick a name to will give a clue about that function to someone looking at your script for the first time.

    Once that is done and the new script runs the same as the old one, we'll discuss adding the missing functionality.

  • @pejman said:
    Wim seemed to understand exactly what I meant.
    @wim, But I don’t understood your meaning from the last lines you wrote :

    @wim wrote:
    It involves setting the timer interval to trigger the faster action (50ms in your example). Then incrementing counters to keep track of when to trigger the longer 1 second actions. It's tricky.

    Honestly, @pejman that seems to me like a lot to take on until you're farther along.

    Hi @pejman. I apologize if my post wasn't clear. I wasn't trying to provide you a working solution but rather to encourage you to wait before taking something like that on. In my opinion that's a complicated task for which your skill level isn't quite there yet and would distract you from the foundational learning you're developing.

    @espiegel123 is doing a great job at trying to lead you step by step through the learning process. I know it's hard to resist doing things that you want to do, but staying focused is the best way to develop the basic skills you need to do more complicated things.

  • edited July 2023

    @espiegel123 ,

    Updated script to new level.

    Is lasttrack name ok ? Or currenttrack name ?

    @OnLoad

    ShowLayout 2

    for p = 4 to 15
    LabelPad p, {pattern: },p-3
    endfor

    LabelPad 0, {1️⃣}
    LabelPad 1, {2️⃣}
    LabelPad 2, {3️⃣}
    LabelPad 3, {4️⃣}

    selectedtrack = 0
    selectedpattern = 4

    //only for when loading
    ColorPad 0, 2
    ColorPad 4, 7

    @End

    @OnPadDown

    if lastPad < 4
    call @trackSelected
    else
    call @patternSelected
    endif

    @End

    @trackSelected

    // When a track (pad 0-3) is tapped:

    // make all other track pads white [by making previous pad white]
    ColorPad selectedtrack, 0
    // make the tapped pad yellow
    ColorPad LastPad,2

    //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


    // remember that this track is the current one
    selectedtrack = LastPad



    @end

    @patternSelected

    // When a pattern (pad 4-15) is tapped:


    // make all other pattern pads white [by making previous pad white]
    ColorPad selectedpattern, 0
    // make the tapped pad pink
    ColorPad LastPad, 7

    // remember that this pattern is the current one
    selectedpattern = LastPad

    //Remember that this is the current pattern associated with the last track

    // NEEDED: we need to add the code to update the pattern pads


    @end

  • @pejman : those names are ok. But something like selectedTrack or activeTrack might give the reader more of a hint. The same for pattern. But it is up to you.

    You don’t need the if-tests in trackSelected and patternSelected as you already did them in onPadDown.

    The next steps for you are

    • in trackSelected , add the needed code to update the pattern pads
    • In patternSelected, add the “//NEEDED…” comment marking the place where functionality needs to be added OR implement the missing functionality
  • edited July 2023

    @wim said:

    @pejman said:
    Wim seemed to understand exactly what I meant.
    @wim, But I don’t understood your meaning from the last lines you wrote :

    @wim wrote:
    It involves setting the timer interval to trigger the faster action (50ms in your example). Then incrementing counters to keep track of when to trigger the longer 1 second actions. It's tricky.

    Honestly, @pejman that seems to me like a lot to take on until you're farther along.

    Hi @pejman. I apologize if my post wasn't clear. I wasn't trying to provide you a working solution but rather to encourage you to wait before taking something like that on. In my opinion that's a complicated task for which your skill level isn't quite there yet and would distract you from the foundational learning you're developing.

    @espiegel123 is doing a great job at trying to lead you step by step through the learning process. I know it's hard to resist doing things that you want to do, but staying focused is the best way to develop the basic skills you need to do more complicated things.

    @wim ,

    Thanks wim for explanation.
    You’re right, As soon as I realized that this question ( changing timeinterval ) I asked can be solved, it is very interesting and happy for me.

    I am very grateful to @espiegel123 for patience and all the efforts espiegel has made for me so far and for tolerating my confusion and misunderstandings.

  • @espiegel123

    I have added//NEEDED TO pattern section in script
    // NEEDED: we need to add the code to update the pattern pads.

    Is that true? I really don't know what to write.
    Can you please give me some advice on what I should consider about the 2 codes related to “NEDDED “ codes in to the @petternSelected ,because I really don't understand anything no matter how many times I go through the comments.

    I tried these codelines in @trackSelected, But none of them work because I don't have any idea about //NEDDED for @petternSelected , so I want to see if these codes I created work or not.

    //ColorPad selectedpattern[selectedtrack], 7

    //ColorPad selectedtrack[selectedpattern], 7

    //ColorPad selectedtrack[selectedpattern], selectedpattern

    //LastPad = selectedpattern

Sign In or Register to comment.