Pat.Play Method

Top  Previous  Next

 

Function:

Loads a new LED pattern to play on the currently selected LED channel (selection is made through the pat.channel property).

Syntax:

pat.play(byref pattern as string, patint as pl_pat_int)

Returns:

---

See Also:

---

 


Part

Description

pattern

Pattern string, can include the following characters:

'-': both LEDs off

'R' or 'r': red LED on

'G' or 'g': green LED on

'B' or 'b': both LEDs on

'~': looped pattern (can reside anywhere in the pattern string)

'*': double-speed pattern (can reside anywhere in the pattern string). You can use this symbol twice to x4 speed. Adding even more '*' will not have any effect.

patint

Defines whether the pat.play method is allowed to interrupt another pattern that is already playing:

0- PL_PAT_NOINT: cannot interrupt

1- PL_PAT_CANINT: can interrupt)

Details

Maximum pattern length is 16 "steps". The on_pat event is generated once the pattern finishes playing. Looped patterns never finish playing and thus the event is never generated for them.

Note that channels 1-4 require you to map LED control lines. See pat.greenmap and pat.redmap properties for details.