OpenMusic Reference
interlock
interlock
(lists module) -- inserts elements of a list between those of another
Syntax
interlock lis1 lis2 plc1
Inputs
name | data type(s) | comments |
---|---|---|
lis1 | a tree | the master list |
lis2 | a tree | the list of elements to insert |
plc1 | a list of integers | the locations at which to place elements from lis2 |
Output
output | data type(s) | comments |
---|---|---|
first | a tree |
Description
Interlocks 2 lists. interlock attempts to place each element in lis2 before the elements in the positions indicated in the list plc1 . Positions which do not exist in lis1 are skipped.
![]() |
The order of the position indicators in plc1 is not taken into account- it is as if spaces in lis1 are created before all the positions in plc1 before any insertions are performed.
—|—
Examples
Inserting elements in a list
Returns:
? OM->(a 1 2 b 3 c 4 5 6 d 7 8 9)
Changing the order of the elements in plc1 , (3 6 0 2) for example, would not change the result
Prev | Home | Next |
---|---|---|
infocanons | Up | interpolation |