OpenMusic

Visual Programming | Computer-Assisted Composition

Navigation : Previous | Next

Collect : Collecting Values

** Collect ** is the most basic collector of the OMLoop module. It collects the values returned to its input in a list.

Inputs and Outputs

Collect has one default input and three outputs :

—|—

Example : Building a Random List of Numbers

We want to make a list with seven random numbers between 1 and 100.

  1. Forloop defines a number of loops . The iteration will stop after seven loops.

  2. Om-random calculates a random number, which is printed at each loop by EachTime and print.

  3. At each step, the successive elements are collected by collect.

  4. After seven loops, the iteration is stopped by forloop.

  5. When the iteration stops, Finally returns the list of the numbers collected by collect.

—|—

References :

Contents :

Navigation : Previous | Next