OpenMusic

Visual Programming | Computer-Assisted Composition

Navigation : Previous | Next

Min and Max : Comparing Values

** Min ** and max compare the successive values of an iteration, and return the lowest or the highest one.

Inputs and Outputs

Min and max have one default input and three outputs :

  1. triggers the collection and the comparison of these incoming values

  2. returns the current lowest or highest collected value at each step of the loop

—|—

Example : Selecting the Lowest or Higher Value of a List

  1. Listloop enumerates the numbers of a list and returns them successively to min or max.

  2. Each time, the new number is compared to the current value.

If it is higher - max - or lower - min - than the current value, it is stored instead of this current value.

  1. The current value is printed.

  2. The second output of min and max returns the resulting lowest or greatest value of all the list to Finally.

References :

Contents :

Navigation : Previous Next