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

Getting Results : Finally

Finally represents the OMLoop output. It is evaluated when the iterative process is over and returns its final result(s) .

If nothing is connected to it, the evaluation of OMLoop returns "nil".

Example : Enumeration of a List

The following example uses an iterator : listloop. at each step of a loop, listloop enumerates an element of a list, then the following element, and so on, until the list is exhausted.

  1. Here, there are four iterations during which listloop takes the successive values from the list.

  2. At the end of this process, Finally returns the current value listloop, that is, the last value of the list.

  3. This value is the result of OMLoop.

Finally Inputs : OMLoop Outputs

Finally has one default input : "patch". It can be added as many optional inputs as necessary : "oppatch".

The optional inputs of finally can be used as additional outputs for OMLoop to return data to external elements in a higher-level program.

Multiple Outputs and "Once" Mode

When an OMLoop has several outputs, it is advised to set it on "evaluate-once" mode to avoid useless multiple evaluations. When the OMLoop is evaluated, the result displayed by the Listener is that of the first output.

page précédentepage suivante
A propos...(c) Ircam - Centre PompidouRéalisé avec Scenari