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

11213141618

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

    @OnPadDown
    if linkstate[LastPad] > 64
    Inc value[LastPad]
    LabelPad LastPad , value[LastPad] ,{ ------ SW value +🔺}
    else
    for i = 0 to 7
    Inc value[i]
    LabelPad i , value[i] ,{ ------ SW value +🔺}
    endfor
    endif
    @End

    @OnPadDown
    for i = 0 to 7
    if linkstate[i] < 65
    Inc value[i]
    LabelPad i , value[i] ,{ ------ SW value +🔺}
    else
    Inc value[LastPad]
    LabelPad LastPad , value[LastPad] ,{ ------ SW value +🔺}
    endif
    endfor
    @End

    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.

      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
    

    is so much easier to follow than

    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
    
  • edited December 2024

    @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 .

  • @pejman said:
    I send with same format as you. But I don’t know Why are they lined up in a column . Like this.

    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

    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:

    @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  
    log x ,{first}
    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 
     
    

    @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.

  • @pejman said:

    >

    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?

    @OnMidiCC
    if MIDIByte2 = modecc 
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  first}
    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 ,{  second}
    endif      
    endif
    @End 
    
    

  • edited December 2024

    @espiegel123 .

    The second log was read first after lodging script. Why?

  • @pejman said:
    @espiegel123

    Is that exactly what you mean?

    @OnMidiCC
    if MIDIByte2 = modecc 
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  first}
    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 ,{  second}
    endif      
    endif
    @End 
    
    

    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 .

    @OnMidiCC
    if MIDIByte2 = modecc 
    log MIDIByte3 ,{  modecc  first log}
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  second log}
    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 ,{  third log}
    endif      
    endif
         
         
    if countnote = 0
      countcc = 0
      endif
    
    @End 
    
    

  • @espiegel123 said:

    @pejman said:
    @espiegel123

    Is that exactly what you mean?

    @OnMidiCC
    if MIDIByte2 = modecc 
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  first}
    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 ,{  second}
    endif      
    endif
    @End 
    
    

    That log seems to show speedcc arriving before modecc is set

    But speed cc is higher than zero.

  • @espiegel123 .

    Sorry, I sent this post by mistake. Please give me another chance.

    @pejman said:
    @espiegel123 .

    @OnMidiCC
    if MIDIByte2 = modecc 
    log MIDIByte3 ,{  modecc  first log}
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  second log}
    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 ,{  third log}
    endif      
    endif
         
         
    if countnote = 0
      countcc = 0
      endif
    
    @End 
    
    

  • @pejman said:

    @espiegel123 said:

    @pejman said:
    @espiegel123

    Is that exactly what you mean?

    @OnMidiCC
    if MIDIByte2 = modecc 
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  first}
    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 ,{  second}
    endif      
    endif
    @End 
    
    

    That log seems to show speedcc arriving before modecc is set

    But speed cc is higher than zero.

    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

  • @espiegel123 said:

    @pejman said:
    @espiegel123

    Is that exactly what you mean?

    @OnMidiCC
    if MIDIByte2 = modecc 
       x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7  
    log x ,{  first}
    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 ,{  second}
    endif      
    endif
    @End 
    
    

    You said:
    “ That log seems to show speedcc arriving before modecc is set.”

    So i send one screenshot from speedcc .

  • @espiegel123 .


    @OnMidiCC if MIDIByte2 = speedcc log MIDIByte2 , { ccnum firstlog} log MIDIByte3 ,{ speedcc value second log} elseif MIDIByte2 = modecc log MIDIByte2 , { ccnum third log} log MIDIByte3 ,{ modecc value Fourth log} endif if MIDIByte2 = modecc log MIDIByte3 ,{ modecc first log} x = Round TranslateScale (MIDIByte3), 0, 127, 0, 7 log x ,{ second log} 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 ,{ fifth log} endif endif if countnote = 0 countcc = 0 endif @End

  • @pejman : what are you expecting to happen in your code that isn’t happening?

  • edited December 2024

    @espiegel123 said:
    @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.

  • @pejman said:

    @espiegel123 said:
    @pejman : what are you expecting to happen in your code that isn’t happening?

    I expect it to show log the correct value , when i 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.

  • edited December 2024

    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.

  • @espiegel123 said:
    @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

    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.?

  • @pejman said:
    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

Sign In or Register to comment.