Home Nodes Channel nodes 

Math channel node

Perform a variety of arithmetic operations on and between channels.

This chop allows you to perform a variety of arithmetic operations on and between channels. Channels of a chop can be combined, and several chops can be combined.

Unary Operations

Unary operations are performed on individual channels. Unary operations are:

Off

Don’t do anything to the channel.

Negate

Take the negative value of each sample of the channel.

Positive

Make negative values of the channel positive (absolute).

Root

Take the square root of all values in the channel.

Square

Square all the values in the channel.

Inverse

Take the inverse (1/x) of all values in the channel.

Combine Channels

Operations between channels can be done within an input or between inputs. The operations are done on a sample by sample basis:

Off

Don’t combine the channels.

Add

Sum all the channels.

Subtract

Subtract all the channels from the first.

Multiply

Take the product of all the channels.

Divide

Divide the first channel by all the rest.

Average

Take the average of all the channels.

Maximum

Take the maximum value of all the channels.

Minimum

Take the minimum value of all the channels.

Length

Assume the channels are a vector and compute its length.

Parameters

OP

Channel Pre OP

A menu of unary operations that are performed on single channels as they come in to the Math CHOP.

Combine Channels

A menu of operations that is performed between the channels of a single input CHOP, for each input.

Combine CHOPs

A menu of operations that is performed between the input CHOPs, combining several CHOPs into one.

Channel Post OP

A menu of more unary operations that is performed on the channels resulting from the above operations.

Match By

Match channels between inputs by name or number.

Align

The alignment to use when aligning channels from different inputs. See the help for the Merge CHOP.

Mult-Add

Pre-Add

First, add value to each new channel.

Multiply

Then multiply by this value.

Post-Add

Then add this value.

Range

From/To Range

Another way to multiply/add. Converts from one low-high range to another range.

Locals

I

the current index

V

the current value

C

current channel index (0 to NC-1)

NC

total number of channels

Examples

The following examples are specifically designed to demonstrate this node:

MathBasic

$HFS/mozilla/documents/examples/nodes/chop/math/MathBasic.cmd

The following examples use this node:

ChannelBasic

$HFS/mozilla/documents/examples/nodes/chop/channel/ChannelBasic.cmd

Envelope

$HFS/mozilla/documents/examples/nodes/chop/envelope/Envelope.cmd

Lookup

$HFS/mozilla/documents/examples/nodes/chop/lookup/LookupCHOPExample.otl