Lemur Monitors Jazzmutant Lemur User Manual

Page of 122
Parser Reference 
94 
stretch(a, size) :  
 
Stretches a value or a range and returns a vector 
Explanation :  
If  a  is  a  single  value  (or  a  vector  with  a  single  item),  the 
function returns a vector with "size" items containing that value 
stretch(0, 12) = {0,0,0,0,0,0,0,0,0,0,0,0} 
After that, you could do :  
set(stretch(0, 12), 1, time%12) 
This returns:  
{1,0,0,0,0,0,0,0,0,0,0,0} when time<1 
{0,1,0,0,0,0,0,0,0,0,0,0} when time<2 
{0,0,1,0,0,0,0,0,0,0,0,0} when time<3 
etc. 
If a is a vector with more than one value, the function stretches 
the range over "size" items : 
stretch({1,4}, 4} = {1,2,3,4} 
stretch({0,10},11} = {0,1,2,3,4,5,6,7,8,9,10,11} 
 
sumof(a) :    
 
Sums 
all 
the 
items 
of 
an 
array