PDA

View Full Version : Luis: Does this script work for you (Loop Pedal 1-5)


buzap
10-31-2009, 10:28 PM
Hi Luis

I have finally managed to put together the Loop Pedal 1-5 script along with:
- Double-click = Multiply
- Long-press = Reset

please check if this works for you, then I can post the whole package with five pedals.

best regards
Buzap


!name LUILOOP1
!autoload

############
#### Loop pedal will act as Rec/Play/Overdub on Track 1
#### Switching between loops in NextLoop style
#### Double click will Multiply
#### Long press will Reset
#### Buzap, 01Nov2009, 1.38
############

!multiclick 400
!sustain 2000


## switch to track 1
## if coded otherwise behaves Rec>Overdub instead of Rec>Play

if track != 1
Track 1
endif



if loopNumber == 1

## same loop

if mode == reset
Record
else
if mode == mute
Reset
Record
else
if mode == play
Overdub
else
if mode == multiply
Play
else
if mode != reset
Play
endif
endif
endif
endif
endif

else

## other loop

## if previous loop was empty,
## trigger new loop with loopCopy=off, autoRecord=on

if mode == reset
Variable saveLoopCopy loopCopy
Variable saveAutoRecord autoRecord
set loopCopy off
set autoRecord on
Loop 1
## waits until previous command is finished
Wait last
set loopCopy saveLoopCopy
set autoRecord saveAutoRecord
else
Loop 1
endif

endif

end
##

## double click will Multiply
Label click
Multiply
end

## long press will Reset
Label sustain
Reset
end

#### END LUILOOP1

louie
11-03-2009, 10:47 AM
Buzap i just tried this out all i can say is YOU ROCK!!!!!!!!!
finally ive been waiting for this for ages,the problem with multiply in mobius is always something that has always frustrated me as well because is so important for me and now it works flawless!!
this will minimize my tap dancing as well kudos to you man!
cheers
Luis

buzap
11-03-2009, 07:31 PM
Hi Luis & everyone

I've uploaded the whole package (yahoo group, files and also here under upload).

luiloop 1-5 pedals.zip:
- Five pedals with Loop 1-5 on Track 1.
- Each loop pedal will act as Rec/Play/Overdub.
- Switching between loops in NextLoop style.
- Double-click will Multiply.
- Long-press will Reset.

Feel free to try it out!

have fun! :-)

buzap

Kaspar
11-12-2010, 11:31 PM
Excellent script!
Playing with it myself.

Could this script also be made to work on the currently selected track instead of track 1?
This would allow to record loops of separate instruments on separate tracks.

Then another issue arises - sometimes it's good to keep one track at loop 1 at all times while switching others (drum loop for an example), but sometimes it's good to switch them all together.

How is this handled best?

Also, what program displays the script correctly (as here in the forum)?
When opening the "luiloop" script in the notepad, all the rows, spaces are messed up.

Thanks...

Jeff
11-15-2010, 10:54 PM
Nicely done!

gtodd876
12-20-2010, 07:23 PM
Is it possible scripts like this to work on Track 2 as well? I'd like to have 4 Luiloop buttons and then the 5th one to work on the 1st loop of track 2.

I changed the beginning of the script from track 1 to 2 and it would switch to track 2 but you lose all functionality other than play.


-Todd

gtodd876
12-20-2010, 11:06 PM
I'd also like to be able to still go right into record if you have Loop Copy turned off. Here is what I have tried so far:
if track != 1
Track 1
endif



if loopNumber == 2

## same loop

if mode == reset
Record
else
if mode == mute
Reset
Record
else
if mode == play
Overdub
else
if mode == multiply
Play
else
if mode == switch
Reset
Record
else
if mode != reset
Play
endif
endif
endif
endif
endif
endif


Right now with Loop Copy turned off it will switch to the next loop but it will be stopped in reset mode once it switches. You have to press Luiloop2 again to make it go into record mode. I was taking a stab at trying 'mode == switch' but it had no effect.


Please Benevolent Dictator, can you help a brotha' out.

gtodd876
12-20-2010, 11:59 PM
Got it!

Just add this one line of code:

## other loop

## if previous loop was empty,
## trigger new loop with loopCopy=off, autoRecord=on

if mode == reset
Variable saveLoopCopy loopCopy
Variable saveAutoRecord autoRecord
set loopCopy off
set autoRecord on
Loop 2
## waits until previous command is finished
Wait last
set loopCopy saveLoopCopy
set autoRecord saveAutoRecord
else
set autoRecord on
Loop 2
endif

Next up I will figure out how to make them work for other tracks as well. At least by the end of this pot of coffee. Wooooooooo!

gtodd876
12-21-2010, 01:58 AM
Kaspar,
Here is my solution to have the Luiloop on track 2, loop 1. It ended up being a real simple tweak from Buzap's script and I highlighted the change in bold.


!name LUI2LOOP1

############
#### Loop pedal will act as Rec/Play/Overdub on Track 2
#### Switching between loops in NextLoop style
#### Double-click will Multiply
#### Long-press will Reset
#### Buzap, 03Nov2009, 1.38
############

## adjust double-click time in milliseconds here
!multiclick 400

## adjust long-press time in milliseconds here
!sustain 2000


## switch to track 2
## if coded otherwise behaves Rec>Overdub instead of Rec>Play

if track != 2
Track 2
endif



if loopNumber == 1

## same loop

if mode == reset
Record
else
if mode == mute
Reset
Record
else
if mode == play
Overdub
else
if mode == multiply
Play
else
if mode != reset
Play
endif
endif
endif
endif
endif

else

## other loop

## if previous loop was empty,
## trigger new loop with loopCopy=off, autoRecord=on

if mode == reset
Variable saveLoopCopy loopCopy
Variable saveAutoRecord autoRecord
set loopCopy off
set autoRecord on
Loop 1
## waits until previous command is finished
Wait last
set loopCopy saveLoopCopy
set autoRecord saveAutoRecord
else
Loop 1
endif

endif

end
##

## double click will Multiply
Label click
Multiply
end

## long press will Reset
Label sustain
Reset
end

#### END LUI2LOOP1

Kaspar
12-24-2010, 02:38 PM
Thanks, I'll try it when I get away from the week long Christmas-feast :)

Kaspar
01-08-2011, 02:33 PM
Kaspar,
Here is my solution to have the Luiloop on track 2, loop 1. It ended up being a real simple tweak from Buzap's script and I highlighted the change in bold.


So to have the scripts work on 5 tracks and on the first loop, then every time there is a line in the script that has:
1) Track number - should be numbered from 1-5, depending on the script.
2) Loop number / loop - should be numbered always 1, regardless of the script.

Am I right so far?

--------

What I'm looking for now is how to add two footswitches to select a loop up/down for all the tracks together (or separate switches to for all the loops)?

Also, can the reset long-press reset be quantized, so that It'll play until the end of the loop?

gtodd876
01-09-2011, 11:45 AM
Your loop number will change for each scripts as well. You'll need a script for each loop number just like you needed for the original scripts.

Actually the Luiloop scripts haven't been working for me now since I updated to 1.43 . I need some time to look at the scripts though to see if it caused from me tweeking them or if it is a bug.

Kaspar
01-10-2011, 04:24 PM
Your loop number will change for each scripts as well. You'll need a script for each loop number just like you needed for the original scripts.


Thanks for the reply.
But if I just want to change the tracks with the 1-5 scripts and would like to change loops globally for all the tracks with a separate footswitch...
Shouldn't then the loop number be constant, or could the part with the loop be deleted from the code altogether?

I meant this portion of the code:

if loopNumber == 1

## same loop

if mode == reset
Record
else
if mode == mute
Reset
Record
else
if mode == play
Overdub
else
if mode == multiply
Play
else
if mode != reset
Play
endif
endif
endif
endif
endif

else

## other loop

## if previous loop was empty,
## trigger new loop with loopCopy=off, autoRecord=on

if mode == reset
Variable saveLoopCopy loopCopy
Variable saveAutoRecord autoRecord
set loopCopy off
set autoRecord on
Loop 1
## waits until previous command is finished
Wait last
set loopCopy saveLoopCopy
set autoRecord saveAutoRecord
else
Loop 1
endif

endif

end
##

Jeff
01-10-2011, 07:55 PM
I haven't been following this thread closely, but I just wanted to make a quick comment on the last script. If you have a large block of nested
if/else/if/else... statements, they are easier to read if you
use "elseif" For example

if ...some condition...
...do something
elseif ...some condition...
... do something...
elseif ... some condition...
... do something...
endif


This saves having lots of nested if/else/endif statements which if you
indent can add a lot of whitespace.

Kaspar
01-10-2011, 10:31 PM
This saves having lots of nested if/else/endif statements which if you
indent can add a lot of whitespace.

Thanks for the tip, actually I just copy/pasted a portion of Buzap's code - I'm not very competent myself :o

Kaspar
02-15-2011, 05:40 PM
If you have a large block of nested
if/else/if/else... statements, they are easier to read if you
use "elseif" For example

if ...some condition...
...do something
elseif ...some condition...
... do something...
elseif ... some condition...
... do something...
endif


So the script would become (am I correct?):


if track != 1
Track 1
endif



if loopNumber == 1

## same loop

if mode == reset
Record
elseif mode == mute
Reset
Record
elseif mode == play
Overdub
elseif mode == multiply
Play
elseif mode != reset
Play
endif

else

## other loop

## if previous loop was empty,
## trigger new loop with loopCopy=off, autoRecord=on

if mode == reset
Variable saveLoopCopy loopCopy
Variable saveAutoRecord autoRecord
set loopCopy off
set autoRecord on
Loop 1
## waits until previous command is finished
Wait last
set loopCopy saveLoopCopy
set autoRecord saveAutoRecord
else
Loop 1
endif

endif

end

buzap
06-24-2011, 09:17 AM
Glad to see my LuiLoop Scripts are being used :)

Actually the Luiloop scripts haven't been working for me now since I updated to 1.43.

Does this problem exist/persist with 1.45? Would like to know prior to upgrade.

thanks
Buzap