HELP INDEX


The ran function

{ran f/i min max}
ran is for random. ran will generate a random number between min and max as a floating point (f) or an integer (i). Functions have no duration and can only be used inside an algorith or as an operand.

min and max canbe:

  1. a real number.
    {ran f 1.2 9} 
    {ran i 3 6000 30}
    
  2. a Cecilia irate variable. Any irate variable from the Cecilia interface can be used (sliders, toggles, option) by including the name of the variable between [] brackets. The substitution is done before the score is pre-compiled.
    {ran f [blue] [black] } 
    
    where blue and black have been defined as irate variables in the Cecilia interface.
  3. a Cybil function.Any Cybil function can be used to generate a value. Each time the value is needed, the function is evaluated .
    {ran i {ran f .5 3.3} {pik 3 4 5 6 7}}
    

Cybil Help

HELP INDEX