Entra:     


Forum: General Discussion

Topic: How to detect a playing loop by script?

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

I can store up to 4 different loops for each track by script.
I also need an indication like a flashing button when the relevant loop is playing.
So, how do I detect when a loop is playing? I searched for something "like" :

loop_play "Saved Loop 1" ? blink : off (The saved loop names are Saved Loop 1-4)
 

Inviato Mon 27 Jul 15 @ 3:32 am
loop_load_prepare "Save Loop 1" ? blink : off
should do it.
 

Thanx Adion, that works.
To make things more complicated I wanted to implement the above script to a led which has other assignments aswell:

loop_load 'Saved Loop 1' ? constant yellow : constant '18,18,0' & loop_load_prepare "Saved Loop 1" ? constand red : off

In other words, if no loop is stored in slot "Saved Loop 1" led is yellow dim, and if a loop is stored, yellow is bright on.
When the loop is playing I wanted to have for example red led on, but that does not happen.

As a general script question, does a script always pass through the entire line, reading script after the "&" sign ?
 

I think you have the order wrong.
Now when there is a loop stored, yellow will be on, and you won't reach the other part. (When it is active it will also be available)

loop_load 'Saved Loop 1' ? loop_load_prepare "Saved Loop 1" ? constant yellow : constant '18,18,0' : off

Although you can't actually put brackets in vdjscript, the logic is easier to see if you imagine them there:
loop_load 'Saved Loop 1' ? (loop_load_prepare "Saved Loop 1" ? constant yellow : constant '18,18,0') : off
 

Great! Works as I wanted. Thanx for fast help.

While we're on the subject of script and lighting leds. I tried to use "blink" instead of "constant 18,18,0" but it did not flash.
Is blinking not supported this way with RGB leds perhaps?
 

use ..
blink ? constant 'whatevercoloruwant' : off
 



(Vecchi argomenti e forum sono automaticamente chiusi)