ArrayMax:
Filter:
Classes (extension) | UGens > Multichannel | UGens > Analysis

ArrayMax : MultiOutUGen : UGen : AbstractFunction : Object
ExtensionExtension

detect the largest value (and its position) in an array of UGens
Subclasses: ArrayMin

Description

Finds the maximum value in an Array of UGens, and outputs the value and the index.

This is for use in a SynthDef. If you simply need to find out which is the maximum in an array of numbers, use the maxIndex and/or maxItem methods defined for any Collection.

Class Methods

ArrayMax.ar(array)

Arguments:

array

Returns:

# val, index

ArrayMax.kr(array)

Arguments:

array

Returns:

# val, index

Inherited class methods

Instance Methods

Inherited instance methods

Examples

Here we generate a three-channel signal containing some simple test curves, and analyse it to generate a plot:

Here we use the operation as an audio effect: