Recherche Google
OpenMusic DocumentationOM 6.6 User Manual > Visual Programming II > Iterations: OMLoop > Iterators
page précédentepage suivante

Iterators

Function

An iterative operation must be driven by an enumeration , or at least stopped at some point by a given condition . In an OMLoop, this control is enabled by four iterators :

  • Forloop

  • Whileloop

  • Listloop

  • OnListloop

Iterators can enumerate items in lists, but above all, they can stop the OMloop once this enumeration is over. This is why a loop must always have at least one iterator : otherwise, it goes on with infinite iterations.

If several iterators are used simultaneously, the loop stops as soon as one of them stops.

Adding Iterators

To add an iterator in the editor :

  • click on the icon on top of the window

  • Cmd click and type a name.

All the examples provided here make use the eachtime and finally evaluators of OMLoop :
page précédentepage suivante
A propos...(c) Ircam - Centre PompidouRéalisé avec Scenari