The Max/FTS Objects Reference Manual

Curtis Roads, Editor

Department of Pedagogy

IRCAM

1, Place Stravinsky

75004 Paris

France

Beta version of the documentation, April 1993

Copyright 1988, 1993 by IRCAM

All rights reserved

Apple is a trademark of Apple Computer, Inc.

Fts is a trademark of IRCAM

This manual documents each Fts object,specifying its protocols for input, output, arguments, and additional references. The objects are listed in alphabetical order.


+

Add two numbers, output the result.

Input

int
In left inlet. The number is added to the right inlet and the result is sent to the outlet. In right inlet. The number is stored for addition to a number received in the left inlet.
float
Converted to int, unless + has a float argument.
bang
In left inlet. Performs the addition with the numbers currently stored. If there is no argument, + initially contains 0.
list
In left inlet. The first number is added to the second number and the result is sent to the outlet.

Arguments

int
float
Optional. Sets an initial value that is added to a number received in the left inlet. Arguments with a decimal point cause the numbers to be added as floats.

Output

int
The sum of two numbers received in the inlets.
float
The sum of two numbers received at the inlets, only if there is an argument with a decimal point.

See


+~

Returns the sum of two signals.

Input

signal
Signals input to the left and right inlets are added together

Arguments

None.

Output

signal
The sum of the signals input to the left and right inlets.

See


-

Subtract two numbers, output the result.

Input

int
In left inlet. The number in the right inlet is subtracted from the number and the result is sent to the outlet. In right inlet. The number is stored to be subtracted from the number received in the left inlet.
float
Converted to int, inless - has afloat argument.
bang
In left inlet. Performs the subtraction with the numbers currently stored. If there is no argument, - initially contains 0.
list
In left inlet. The second number is subtracted from the first number and the result is sent to the outlet.

Arguments

int
float
Optional. Sets an initial value that is subtracted from a number received in the left inlet. Arguments with a decimal point cause the numbers to be added as floats.

Output

int
The difference between the two numbers received in the inlets.
float
The difference between the two numbers received at the inlets, only if there is an argument with a decimal point.

See


-~

Returns the difference of two signals.

Input

signal
The signal input to the right inlet is subtracted from the signal input to the left inlet

Arguments

None.

Output

signal
Sends out the difference of the signals coming in the left and right inlets.

See


*

Multiply two numbers, output the result

Input

int
In left inlet: The number is multiplied by the number in the right inlet, and the result is sent out the outlet. In right inlet: stores the number for multiplication with a number received in the left inlet.
float
Converted to int before multiplication, unless * has a float argument.
bang
In left inlet: Performs the multiplication with the numbers currently stored. If there is no argument, * initially holds 0 as a multiplier.
list
In left inlet: The first number is multiplied by the second number, and the result is sent out the outlet.

Arguments

int
float
Optional. Sets the initial value, to be multiplied by a number received in the left inlet. Argument with a decimal point causes the numbers to be multiplied as floats.

Output

int
The product of the two numbers received in the inlets.
float
The product of the two numbers received in the inlets. Only if there is an argument with a decimal point.

See


*~

Multiplies two signals.

Input

signal
Multiply signals input to the left and right inlets.

Arguments

None.

Output

signal
The first signal multiplied by the second.

See


/

Divide two numbers, send out the result.

Input

int
In left inlet: the number is divided by the number in the right inlet, and the result is sent out the outlet. In right inlet: the number is stored as the divisor (the number to be divided into the number in the left inlet).
float
Converted to int, unless / has afloat argument.
bang
In left inlet: Performs the division with the numbers currently stored.
list
In left inlet: The first number is divided by the second number, and the result is sent out the outlet

Arguments

int
float
Optional. Sets an initial value for the divisor. If there is no argument, the divisor is set to 1 initially. Argument with a decimal point causes the number to be divided as floats. (Division by 0 is not allowed. Integer division by 0 outputs 0.)

Output

int
When the two numbers in the inlets are divided, the result is sent out the outlet.
float
Only if there is an argument with a decimal point.

See


/~

Divides two signals.

Input

signal
The signal input to the left inlet is divided by the signal input to the right inlet. If the right input is zero, 0 is output.

Arguments

None.

Output

signal
The first signal divided by the second.

See


%

Divide two numbers, output the remainder

Input

int
In left inlet: the number is divided by the number in the right inlet; the remainder is sent out the outlet. In right inlet: the number is stored as the divisor (the number to be divided into the number in the left inlet) for calculating the remainder.
float
Converted to int .
bang
In left inlet: Performs the operation with the numbers currently stored.
list
In left inlet: The first number is divided by the second number, and the remainder is sent out the outlet

Arguments

int
Optional. Sets an initial value for the divisor. If there is no argument, the divisor is set to 1 initially.

Output

int
When the two numbers in the inlets are divided, the remainder is sent out the outlet. % is sometimes called the modulo operator.

See


<

Is less than, compare two numbers

Input

int
In left inlet: If the number is less than the number in the right inlet, < outputs 1. Otherwise, < outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless < has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, < initially holds 0 for comparison.
list
In left inlet: If the first number is less than the second number, < outputs 1. Otherwise, < outputs 0.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the number in the left inlet is less than the number in the right inlet. 0 if the number in the left inlet is greater than or equal to the number in the right inlet.

See


<=

Is less than or equal to, compare two numbers

Input

int
In left inlet: If the number is less than or equal to the number in the right inlet, <= outputs 1. Otherwise, <= outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless <= has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, <= initially holds 0 for comparison.
list
In left inlet: If the first number is less than or equal to the second number, <= outputs 1. Otherwise, <= outputs 0.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the number in the left inlet is less than or equal to the number in the right inlet. 0 if the number in the left inlet is greater than the number in the right inlet.

See


==

Compare two numbers, output 1 if they are equal

Input

int
In left inlet: The number is compared with the number in the right inlet. If the two numbers are equal, = = outputs 1. If they are not equal, = = outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless = = has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, = = initially holds 0 for comparison.
list
In left inlet: Compares first number and second number, outputs 1 if they are equal, 0 if they are not equal.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the numbers in the inlets are equal, 0 if they are not equal.

See


!=

Compare two numbers, output 1 if they are not equal

Input

int
In left inlet: The number is compared with the number in the right inlet. If the two numbers are not equal, != outputs 1. If they are equal, != outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless != has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, != initially holds 0 for comparison.
list
In left inlet: Compares first number and second number, outputs 1 if they are not equal, 0 if they are equal.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the numbers in the inlets are not equal, 0 if they are equal.

See


>=

Is greater than or equal to, compare two numbers

Input

int
In left inlet: If the number is greater than or equal to the number in the right inlet, >= outputs 1. Otherwise, >= outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless >= has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, >= initially holds 0 for comparison.
list
In left inlet: If the first number is greater than or equal to the second number, >= outputs 1. Otherwise, >= outputs 0.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the number in the left inlet is greater than or equal to the number in the right inlet. 0 if the number in the left inlet is less than the number in the right inlet.

See


>

Is greater than, compare two numbers

Input

int
In left inlet: If the number is greater than the number in the right inlet, > outputs 1. Otherwise, > outputs 0. In right inlet: The number is stored to be compared with a number received in the left inlet.
float
Converted to int before comparison, unless > has a float argument.
bang
In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, > initially holds 0 for comparison.
list
In left inlet: If the first number is greater than the second number, > outputs 1. Otherwise, > outputs 0.

Arguments

int
float
Optional. Sets the initial value, to be compared with a number received in the left inlet. Argument with a decimal point forces a float comparison.

Output

int
1 if the number in the left inlet is greater than the number in the right inlet. 0 if the number in the left inlet is less than or equal to the number in the right inlet.

See


&&

If both numbers are non-zero, output 1, otherwise output 0

Input

int
If the number in both inlets is not 0, then the output is 1. If the number in one or both of the inlets is 0, then the output is 0. A number in the left inlet triggers the output.
float
Converted to int.
bang
In left inlet: Performs the operation with the numbers currently stored. If there is no argument, && initially holds 0.
list
In left inlet: If both the first and second numbers are not 0, then the output is 1. Otherwise, the output is 0.

Arguments

int
Optional. Sets an initial value to be stored by &&. A number in the right inlet changes the value set by the argument.

Output

int
If the number in the left inlet and the number in the right inlet (or specified by the argument) arer both not 0, the the output is 1. Otherwise, the output is 0.

See


||

If either of two numbers is non-zero, output 1

Input

int
If the number in either inlet is not 0, then the output is 1. If the number in both of the inlets is 0, then the output is 0. A number in the left inlet triggers the output.
float
Converted to int.
bang
In left inlet: Performs the operation with the numbers currently stored. If there is no argument,|| initially holds 0.
list
In left inlet: If either the first or second number is not 0, then the output is 1. Otherwise, the output is 0.

Arguments

int
Optional. Sets an initial value to be stored by ||. A number in the right inlet changes the value set by the argument.

Output

int
If either the number in the left inlet or the number in the right inlet (or specified by the argument) is not 0, then the output is 1. Otherwise, the output is 0.

See


&

Bitwise intersection of two numbers

Input

int
In left inlet: The number is compared, in binary form, with the number in the right inlet. The output is a number comprised of those bits which are 1 in both numbers. In right inlet: The number is stored for comparison with a number received in the left inlet.
float
Converted to int.
bang
In left inlet: : Performs the comparison with the numbers currently stored. If there is no argument, & initially holds 0.
list
In left inlet: Compares the first and second numbers bit-by-bit, and outputs a number comprised of those bits which are 1 in both numbers.

Arguments

int
Optional. Sets an initial value to be compared with a number received in the left inlet.

Output

int
The two numbers received in the inlets are compared, one bit at a time. If bit is 1 in both numbers, it will be 1 in the output number, otherwise it will be 0 in the output number.

See


|

Bitwise OR of two numbers

Input

int
In left inlet: Outputs a number comprised of all those bits which are 1 in either of the two numbers. In right inlet: The number is stored for combination with a number received in the left inlet.
float
Converted to int.
bang
In left inlet:Performs the calculation with the numbers currently stored. If there is no argument, I initially holds 0.
list
In left inlet: Combines the first and second numbers bit-by-bit, and outputs a number comprised of those bits which are 1 in either of the two numbers.

Arguments

int
Optional. Sets an initial value to be or-edwith a number received in the left inlet.

Output

int
All the nonzero bits of the two numbers received in the inlets are combined. If a bit is 1 in either of the two numbers, it is assigned a value of 1 in the output number, otherwise it is assigned 0 in the output number.

See


<<

Shift all bits to the left

Input

int
In left inlet: All bits of the number, in binary form, are shifted to the left by a certain number of bits. The resulting number is sent out the outlet. In right inlet: The number is stored as the number of bits to left- shift the number in the left inlet.
float
Converted to int.
bang
In left inlet: Performs the bit-shift with the numbers currently stored. If there is no argument, << initially holds 0 as the number of bits by which to shift.
list
In left inlet: The first number is bit-shifted to the left by the number of bits specified by the second number.

Arguments

int
Optional. Sets an initial value for the number of bits by which to shift leftward.

Output

int
The number in the left inlet is bit-shifted to the left by a certain number of bits. The number of bits by which to shift is specified by the number in the right inlet. The output is the resulting bit- shifted number.

See


<<

Shift all bits to the right

Input

int
In left inlet: All bits of the number, in binary, are shifted to the right by a certain number of bits. The resulting number is sent out the outlet. In right inlet: The number is stored as the number of bits to right-shift the number in the left inlet.
float
Converted to int.
bang
In left inlet: Performs the bit-shift with the numbers currently stored. If there is no argument, >> initially holds 0 as the number of bits by which to shift.
list
In left inlet: The first number is bit-shifted to the right by the number of bits specified by the second number.

Arguments

int
Optional. Sets an initial value for the number of bits by which to shift rightward.

Output

int
Shift to the right the number in the left inlet by a certain number of bits. The number of bits by which to shift is specified by the number in the right inlet. The output is the resulting bit-shifted number.

See


2pole~

2pole~ is a two-pole filter, which is less costly than wahwah~. This is the simplest resonant filter possible in Fts, the equation being: y[n] = c0 * x[n] + c1 * y[n-1] + c2 * y[n-2] where x[n] is the input signal, y[n] is the output signal and c0, c1, and c2 are the three coefficients.

Input

signal
In the left inlet. The signal to be filtered.
float
In any but the leftmost input, change the corresponding coefficients, in left to right order, c0, c1, c2
set
Changes all the coefficients at once.

Arguments

Six floats
Optional. Initial values for the coefficients.

Output

signal
Filter output.

See


2p2z~

2p2z~ is a two-pole two-zero filter that is less computationally expensive than wahwah~. If the input is x[n], the output is y[n], and letting z[n] be temporary, the filter is defined as: z[n] = c0 * x[n] + c1 * z[n-1] * c2 * z[n-2] y[n] = d0 * z[n] + d1 * z[n-1] +d2 * z[n-2]

Input

signal
In the left inlet. The signal to be filtered.
float
In any but the leftmost input, change the corresponding coefficients, in left to right order, c0, c1, c2, d0, d1, d2
set
Changes all the coefficients at once.

Arguments

Six float
Optional. Initial values for the coefficients.

Output

signal
Filter output.

See


abs

Send out the absolute value of the input

Input

int
The absolute (non-negative) value of the input is sent out the output.
float
Converted to int .

Output

int
The absolute value of the input.

See


accum

Store, add to, and multiply a number

Input

int
In left inlet: replaces the value stored in accum, and sends the new value out the outlet. In middle inlet: adds number to the stored value, without triggering output. In right inlet: multiples the input by the stored number, without triggering output.
float
In left and middled inlet: Converted to int, unless accum has a float argument. In right inlet: Multiplication is done with floats, even if the value is stored as an int.
bang
In the left inlet: Outputs the value currently stored in accum.
set
In the left inlet: The word set, followed by a number, sets the stored value to that number, without triggering output.

Arguments

int
float
Optional. Sets the initial value stored in accum. An argument with a decimal point causes the value to be stored as a float.

Output

int
The value currently held by accum.
float
Only if there is an argument with a decimal point.

See


adc~

Get input from the analog to digital converters

Input

start
Starts the signal processing network. Only one start message, sent to any adc~ or dac~ object, is needed to turn on the network for an entire patch.
stop
Stops the signal processing network. Only one stop message, sent to any adc~ or dac~ object, is needed to turn off the network for an entire patch.

Arguments

int
The adc~ object can take up to eight arguments, each an integer between 1 and 8 corresponding to the eight possible ADC channels. For each argument, adc~ will create an outlet from which the channel named by the argument will be output. The order of the argument determines to which outlet it will correspond. For example, if the third argument is 2, the third outlet outputs the signal coming in the second channel. If no arguments are given, adc~ outputs channels 1 and 2 from the left and right outlets, respectively.

Output

signal
Each outlet generates a signal coming from the ADC channel that is specified by the object's arguments (see Arguments above).

See


bag

Store a collection of numbers

Input

int
In the left inlet: the int is either added to or deleted from the collection of numbers stored in bag, depending on the number at the right inlet. In the right inlet: the int is stored as an indicator of whether to include or delete the next number received in the left inlet. If non- zero, the number received in the left inlet is added to the bag. If 0, the number is deleted from the bag.
float
Converted to int.
bang
In the left inlet: causes bag to send all its numbers out the oulet.
clear
In the left inlet: deletes the entire contents of the bag.
list
In the left inlet: If the second number is not 0, the first number is included in the bag. If the second number is 0, the first number is deleted from the bag.

Arguments

symbol
Optional. Causes bag to store duplicate numbers. If there is no argument, bag stores only one of each number at a time. The argument must not be a number.

Output

int
The numbers stored in bag are sent out one a time, in reverse order from that in which they were stored.

See


bangbang

Send a bang to many places+/-in right-to-left order

Input

anything
Causes a bang to be sent out all outlets, in right-to-left order.

Arguments

int
Optional. Sets the number of outlets. Limited between 1 and 10. Any number greater than 10 is set to 10; any number less than 1 is set to 2. If there is no argument, there will be 2 outlets.
float
Converted to int.

Output

bang
When a message is received in the inlet, bang goes out each outlet, in order from right to left.

See


bendin

Output incoming MIDI pitch bend values

Input

MIDI
No inlets available. The input MIDI pitch bend message received directly from the serial port.

Output

int
If a specific channel number is included in the argument, there is only one outlet. The output is the incoming pitch bend value from 0-127 (the most significant byte of the MIDI pitch bend message) on the specific channel and port. If no channel number is specified by the argument, bendin provides a second outlet on the right, which sends out the channel number of the incoming pitch bend message.

See


bendout

Transmit MIDI pitch bend messages

Input

int
In left inlet: The number is transmitted as a MIDI pitch bend value on the specific channel and port. Numbers are limited between 0 and 127. In right inlet: The number is stored as the channel number on which to transmit the pitch bend messages.
float
Converted to int.
list
In left inlet: The first number is the pitch bend value, and the second number is the MIDI channel.

Output

(MIDI message) No outlets. The output is a MIDI pitch bend message transmitted directly to the serial port.

See


button

Flash on any message, send a bang

Input

anything
When a message is received at the inlet, button flashes briefly and bang is sent out the oulet. A mouse click on the button has the same effect.

Output

bang
A mouse click or any message in the inlet causes button to flash and send out bang.

See


change

Filter out repetitions of a number

Input

int
The number is sent out the outlet only if it is different from the currently stored value. Replaces the stored value.
set
The word set followed by a number, replaces the stored value without triggering output.

Arguments

int
Optional. Initial value for comparison to incoming numbers. if there is no argument, the initial value is 0.

Output

int
Out left outlet: The number received in the inlet is sent out only if it is different from the stored value.

See


clip~

Clips an incoming signal to specified minimum and maximum values if the incoming signal goes outside their range.

Input

signal
Signal to be clipped

Arguments

float
Minimum and maximum values passed through the clipper.

Output

signal
Clipped signal.

See


comment

Put explanatory notes or labels in a patch.

Input

anything
The comment object has no inlets and receives no input.

Arguments

text
Typed by the user directly into the comment box when the Patcher window is in Edit mode. When the Patcher window is locked, the outline of the comment box disappears, and only the text is shown. The appearence of a comment can be modified by changing the font and by resizing its box.

Output

None
A comment has no outlet, sends no output, and does not affect the functioning of the patch.

See


ctlin

Output incoming MIDI control values

Input

MIDI
No inlets available. The input is a MIDI control message received from the serial port.

Arguments

int
A single controller number to be recognize by ctlin. If there is no controller number, or if the argument is a negative number, ctlin recognizes all controller numbers. If a single controller number is specified in the argument, the outlet which normally sends the controller number is unnecessary, and is not created. Following the controller number argument is a single channel number on which to receive control messages. If the channel argument is not present, ctlin receives control messages on all channels. In order for this argument to be used, a controller number argument must precede it. To specify a channel number without specifying a controller number, use -1 for the controller number. If a single channel number is specified as an argument, the outlet which normally sends the channel number is unnecessary, and is not created.

Output

int
Out left outlet: The number is the control value of an incoming MIDI control change message. If a specific controller number is not specified as an argument, the controller number is sent out the second outlet. If a specific channel number is not included in the argument, the channel number is sent out an additional, right, outlet.

See


ctlout

Transmit MIDI control messages

Input

int
In left inlet: The number is used as a control value, and ctlout transmits a MIDI control change message. Numbers are limited between 0 and 127. In middle inlet: The number is stored as the controller number of the control change messages transmitted by ctlout. Numbers are limited between 0 and 127. In right inlet: The number is stored as a channel number on which to transmit the control messages.
float
Converted to int .
list
In left inlet: The first number is the control value, the second the controller number and the third the channel number. ctlout transmits a MIDI control change message that takes these values.

Arguments

int
The first argument is an initial value for the controller number to be used in control messages transmitted by ctlout. Controller numbers must fall between 0 and 127. If no controller number is specified, the initial controller number is 1. Following the controller number argument is an initial value for the channel number on which to transmit control messages. If the channel argument is not present, ctlout initially transmits control messages on channel 1. In order for this argument to be used, a controller number argument must precede it.

Output

(MIDI message) No outlets. Transmits a MIDI control message directly to the serial port.

See


dac~

Send out a signal from the digital-to-analog converters (DACs).

Input

start
Activates the signal processing network. Only one start message, sent to any adc~ or dac~ object, is needed to turn on the network for an entire patch.
stop
stop Deactivates the signal processing network. Only one stop message, sent to any adc~ or dac~ object, is needed to turn off the network for an entire patch.
signal
Each inlet of the dac~ object accepts a signal intended for a specific DAC channel. The correspondence between inputs and channels is determined by the object's arguments (see Arguments below). The default is the left inlet for the left channel, and the right inlet for the right channel. Signals sent to the same destination channel from more than one dac~ object are added together before being output. It is not possible to input more than one signal to the same inlet on a single dac~ object.

Arguments

int
The dac~ object can take up to eight arguments, each an integer between 1 and 8 corresponding to the 8 possible DAC output channels. For each argument, dac~ creates an inlet for that channel's signal. The order of the argument determines to which inlet it corresponds. For example, if the fourth argument is 5, the fourth inlet accepts a signal for the fifth DAC channel. With no arguments, dac~ will accept channels 1 and 2 from the left and right inlets, respectively.

Output

None.

See


delay / del

Delay a bang before passing it on

Input

bang
In left inlet: Delays a bang a specified number of milliseconds before sending it out the outlet.
stop
In left inlet: Stops delay from outputting the bang it is currently delaying.
int
In right inlet: The number is stored as the number of milliseconds to delaya bang received in the left inlet.
float
Converted to int .

Arguments

int
Sets an initial value for the number of milliseconds to delay a bang received in the left inlet. If there is no argument, the initial value is 0.
float
Converted to int.

Output

bang
A bang received in the left inlet is delayed by the number of milliseconds specified by the right inlet, then is sent out the outlet. Only one bang at a time can be delayed by delay. If a bang is already in delay when a new bang is received in the left inlet, the first bang is discarded.

See


delread~

Reads a signal from a delay line at a fixed tap point.

Input

signal
Order forcing input only.
int
The location of the tap in milliseconds. Changing this value while a signal is being read can cause clicks. For a moving tap, use vd~.

Arguments

symbol
Specifies the name of the delay line from which to read. This name must refer to a delay line already created by a delwrite~ object.
float
Optional. The initial tap location in milliseconds.
float
Optional. If nonzero, forces the delay length to an even number of samples in order to make the delread~ run slightly faster.
int
Optional. If this argument is included and nonzero, delread~ forces the delay tap to an even numbered sample. This improves the efficiency of the object by 50%.

Output

signal
The contents of the delay line specified by the first argument at the location specified by the second argument or the most recent integer input.

See


delwrite~

Creates a delay line and writes a signal into it.

Input

signal
The signal to be written into the delay line.

Arguments

symbol
Specifies the name of the delay line to be created. delread~ objects with the same name will read from this delay line. No two delwrite~ objects in the same patch should share the same name.
int
The size for the delay line in milliseconds (i.e., memory allocation). The actual number of samples allocated changes automatically if a new sample rate is specified.

Output

signal
A dummy signal for order forcing only.

See


down~

Downsamples an incoming signal, reducing its sample rate by half, without pitch change.

Input

signal
The signal to be downsampled.

Arguments

None.

Output

signal
The input signal represented at half of its original sample rate.

See


drunk

Output random numbers in a moving range

Input

bang
In left inlet: Causes drunk to take a step of random size up or down from its currently stored value. It updates the stored value and sends it out the outlet.
int
In left inlet: The number replaces the stored value and sends it to the outlet. In middle inlet: The number is stored as the maximum value that can be output by drunk. (Note: If the specified maximum is less than 0 it is set to 0.) In right inlet: The number limits the step size taken in response to a bang in the left inlet. The step (up or down) is always less than this number.
float
Converted to int.
list
In left inlet: The second number in the list sets the maximum value output by drunk, and the third number (if present) limits the step size, then the first number replaces the stored value and is sent out the outlet.
set
In left inlet: The word set, followed by a number, sets the stored value of drunk to that number without triggering output. The stored value is initially set in the center of the total range (half the maximum value).

Arguments

int
Optional. The first argument sets the initial value for the maximum number that can be output by drunk. The second argument sets an initial limit on the size of random steps taken by drunk; the absolute value of the step size is always less than this limit. If there are no typed-in arguments, the maximum value is 128 and the step size limit is set to 2 (movement up or down by no more than 1).

Output

int
The number sent out the outlet is automatically limited between 0 and the specified maximum value.

See


expr

Evaluate a mathematical expression.

Input

int
The number in each inlet is stored in place of the $i or $f argument associated with it. For example: The number in the second inlet from the left is stored in place of the $i2 and $f2 arguments, wherever they appear.
float
The number each inlet is stored in place of the $f or $i argument associated with it. The number will be truncated by a $i argument.
bang
In left inlet: Evaluates the expression using the values currently stored. Any messages in the left inlet evaluates the expression and sends out the result. A value must have been received for each changeable argument, in order for the expression to be evaluated. The number of the inlets is determined by how many changeable arguments are typed in. The maximum number of inlets is nine.

Arguments

expression
The argument is a mathematical expression, in a format resembling the C programming language. The expression is made up of numbers, arithmetic operators such as + or *, comparisons such as < or >, C functions such as min() or pow(), and changeable arguments ($i, $f,) for ints and floats in the inlets. Numbers can be used as constants in the mathematical expression. A changeable int argument is specified by $i or $f and an inlet number (example: $i2). The argument is replaced by numbers received in the specified inlet. Arithmetic operators understood by expr are: +, -, *, /, ~ and ^ (to the power of). Other operators are &, &&, I, II, and ! (not). Many C language functions are understood by expr. A function must be followed immediately by parentheses containing any arguments necessary to the function. If the function requires a comma between arguments, the comma must be preceded by a backslash (\) so that Fts will not be confused by it. For example: pow($1\,2). C language functions understood by expr are: abs, min, max, sin, cos, tan, asin, acos, atan, atan2, sinh, tanh, int (convert to integer),float (convert tofloat), pow, sqrt, fact (factorial), exp (power of e to x), log 10 (log), ln or log (natural log), and random.

Output

int
float
The output is the result of the evaluated expression.

See


fft~

Applies a Fast Fourier Transform (FFT) to an incoming signal

Input

signal
In the left inlet. The real part of the signal to be analyzed.
signal
In the right inlet. The imaginary part of the signal to be analyzed.

Arguments

int
The first argument is the FFT size+/-the number of points in each FFT. It must be a power of two between 16 and 1024. (There is no window overlap.) The second argument, also a power of two and an integer multiple of the first argument, is the number of points between the beginnings of each successive FFT. The third argument is an offset value which indicates how many samples from the beginning of the signal the first window begins. This last argument must be a multiple of 64.

Output

signal
From the left outlet. The real part of the transform.
signal
From the middle outlet. The imaginary part of the transform.
bang
From the right outlet. A bang is output each time a new analysis begins (i.e., before each window)

See


float

Store a decimal number

Input

float
In left inlet: The number replaces the currently stored value and is sent out the outlet. In right inlet: The number replaces the stored value without triggering output.
bang
In left inlet: Sends the stored value out the outlet.
set
In left inlet: The word set, followed by a number, replaces the stored value without triggering output.

Arguments

float
Optional. Sets an initial value to be stored in float. If there is no argument, the initial value is 0.0. A floating-point argument by itself, without the word float, is another way of creating and initializing a float object.

Output

float
A number is stored in float as a single-precision floating point number. The precision possible in the decimal portion of the number decreases as the integer part increases. Note: Because of the the way decimal numbers are stored, a float value saved in a Patcher file might be slightly altered when the file is reopened.

See


fswap

Reverse the sequential order of two decimal numbers

Input

float
In left inlet: The number is sent out the right outlet, then the number in the right inlet is sent out the left outlet. In right inlet: The number is stored to be sent out the left outlet when a number is received in the left inlet.
int
If there is a float argument, the numbers are converted to float. If there is an int argument or no argument, the number received in the right inlet is stored as an int.
list
In left inlet: The numbers are stored in fswap. The first number is sent out the right outlet, then the second number is sent out the left outlet.
bang
In left inlet: Swaps and sends out the numbers currently stored in fswap.

Arguments

int
float
Optional. Sets an initial value for the number which is to be sent out the left outlet. If there is no argument, the initial value is 0. If there is an int argument or no argument, an int is sent out the left outlet. The number sent out the right outlet is always a float.

Output

float
When a number is received in the left inlet, the number in each inlet is sent out the opposite outlet.

See


funbuff

Store x, y pairs of numbers together

Input

list
In left inlet: The first number is the x value, and the second number is the y value, of an x, y pair stored in funbuff. If the x value is the same as an x value already stored in funbuff, the previously stored pair is replaced by the new pair.
int
In left inlet: The number is the x value of an x, y pair. If a y value has been received in the right inlet, the two numbers are stored together in funbuff. Otherwise, the x value causes the corresponding y value stored in funbuff to be sent out the left outlet. If there is no stored x value which matches the number received, funbuff uses the closest x value which is less than the number received, and sends out the corresponding y value. In right inlet: The number is a y value that is paired with the next x value received in the left inlet, and stored in funbuff.
clear
Erases the contents of funbuff.
goto
Followed by a number, sets a pointer to the x value specified by the number.
next
Finds the x value pointed to by the pointer (or, if the pointer points to a number not yet stored as an x value, to the next greater x value), and sends the corresponding y value out the left outlet. Also, funbuff calculates the difference between that x value and the value previously pointed to by the pointer, sends the difference out the middle outlet, and resets the goto pointer to the next greater x value.

Arguments

symbol
Optional. The argument specifies the name of a file to be read into funbuff when the patch is loaded. A file for funbuff can also be created using a text editor window, beginning the text with the word funbuff, followed by a list of space-separated numbers that specify alternating x and y values.

Output

int
Out left outlet: When an x value is received in the left inlet, the corresponding y value is sent out. (Or, if there is no such x value yet stored in funbuff, the y value corresponding to the next lesser x value is sent out). When the word next is received in the left inlet, funbuff sends out the y value that corresponds to the x value pointed to by its pointer (or, if there is no such x value, the y value of the next greater x value). Out middle outlet: When the word next is received in its left inlet, funbuff sends out the difference between the x value pointed to by its pointer, and the x value previously pointed to, the resets the pointer to the next x value.
bang
Out right outlet: When the pointer reaches the end of a funbuff, no numbers are sent out in response to a next message, but a bang is sent out to notify that the end has been reached.

See


gate

Pass the input out to an outlet

Input

float
In left inlet, converted to int.
anything
In right inlet, all messages go out the open outlet, specified by the number in the left inlet.

Arguments

None.

See


ifft~

Applies an inverse FFT to an incoming signal

Input

signal
In the left inlet. The real part of the signal to be transformed.
signal
In the right inlet. The imaginary part of the signal to be transformed.

Arguments

int
The first argument is the number of points in each IFFT window. It must be a power of two between 16 and 1024 . The second argument, also a power of two and a multiple of argument 1, is the number of points between the beginnings of each sucessive window. There is no overlqp. The third argument is an offset value which how many samples from the beginning of the signal the first window should begin. (This last argument is useful for windowing.)

Output

signal
From the left outlet. The real part of the signal.
signal
From the middle outlet. The imaginary part of signal.
bang
From the right outlet. A bang is output each time a new analysis begins (i.e., before each window)

See


inlet

Receive messages from outside a patcher window

Input

anything
Each inlet object in a patch shows up as an inlet at the top of a patcher object box when the patch is used inside another patch (as an object or a subpatch). Messages sent into such an inlet are received by the inlet object in the subpatch.

Output

anything
In a subpatch inlets sends out whatever messages it receives through patch cords from the patch that contains it.

See


int

Store an integer value

Input

int
In left inlet: The number replaces the currently stored value and is sent out the outlet. In right inlet: The number replaces the stored value without triggering output.
float
Converted to int .
bang
In left inlet: Sends the stored value out the outlet.
set
In left inlet: The word set, followed by a number, replaces the stored value without triggering output.

Arguments

int
Optional. Sets an initial value to be stored in int. If there is no argument, the initial value is 0. An int argument by itself, without the word int , is another way of creating and initializing an int object.
float
Converted to int .

Output

int
A number is stored in int as a long (32-bit) integer.

See


key

Report keys typed on the keyboard

Input

(Keyboard) The input to key comes directly from the keyboard. No inlets available.

Arguments

None.

Output

int The ASCII value of the typed key is sent each time a key is pressed on the keyboard. (Holding the key down does not produce repeated output.)

See


keyup

Report key released on the keyboard

Input

keyboard
The input to keyup originates directly from the keyboard. No inlets available.

Arguments

None.

Output

int
Each time a key is released on the keyboard, its ASCII values is sent via the outlet. Nothing is sent when the key is first pressed.

See


line

Output numbers in a ramp from one value to another

Input

list
The first number specifies a target value, and the second number specifies a time period (in milliseconds). Over the time period specified, line generates numbers at regular intervals in a straight line from the currently stored value to the target value.
int
In left inlet, the target value to be reached in the time period specified by the middle inlet. If no time has been specified since the last target value, the time is considered 0 and line immediately outputs the target value. In middle inlet, the time period, in milliseconds, in which to arrive at the target value. In right inlet, the grain or time interval in milliseconds at which intermediary numbers are emitted.

Arguments

int
Optional. The first argument sets an initial value to be stored in line. If there is no argument, the initial value is 0. The second argument sets an initial value for the grain, that is, the time interval at which numbers are sent out. If the grain is not specified, line outputs a number every 20 milliseconds. The minimum grain is 1 millisecond; any number less than 1 is set to 20.

Output

int
Left outlet. Numbers go out at regular intervals, describing a straight line toward a target value. If a new target value and time are specified before the line is completed, the new line starts from the most recent output value, in order to avoid discontinuities. If a value is received in the left inlet without an accompanying time value, it is sent out immediately (time is considered 0).
bang
Right outlet. When line has arrived at its target value, bang line emits a bang. Note: In practice, line arrives at the target value in just under the amount of time specified (specifically, in the period: timeInterval minus grain).


line~

Creates a linear interpolation between a given beginning and ending value in a specified amount of time (i.e., it creates breakpoint line segments).

Input

signal
For order forcing and, optionally, to define the sample rate at which the object operates. (If no signal is input the object will use the patch's global sample rate).
int
In the left inlet. Define the destination value, or endpoint of the line segment. The origin, or beginning point is the last value output by the object (or zero if the object has not yet received input).
int
In the right inlet. The time in which the interpolation will make its course from the origin to the destination value. Note that if a new time is not given for a new destination value, the time will be considered to be zero.
list
At the left inlet. Destination time is the same as inputting a value to the right inlet and then the left.

Arguments

0,1,2, or 3 Optional downsampling (decimation) factor. If zero or absent, line~ operates at the sample rate of the patch, or the sample rate of a signal at its input if present. A value of 1, 2, or 3 downsamples line by half, 1/4, and 1/8, respectively.

Output

signal
Anterpolation between the specified origin and destination values in the time given by the the input to the right inlet.

See


makenote

Generate a MIDI note-off message after each note-on

Input

int
In left inlet. A pitch value for MIDI note-on message. It is paired with a velocity value and the numbers go out the outlets. After a certain time, a note-off message (a note-on with a velocity of 0) is sent out for that pitch. In middle inlet. A velocity to be paired with pitch numbers received in the left inlet. In right inlet. The duration in milliseconds that makenote waits before generating a note-off message. .
float
Converted to int.
list
The first number is treated as the pitch and is sent out the left outlet. The second number is treated as the velocity and is sent out the right outlet. A corresponding note-off message goes out later.
stop
Causes makenote to generate immediate note-offs for all notes it currently holds.
clear
Erases all notes currently held by makenote, without sending note-offs.

Arguments

int
Optional. The first argument setsan initial velocity value to be paired with incoming pitch numbers. If there is no argument, the initial velocity is 0. The second arguement sets an initial note duration (time before a note-off is sent out), in milliseconds. If the second argument is not present, the note-off follows the note-on immediately.
float
Converted to int.

Output

int
Out left outlet: The number received in the left inlet is sent out immediately, paired with a velocity value out the other outlet. After a certain duration, the same number is sent out paired with a velocity of 0. Out right outlet: The number in the middle inlet is sent out as a velocity value in conjunction with a pitch value out the left outlet. After a certain duration, 0 is sent out paired with the same pitch.

See


message

Send any message.

Input

bang
Sends out the contents of the message object. A mouse click on the message box has the same effect.
int
float
The number replaces the value stored in the argument $1, if such an argument exists, then sends out the contents of the message object.
list
Each item in the list is stored in place of its corresponding $ argument, if such an argument exists, then the contents of the message box are sent out.
symbol
The word symbol, followed by a symbol, stores that symbol in the $1 argument, then sends out the contents of the message object.
set
The word set, followed by a message, sets the contents of the message box to that new message, without triggering output. The word set by itself erases the contents of the message object.

Arguments

anything
The initial contents of the message object are typed in when the Patcher window is unlocked. Any message of up to 256 items can be contained in a message object. Certain characters have a special meaning,as explained next. A dollar sign ($), followed immediately by a number, is a changeable argument. This argument's value can be replaced by the corresponding item in a list received in the inlet. For example, $2 stores the second item in a list as its value before sending out the contents of the message object. The value of a changeable argument is initially 0. A comma (,) divides a message into separate messages that are sent out in order. (Example: 3, 4, 5 sends out 3, then 4, then 5.) A semicolon (;) sends a message to receive object. The first item following a semicolon is the name of the receive object. The rest of the message (or up to the next semicolon) is sent to that object, rather than out the outlet. The first item after the semicolon can be a changeable argument, so an incoming message can set the destination of the message"on the fly". A backslash (\) negates the special traits of a special character. When a backslash immediately precedes a dollar sign, comma, or semicolon, the character is treated as a normal character. For example, Notes played C\< E\, and G.)

Output

anything
A message object normally transmits its contents to its outlet. However, if a semicolon is present, the rest of the message (or up to the next semicolon) is sent to the specified receive object, rather out the outlet.

See


metro

Output bang at regular intervals

Input

int
In left inlet: Any number other than 0 starts metro. At regular intervals, metro sends a bang out the outlet. 0 stops metro. In right inlet: The number is the time interval, in milliseconds, at which metro sends out a bang. Any number less than 5 is set to 5. A new number in the right inlet does not take effect until the next output is sent.
float
Converted to int .
bang
In left inlet, starts metro.
stop
In left inlet, stops metro.

Arguments

int
Optional. The first argument sets an initial value for the time interval at which metro sends its output. If there is no argument, the initial time interval is 5 milliseconds. Any argument less than 5 is set to 5.

Output

bang
A bang is sent immediately when metro is started, and at regular intervals thereafter.

See


midiformat

Prepare data in the form of a MIDI message

Input

Numbers received in the inlets are used as data for MIDI messages. The data is formatted into a complete MIDI message (with the status byte determined by the inlet) and transmitted to the outlet as individual bytes.
list
In leftmost inlet: The first number is a pitch value and the second number is a velocity value, to be formatted into a note- on message. In 2nd inlet: The first number is an aftertouch (pressure) value and the second number is a pitch value (key number), to be formatted into a polyphonic key pressure message. In 3rd inlet: The first number is a control value and the second number is a controller number, to be formatted into a control message.
int
In 4th inlet: Value formatted into a program change message. In 5th inlet: Value is formatted into an aftertouch (channel pressure) message. In 6th inlet: Value is formatted into a pitch bend message. In rightmost inlet: The number is stored as the channel number of the MIDI messages. The actual value of the status byte is dependent on the channel. Numbers greater than 16 are wrapped around to stay between 1 and 16.
float
Converted to int.

Arguments

int
Optional. Sets an initial value for the channel number of the MIDI messages. Numbers greater than 16 are wrapped around to stay between 1 and 16. If there is no argument, the channel number is initially set to 1.
float
Converted to int.

Output

int MIDI messages are sent out as individual bytes, for recording by the seq object or for transmission by the midiout object.

See


midiin

Send out MIDI data that is coming in from the serial port

Input

(MIDI message) No inlets available. The input is a MIDI message received directly from the serial port.

Output

int
All MIDI messages received are sent out the outlet, byte-by- byte. Note: midin does not"clean up" any use of MIDI's running status feature in the incoming MIDI stream.

See


midiout

Transmit raw MIDI data

Input

int
The number is transmitted as a byte of a MIDI message to the specific port.
float
Converted to int .

Output

(MIDI message) No outlets available. The output is a byte of a MIDI message transmitted directly to the serial port.

See


midiparse

Interpret raw MIDI data

Input

int
Numbers received in the inlet are treated as bytes of a MIDI message (usually from a midiin object). The status bytes determines the outlet used to transmit the data bytes.

Output

list
Out leftmost outlet: A note-on message.The first number is a pitch value and the second number is a velocity value Out second outlet: A polyphonic key pressure message. The first number is an aftertouch (pressure) value and the second number is a pitch value (key number). Out third outlet: A control message.The first number is a control value and the second number is a controller number
int
Out fourth outlet: Program change. Out fifth outlet: Aftertouch (channel pressure) value. Out sixth outlet: Pitch bend value. Out rightmost outlet: MIDI channel number.

See


notein

Transmit incoming MIDI note messages to the output

Input

(MIDI message) No inlets available. The input is a MIDI note-on or note-off message received directly from the serial port.

Output

int
Out left outlet: The number is the pitch value of the incoming note message. Out 2nd outlet: The number is the velocity of the incoming note-on message if non-zero, 0 for a note-off message. If a specific channel number is included in the argument, there are only two outlets. If there is no channel number specified by the argument, notein takes a third outlet, on the right, which outputs the channel number of the incoming note message.

See


noteout

Transmit MIDI note messages

Input

int
In left inlet: The number is the pitch value of a MIDI note message transmitted on the specific channel. Numbers are limited between 0 and 127. In middle inlet: The number is stored as the velocity of a note message, to be used with pitch values received in the left inlet. Numbers are limited between 0 and 127. 0 is considered a note- off message, 1-127 are note-on messages. In right inlet: The number is stored as the channel number on which to transmit the note-on messages.
float
Converted to int.
list
In left inlet: The first number is used as the pitch, the second number is used as the velocity, and the third number is used as the channel, of a tranmitted MIDI note message.

See


Number box

Display and ouput a number

Input

int
float
The number received in the inlet is stored and displayed in the Number box and sent out the outlet. A float is converted to int by an int Number box, and vice-versa. When the Patcher window is locked, numbers can be entered into the Number box by clicking on it with the mouse and typing in a number on the keyboard. Typing the Return key or the Enter key, or clicking outside the Number box, snds the number out the outlet. Dragging up and down on the Number box with the mouse (when the Patcher window is locked) moves the displayed value up and down, and outputs the new values continuously. In the float Number box, dragging to the right of the decimal point changes the value in increments of 1. Dragging to the right of the decimal point changes the fractional part of the number in increments of 0.01.
bang
Sends the currently displayed number out the outlet.
set
The word set, followed by a number, sets the stored and displayed value to that number without triggereing output. (typing) When a Number box is highlighted (indicated by a filled-in triangle) in a Patcher window, numerical keyboard input is sent to the N umber box to change its value. Clicking the mouse or pressing Return or Enter stores a pending typed number.

Output

int
float
The number displayed in the Number box is sent out the outlet. Numbers received in the inlet or typed on the keyboard can exceed the limits of the Number box, but the value that is stored and displayed is automatically limited to the specified range.


osc1~

Generates a sinusoidal wave, or another waveform read from a tab1~ object

Input

signal
In the left inlet. The frequency of the oscillator in Hz.
float
In the left inlet. To reset the phase of the oscillator. Values between 0 and 1 (other values will be taken as modulo 1) correspond to 0deg. to 360deg..
set
In the left inlet. To change the name of the tab1~ object to which the oscillator refers for a waveform (see Arguments below); take a symbol as argument.
signal
In the right inlet. A signal continuously controlling phase. Values between 0 and 1 (other values will be taken as modulo 1) correspond to 0deg. to 360deg..

Arguments

symbol
Optional. With an argument, osc1~ reads from a wavetable defined by a tab1~ object in the same patch which shares the same name argument. Note that if an argument is given to osc1~ and there is no tab1~ object in the patch with the same name, an error occurs.

Output

signal
With no arguments, a cosine wave. With an argument, a periodic waveform defined by a tab1~ object with the same argument. In either case, the ouput wave has a frequency determined by the signal at the object's left inlet, and a phase determined by the signal at the object's right inlet.

See


outlet

An outlet object in the subpatch causes the patcher object in the parent patcher window to sprout an outlet.

Input

anything
Whatever you want to appear on the outlet of the patcher object.

Output

None.

See


pack

Combine numbers into a list

Input

int
The number received in each inlet is stored as an item in a list. A number in the left inlet causes the entire list to be sent out the outlet.
float
The number is converted to int, unless the inlet was intialized with a float argument.
bang
In left inlet: Output a list of the numbers currently stored.
list
In left inlet: Each number in the list is stored (limited by the number of inlets), and the sorted list is sent out the outlet.

Arguments

int
float
Optional. The number of inlets derives from the number of arguments. Each argument sets an initial value for an item in the list stored by pack. Arguments containing a decimal point are stored as floats. The number of arguments is limited between one and ten. If there is no argument, there are be two inlets, and the two list items are set to 0.

Output

list The length of the list derives from the number of arguments. When input is received in the left inlet, the stored list is sent out the outlet.

See


patcher

Create a subpatch within a patch

Input

anything
The number of inlets in a patcher object is determined by the number of inlet objects contained within its subpatch window.

Arguments

symbol
Optional. The subpatch can be given a name by the argument, so that its name appears at the top of the subpatch window. The name at the top of the subpatch window is in brackets to indicate that it is part of another file. If there is no argument, the subpatch window is named (sub patch). Different patcher objects which have the same name are distinct subpatches.

Output

anything
The number of outlets a patcher object has is determined by the number of outlets objects contained within the subpatch window. Output can also be sent via send and value objects contained in the subpatch. The actual messages sent out of a patcher object depend on the contents of the subpatch. When a patcher object is first created, the subpatch window is automatically opened for editing. To view or edit the contents of a patcher object (or any subpatch object) later on, double-click on the object. All the objects in a subpatch of a patcher object are saved in the Patcher that contains the object.

See


pgmin

Transmit incoming MIDI program change values to the output

Input

(MIDI message) No inlets available. The input is a MIDI program change message received directly from the serial port.

Output

int
If a specific channel number is included in the argument, there is only one outlet. The output is the incoming program number on the specified channel. If there is no channel number specified by the argument, pgmin sprouts a second outlet, on the right, which outputs the channel number of the incoming program change message.

See


pgmout

Transmit MIDI program change messages

Input

int
In left inlet: The number transmits as a MIDI program change value on the specified channel. Numbers are limited to the range of 0 to 127. In right inlet: The number is stored as the channel number on which to transmit the program change messages.
float
Converted to int .
list
In left inlet: The first number isthe program number and the second number is the channel of a MIDI program change message, transmitted on the specified channel.

Output

(MIDI message) No outlets available. The output is a MIDI program change message transmitted directly to the serial port.

See


phasor~

Generates a sawtooth wave.

Input

signal
The frequency of the oscillator in Hertz.
float
To reset the phase of the oscillator. Values between 0 and 1 (other values are taken as modulo 1) correspond to 0deg. to 360deg.. Phase is initially set to 0.

Arguments

None.

Output

signal
A sawtooth wave+/-a signal which makes a continuous ramp from 0 to 1 each period+/-with a frequency determined by the signal at its input.

See


pipe

Delay numbers or lists

Input

int
In left inlet: The number is delayed a certain number of milliseconds before it is sent out the left outlet. If there are middle inlets, the numbers in those inlets are also delayed and send out the corresponding outlets. In right inlet: The number is stored as the time (in milliseconds) to delay numbers received in the other inlets.
bang
In left inlet: Retriggers the numbers currently stored in the pipe to be output again in the specific number of milliseconds (in addition to the numbers already being delayed).
float
Converted to int .
list
In left inlet: Numbers are distribued to pipe's inlets to be delayed together. If there is a number for the right inlet, it sets the delay time for the other numbers.
clear
In left inlet: Halts all numbers currently being delayed by pipe.

Arguments

int
Optional. The last argument sets an initial value for the delay time, in milliseconds. If there is no argument, the delay time is 0. If there are two arguments, the first argument sets an initial value to be stored in pipe, and the second arguments sets the delay time. If more than two arguments are present, pipe creates additional inlets and outlets for delaying additional numbers in parallel to the leftmost one.
float
The last argument is converted to int . Other float arguments cause the corresponding outlet to send a float.

Output

int
When a number received in pipe's left inlet, it is delayed by the time specified, then sent out the left outlet. If there are middle inlets, the numbers in those inlets are also delayed and sent out their corresponding outlet, in response to a number is received in the left inlet. Unlike delay, more than one number at a time can be delayed in a pipe. When a new delay time is received in the right inlet, it does not affect the numbers already being delayed by pipe will come out.

See


poly

Allocate to different voices

Input

list
In left inlet: The first number is treated as a pitch, and the second number is treated as a velocity value, of a pitch-velocity pair. If the velocity is not 0, poly allocates that note-on to the first available voice number and sends it out. If the velocity is 0, poly frees the voice that is holding that pitch and sends out the note-off.
int
In left inlet:The number is treated as the pitch value of pitch- velocity pair and the note is sent out. In right inlet: The number is stored as the velocity to be paired with numbers received in the left inlet.
float
Converted to int .
stop
In left inlet: Immediately sends note-off for all the notes currently being held by poly, freeing all voices.

Arguments

int
Optional. The first argument sets the number of voices to which poly can allocate notes (thus limiting the number of notes poly can hold at one time). If there is no argument present, poly can hold 16 notes. If there is no second argument, or if the second argument is 0, poly sends any notes it cannot hold out the rightmost outlet. If there is a second argument not equal to 0, poly steals voices: when poly receives more than it has voices, it turns off the note it has held the longest and puts the new note in its place.
float
Converted to int.

Output

int
Out left outlet: The output is the voice number of the note-on or note-off being sent out. Out second outlet: The output is the pitch of the note-on or note- off. Out third outlet: The number is the velocity of the note-on or note-off.
list
The first number is the pitch, and the second number is the velocity, of any notes poly can hold. If there is a second argument, poly can steals voices rather than send out overflow, and the fourth outlet is not created.

See


polyin

Output incoming MIDI poly pressure values

Input

MIDI
No inlets available. The input is a MIDI polyphonic key pressure message received directly from the serial port.

Output

int
Out left outlet: The number is the pressure value of the incoming polyphonic key pressure message. Out second outlet: The number is the pitch value (key number) of the incoming message. If a specific channel number is included in the argument, there are only two outlets. If there is no channel number specified by the argument, polyin sprouts a third outlet, on the right, which outputs the channel number of the incoming note-on message.

See


polyout

Transmit MIDI poly pressure messages

Input

int
In left inlet: The number is the pressure value of a MIDI polyphonic key pressure message transmitted on the specified channel. Numbers fall into the range of 0 to 127. In middle inlet: The number is stored as the key number, to be used with pressure values received in the left inlet. Numbers are limited to the range of 0 to 127. In the right inlet: The number is stored as the channel number on which to transmit the polyphonic key pressure messages.
float
Converted to int.
list
In left inlet: The first number is the pressure value, the second number is the key number, and the third number is the channel, of a tranmitted MIDI polyphonic key pressure message.

Output

(MIDI message) No outlets available. The output is a MIDI polyphonic key pressure message transmitted directly from the serial port.

See


print

Print any message in the message window

Input

anything
The print object does not interpret messages. It simply prints them directly in the message window.

Arguments

anything
Optional. The argument is an identifier for the print object. Each message printed in the message window is preceded by the name of the print object, and a colon (:). The name must not contain spaces or special characters, but can be either a number or a word. If there is no argument, the same of the print object is print. Using an argument to print can help distinguish the output of two or more print objects.

Output

anything
No outlets available. The message received in the inlet is printed in the message window.


print~

Prints out vectors of samples of signal values in the message window (one vector contains 64 samples).

Input

signal
The signal whose samples are to be printed.
bang
Causes the object to print one vector of 64 samples to the message window.
int
Causes the object to print int vectors of samples to the message window.

Arguments

symbol
Optional. A string to be printed out with the samples on the message window (this is useful for identifying samples when using more then one print~ object).

Output

Vectors of 64 samples print to the message window.


random

Generate a random number

Input

bang
In left inlet: Sends out a pseudorandomly-generated number between 0 and one less than its maximum limit.
int
In right inlet: The number is stored as the maximum limit for the random output. The output is always between 0 and one less than this maximum limit.

Arguments

int
Optional. Sets an initial limit to the pseudorandom output. The output is always between zero (minimum) and one less than its maximum limit argument. If there is no argument, the limit is initially set to 1, which causes random to output 0 whenever it receives a bang.

Output

int
A pseudorandom number between 0 and one less than its maximum limit.

See


readsf~

Reads a NeXT soundfile from disk in real time.

Input

open
Opens an existing NeXT soundfile to be read, taking the first argument of the message as argument. readsf~ will search for a soundfile in the directory of the patch and in the currently defined path. See the section on saving files in the IRCAM Fts Manual.
int
1 or 0. A value of 1 tells readsf~ to start playing a soundfile that has already been opened using an open message.A value of 0 tells it to stop (the object automatically stops reading at the end of the soundfile). Note that a buffer needs to fill for the soundfile to read in real-time. Thus an open must be sent at least two seconds before a 1 message will be accepted. Furthermore, an open message must precede each 1 message.

Arguments

int
The number of channels to be read (up to 8). readsf~ creates as many outlets as there are specified channels. The default number of channels is one.
int
A process number between 1 and 10. Each time Fts reads or writes a soundfile, it creates a NeXT process fot this task. Fts does this automatically if no process number is given. Performance can sometimes be improved, however, by allocating NeXT processes by hand. It is recommended that, in the case of a configuration with more than one disk drive, that the user assign 1 or 2 separate processes per physical disk.

Output

signal
The soundfile being read. The object has as many outlets (up to eight) as there are channels specified by the first argument. Each channel's signal comes out of its corresponding outlet counting from one, from left to right.

See


receive r

Receive messages, without patch cords

Input

anything
No inlets. Input is received from send objects that have the same name, even if the send is an another loaded patch.

Arguments

symbol
Obligatory. Gives a name to receive.

Output

anything
Any message received in the inlet of any send with the same name is sent out the outlet of receive, even if the send is in another loaded patch.

See


route

Selectively pass the input out a specific outlet

Input

anything
If the first item of the message is the same as one of the arguments of route, the rest of the message is sent out the outlet that corresponds to that argument. If the first item does not match any of the arguments, the entire message is passed out the rightmost outlet.

Arguments

int
symbol
Optional. Arguments must be either all ints or all symbols. The number of arguments determines the number of outlets, in addition to the rightmost outlet. Each argument assigns a name or a number to an outlet. The maximum number of arguments is 0. If there is no argument, there is one other outlet, which is assigned the number 0.

Output

anything
The first item of any message received in the inlet is compared with the arguments. If it matches one of the arguments, the rest of the message is sent out the specified outlet. Otherwise, the entire message is passed out the rightmost outlet. If the first item of a message matches one of the arguments, but the message has no addititonal items, bang is sent out the specified outlet.

See


rtin

Output incoming MIDI real time messages

Input

(MIDI message) No inlets available. The input is a MIDI real time message received directly from the serial port, or from the virtual ports of the MIDI Manager.

Output

int
MIDI real time messages (MIDI clock, start, stop, and continue) received from the specified port are sent out the outlet.

See


samphold~

Gates signals passing through it; is opened and closed by a control signal.

Input

signal
In the left inlet. The control signal. Every time this signal decreases in value, the signal at the right inlet passes to the outlet.
signal
In the right inlet. The gated, or sampled signal. When the control signal decreases, this signal is passed to the outlet. If the control signal increases or stays the same, this signal is ignored.
float
Sets the output of the object to this value (converted to a signal). In other words, samphold~ can control signal conversion.
reset
Sets output to zero.

Arguments

None.

Output

signal
While the control signal (left inlet) decreases in value, the sampled signal(right inlet) is output. If the control signal increases or stays the same, the output will hold, i.e., continue to output at the sample rate, the last value which came through. If the object receives a floating-point value at its left inlet, a signal of that value is output.

See


select / sel

Select certain inputs, pass the rest on

Input

int
float
In left inlet: If the number matches one of the arguments, a bang is sent out the outlet that corresponds to that argument. Otherwise, the number is passes to the rightmost outlet.
int
In right inlet: Replaces the value of the argument. The right inlet exists only if there is a single int argument.

Arguments

int
float
Optional. The argument can be ints or floats. The number of arguments determines the number of outlets in addition to the rightmost outlet. If there is no argument, there is only one other outlet, which is assigned the number 0. The maximum number of arguments is 10.
int
If there is a single int argument (or if there are no arguments) a second inlet is created on the right. Numbers received in that inlet are stored in place of the argument. If there is more than one argument, or if only argument is not an int, the right inlet is not created.

Output

bang
If the number or symbol received in the left inlet is the same as one of the arguments, a bang is sent out the outlet that corresponds to that argument.
anything
If the number received in the left inlet does not match any of the arguments, it is passed out the rightmost outlet.

See


samppeek~

Queries a sample table for its amplitude value at a specific location given in milliseconds.

Input

float
A time value in milliseconds. This value acts as an index into the sample table named by the object's argument (or by a set message). The object reports the amplitude value for the sample specified by the index.
set
Changes the current table to be queried to the first argument of the message.

Arguments

symbol
The name of the sample table (as created by a table~ object) to be queried. If there is no table~ object with the same name in the patch, an error is reported.

Output

float
When a time value is received at the object's left inlet, the object indexes the sample table named in the object's creation argument and outputs the amplitude of the sample at that time index.

See


sampread~

Plays back samples recorded using sampwrite~ and table~

Input

signal
A time index (in milliseconds) used in reading the sample table named in the object's creation argument (or with a set message).
set
Sets table from which samples are to be read to the first argument of the message.
int
Shorthand for the message set sampleint. That is, the message 2 and set sample2 are equivalent.

Arguments

symbol
The name of the table~ to which sampread~ refers. An error occurs if there is no table~ object in the patch with this name.

Output

signal
The samples in the table~ which shares the same name as the object, as read by the time index signal at the object's inlet.

See


sampwrite~

Records a signal to a sample table (table~ object).

Input

signal
The signal to be recorded in the sample table.
bang
To start recording samples into the table~ named by the object's argument or by a set message.
set
Sets the table~ in which samples are recorded to the first argument of the message.
int
Shorthand for the message set sampleint (i.e., the message int 2 and set sample2 are equivalent).

Arguments

symbol
The incoming signal is recorded into memory allocated by a table~ object with the same argument. An error will occur if no table~ with the same name is present in the patch.

Output

None.

See


send / s

Send messages, without patch cords

Input

anything
A message received in the inlet is sent out the outlet of any receive object that has the same name, even if the receive is an another loaded patch.

Arguments

symbol
Obligatory. Names the send object.

Output

anything
No outlets available. A message received in the inlet of send is sent to the outlet of any receive object with the same name, even if the receive is in another loaded patch.

See


sig~

Converts control messages to signals.

Input

signal
Optional. For order forcing and sample rate control. If a signal is input, sig~ operates at the sample rate of that signal.
int
float
To be converted into a signal.

Arguments

float
Optional. Initial value for sig~. For example, sig~ 100 starts to output a DC signal of 100 as soon as the signal processing network is activated. 0,1,2, or 3 Optional second argument. Downsampling (decimation) factor. If zero or absent, sig~ operates at the sample rate of the patch, or the sample rate of a signal at its input. A value of 1, 2, or 3 downsamples line by half, quarter, and eighth, respectively.

Output

signal
A signal of a single value given as the first argument or floating point input. In other words, sig~ outputs the value it is given, every sample. The sample rate is determined by the patch or a signal at the object's input. The sample rate can also be modified by the object's second argument.

See


slider

Output numbers by a moving slider

Input

int
The number received in the inlet is displayed graphically by slider, and is sent to the outlet. Optionally, slider can multiply the number by an arbitrary amount and add an offset to it, before sending it out the outlet. The slider also sends out numbers in response to dragging on it directly with the mouse.
float
Converted to int.
bang
Sends out the number currently stored in the slider.
set
The word set followed by a number, resets the value displayed by the slider, without triggering output.

Output

int
Although the numbers that can be output by dragging are limited by the range of the slider, numbers received in the inlet are not limited before they are sent out the outlet.


snapshot~

Outputs a sample from the most recent vector of samples for an incoming signal when a bang is received.

Input

signal
The signal to be sampled.
bang
To report an amplitude value from the most recent sample vector.
int
float
Will be passed to the output if a bang message is received before a new sample vector.

Arguments

None.

Output

float
An amplitude value from the most recent sample vector.

See


speedlim

Limit the speed that numbers can pass trough

Input

int
In left inlet: The number is sent to the outlet, provided that a certain minimum time has elapsed since the previous output. Otherwise, the number is ignored. In right inlet: The number is stored as the minimum amount of time, in milliseconds, between successive outputs.
float
Converted to int .

Arguments

int
Optional. Sets an initial minimum time between outputs, in milliseconds. If there is no argument, the minimum time is 0.

Output

int
A number received in the left inlet is sent out the outlet, provided the specified minimum amount of time has elapsed since the previous output. Otherwise the number is ignored.

See


split

Scan for a range of numbers

Input

int
In left inlet: If the number is within a specified range, it is sent out the left outlet. Otherwise, it is sent out the right outlet. In middle inlet: The number is stored as the minimum value in the range of numbers looked for by split. In right inlet: The number is stored as the maximum value in the range of numbers looked for by split.
list
In left inlet: The second number is stored as the minimum value of the range, and the third number is stored as the maximum value of the range. The first number is then compared to the range, and is sent out one of the two outlets.

Arguments

int
Optional. The first argument sets the minimum value to be sent out the left outlet. The second argument sets the maximum value to be sent out the left outlet.

Output

int
If the number received in the left inlet is greater than or equal to the specified minimum, and it is less than or equal to the specified maximum, it is sent out the left outlet. Otherwise, it is sent out the right outlet

See


stripnote

Filter out note-off messages, pass only note-on messages

Input

list
In left inlet: The second number is stored as a velocity, and the first number is treated as the pitch, of a MIDI note-on message. If the second number is not 0, it is sent out the right outlet, and the first number is sent out the left outlet.If the second number is 0, nothing is sent out.
int
In left inlet: The number is treated as a pitch value. If the velocity value currently held by stripnote is not 0, then the velocity is sent out the right outlet and the pitch is sent out the left outlet. In right inlet: The number is stored as a velocity to be paired with pitch numbers received in the left inlet.

Arguments

None.

Output

int
Out left outlet: The pitch value received in the left inlet is sent out, provided the velocity is not 0. Out right outlet: The velocity value of a note-on pair is sent out, provided it is not 0.

See


sustain

Hold note-off messages, output them on command

Input

list
In left inlet: The second number is stored as the velocity, and the first number is treated as the pitch, of a MIDI note-on message. If the pair is a note-on (the velocity is not 0), the velocity is sent out the right outlet and the pitch is sent out the left outlet. Note- offs (note-ons with a velocity of 0) are either passed on immediately or held by sustain.
int
In left inlet: The number is the pitch value of a pitch-velocity pair. If the velocity value currently held by sustain is not 0, then the pair is sent out immediatley. If the velocity is 0, the note-off is either sent out or held, depending on whether sustain is turned on. In middle inlet: The number is stored as a velocity to be paired with pitch numbers received in the left inlet. In right inlet: If the number is not 0, sustain is turned on, and all note-offs are held. If the number is 0, sustain is turned off, and all note-offs are sent out immediately.

Arguments

None.

Output

int
Out left outlet: The pitch value of a pitch-velocity pair. Out right outlet: The velocity value of a pitch-velocity pair Note-on pairs are always sent out immediately. If sustain is turned on, note-offs are held until it is turned off. Otherwise, note-offs are sent out immediately.

See


swap

Reverse the sequential order of two numbers

Input

int
In left inlet: The number is sent out the right outlet, then the number in the right inlet is sent out the left outlet. In right inlet: The number is stored to be sent out the left outlet when a number is received in the left inlet.
float
The numbers are converted to int, unless there is a float argument, in which case the number received in the right inlet is stored as a float.
list
In left inlet: The numbers are stored in swap. The first number is sent out the right outlet, then the second number is sent out the left outlet.
bang
In left inlet: Swaps and sends out the numbers currently stored in swap.

Arguments

int
float
Optional. Sets an initial value for the number which is to be sent out the left outlet. Argument with a decimal point will cause a float to be sent out the left outlet. (The number sent out the right outlet is always an int.) If there is no argument, the initial value is 0.

Output

int
When a number is received in the left inlet, the number in each inlet is sent out the opposite outlet.

See


switch~

Turns a signal network on and off.

Input

signal
The input signal goes to the output when the switch~ is on. 1 or 0 1 turns the switch~ on. This passes a signal input to the switch~ to the object's outlet, and turns on the network"below" the switch~ object. 0 turns the switch~ off.

Arguments

None.

Output

When the switch~ is on, the signal at the object's inlet is passed to its outlet. Discussion The signal processing objects"below" the switch~ calculate. By below the switch, we mean all signal objects whose inlets are in the same signal path from the switch~'s outlet. When the switch~ is off, the incoming signal is not passed to the outlet and the objects below the switch do not calculate. This object is useful for maximizing the efficiency of each processor. Networks that are switched off do not take up any processor time. Important note: to extract a signal from a switched network, throw~ and catch~ must be used!

See


sysexin

Output incoming MIDI system exclusive messages

Input

MIDI
There are no inlets. The input is a MIDI system exclusive message received directly from the serial port.

Output

int
MIDI system exclusive messages received from the speciifed port are sent out the outlet, byte-by-byte.

See


table

Store and graphically edit an array of numbers.

Input

int
Specify x value. If a y value has been specified the resulting point is put in the table. Otherwise, the table's y value for this x is output. x must lie within the domain of the table (between 0 and 127 by default.) No such limiting applies to y.
int
In inlet. Specify a y value so that the next x will be a write.
bang
Uses the table as a probability distribution. Output a random number from 0 to (table size - 1), with"y" values in the table specifying relative likelihood. The table should not have negative y values. If the table contents are all zero, zero is output. quantile <int> Outputs the int th quantile of the table, where the input is taken to range from 0 to 65535. The table's response to a bang message (see the description above) is implemented by choosing a pseudorandom number in the interval [0, 65535] and calling quantile. For example, 32768 outputs the median, which is the 50% quantile. inv <int >- Output the first x whose y is at least int. sum Outputs the sum of all elements of the table.
set
<xval> <yval1> <yval2> ... Sets several values of the table, at locations starting at <xval>, to <yval1>, <yval2>, ... A negative onset is clipped to zero; y values falling off the end of the table are ignored.
size
<value> - Set the size of the table. Warning: this takes an unpredicatble amount of compute time and thus can cause unpredictable DAC slips. It should therefore not be used in performnce.
clear
Set whole table to zero
const
Followed by a value, set whole table to &that value.
Arguments
symbol
The array is shared by all table~ objects of the same name. These must all be on the same processor; otherwise an error is reported at creation time. See"Special Topics: Multiple Processors," in the IRCAM Fts Manual.

Output

int
whose meaning depends on the message sent to the table as above Discussion Tables are all 128 values in length unless you edit the patch as a text file to change the length. All tables are currently stored within the patcher, not as external files. You can double-click on the table to activate a preliminary version of a table editor. The button on the right switches the table editor between a cut and paste editing mode and a draw mode.


table~

table~ manages a sample table that stores sound samples that can later be accessed by the objects sampread~, sampwrite~, and sampeek~.

Input

read
The read message takes two arguments: first, a filename relative to the patch's directory or a directory in the path. (See the section on filenames in the IRCAM Fts Manual). The second argument is a number of bytes to skip at the beginning of the file. The file, which must be in NeXT 16-bit linear snd format, is read from disk to memory and converted to floating- point values between -1.0 and +1.0.
write
The write message takes a filename as an argument and writes the stored table from memory to disk as a NeXT 16-bit linear snd file. Samples outside the range (-1, 1) are clipped silently.

Arguments

symbol
Table name. sampread~, sampwrite~ and sampeek~ objects can refer to the table using this name.
int
Size of the sample table in milliseconds. Default is zero.

Output

None.

See


tab1~

Reads in a wavetable and stores it for use by osc1~.

Input

None

Arguments

symbol
Pathname of the soundfile to be read +/-relative to the patch's directory or a directory in the path. (See the section on filenames in the IRCAM Fts Manual). When a patch containing a tab1~ object is opened, the tab1~ reads in the 16-bit linear, monaural NeXT soundfile whose pathname is given as its argument.

Output

None. Discussion The tab1~ removes the header information from the soundfile, converts the first 512 samples into floating-point numbers between -1 and +1, and stores the result in memory. This being done, all osc1~ objects in the patch with the same pathname refer to those memorized samples. The tab1~ object stores the table in point-slope form, and normallytakes the 512th slope to wrap back to the first one. However, you may specify that the 512th slope be taken as equal to the 511th slope by taking a filename starting with the string"nowrap" (an example is in the pitch-shifter demonstration, /usr/local/ispw/demo/patch/pitch-shifter.pat).

See


threshold~

Monitors an incoming signal and sends a bang when a high or low amplitude threshold has been passed

Input

signal
The signal to be monitored for amplitude thresholds.
set
Sets the low and high threshold parameters. Arguments are high_threshold high_time low_threshold low_time When the object is in its"low" state and the high threshold is passed, threshold~ emits a bang from the left outlet. After waiting high_time milliseconds, the object switches to a"high" state (this is to avoid multiple triggers when the signal hovers around the threshold value for a moment). When in the"high" state and the low threshold is attained, the object reports a bang from the right outlet, waits low_time milliseconds, and reenters the"low" state. int 0 or 1 to change the state of threshold~ to"low" and"high" respectively.

Arguments

float int float int See the Input section.

Output

bang
From the left outlet when the high threshold is crossed, and from the right outlet when the low threshold is crossed. Discussion The threshold~ object actually looks only at one sample out of each vector of input (usually one out of 64 samples.) It is therefore well adapted for use with envelope followers but not with audio signals containing frequencies much in excess of 500 Hz.

See


throw~

Send signals remotely to catch~.

Input

signal
The signal to be transmitted to a catch~ object with the same name.
set
In left inlet; changes the catch~ name.
print
Prints current catch~ setting.

Arguments

symbol
throw~ takes a name which identifies its"transmission channel". Signals input to throw~ objects are added together and output by the catch~ object with the same name. On a single processor, there can be many throw~ objects with the same name but only be one catch~.

Output

signal
A dummy signal for order-forcing only.

See


timer

Report elapsed time between two events

Input

bang
In left inlet: Starts+/-or restarts+/- the timer. In right inlet: Sends out the time elapsed since the timer started.

Arguments

None.

Output

int
When a bang is received in the right inlet, the time elapsed, in milliseconds, since the timer was started, is sent out the outlet.


toggle

Switch between on and off (1 and 0)

Input

int
The number is sent out the outlet. If the number is not 0, toggle displays an X, showing it is on. If it is 0, toggle is blank, showing it is off.
float
Converted to int.
bang
Switches toggle on if it is off; switches it off if it is on A mouse click on toggle has the same effect as a bang in its inlet.
set
Changes state but causes no output.

Output

int
A number received in the inlet is sent out the outlet. A bang or a mouse click sends 1 or 0 out the outlet, depending on whether toggle is turned on or off.


touchin

Output incoming MIDI aftertouch values

Input

MIDI
No inlets. The input is a MIDI aftertouch (channel pressure) message received directly from the serial port.

Output

int
If a specific channel number is included in the argument, there is only one outlet. The output is the incoming aftertouch value, from 0-127, on the specified channel and port. If no channel number is specified by the argument, touchin sprouts a second outlet, on the right, which outputs the channel number of the incoming aftertouch message.

See


touchout

Transmit MIDI aftertouch messages

Input

int
In left inlet: The number is transmitted as an aftertouch value on the specified channel. Aftertouch numbers fall into the range of 0 to 127. In right inlet: The number is stored as the channel number on which to transmit the aftertouch messages.
float
Converted to int .
list
In left inlet: The first number is the aftertouch value, and the second number is the channel, of a MIDI aftertouch message, transmitted on the specified channel.

Output

MIDI
No outlets. The output is a MIDI aftertouch message transmitted directly to the serial port.

See


trigger

Send a number to many places, in order

Input

int
float
The number is sent out each outlet as an int, a float, or a bang.
bang
Causes either a bang, an integer 0, or a float 0.0 to be sent out of each outlet.
list
The list is sent out any outlet with the letter l ("el") assigned to it. Via other outlets, list is converted and the first item in the list is sent out.

Arguments

Any number of i, f, b, or l
Optional. The number of arguments determines the number of outlets. Each outlet sends out either int, float, bang, list depending on the arguments. You can supply up to ten arguments. If there are no arguments, trigger has two outlets, both of which transmit an int.

Output

int
float
A number received in the inlet is sent out each outlet, in order from right to left. The number is converted to int, float, or bang before being sent out, depending on the argument that corresponds to each outlet. A bang received in the inlet is converted to integer 0 at the outlet by an i argument, and to float 0. by an f argument. A list received in the inlet will be converted to 0 by an i outlet and to floating-point 0. by an f outlet.
bang
Anything received in the inlet is converted to bang before being sent out an outlet.
list
A list received in the inlet is sent out unchanged by an l outlet.

See


unpack

Break up a list into individual numbers

Input

list
Each number in the list (up to the number of outlets) is sent out the outlet corresponding to its position in the list. unpack does not store the list it receives.
int
float
The number is sent out the left outlet.

Arguments

int
float
Optional. The number of outlets is determined by the number of arguments, up to 10. The arguments can either be numbers, whose types determine the type of outlet (int or float), i for an outlet and f for a float outlet.

Output

int
Each outlet sends out a number from the list received in the inlet. The first number in the list is sent out the leftmost outlet, and so on.

See


up~

Upsamples an incoming signal, doubling its sample sample rate using a 4-point interpolation.

Input

signal
The signal whose sample rate is to be doubled.

Arguments

None.

Output

signal
The input signal represented at twice its original sample rate. The new samples are calculated using a four-point interpolation.

See


value

Share a stored number with other objects.

Input

int
float
Fts stores the number, which is shared by all other value objects with the same name, even if they are in another patch. If another value object with the same argument receives a number, this changes the stored value. Notice: different value objects with the same name can run on different processors. That is, there is no data-sharing across processors.

Arguments

symbol
Mandatory. Gives a name to the stored value.

Output

int
float
A bang at the inlet causes the stored value to be sent out.

See


vd~

Reads a signal from a delay line at a variable tap point whose location is controlled by a signal.

Input

signal
In the left inlet. Determines the location of the tap in the delay line.
Warning: Do not try to increase the delay speed by more than a ratio of 5-to-1 or decrease it by a ratio of more than 3- to-1. If you do,vd~ outputs zeros for the offending vector period. See delwrite~ .

Arguments

symbol
Specifies the name of the delay line from which to read. This name must refer to a delay line already created by a delwrite~ object.
float
Upsampling factor with respect to the delwrite~ being read. You can use vd~ to read a delay line operating at a lower sampling rate. In this case, vd~ transposes the pitch of its input.
signal
The contents of the delay line specified by the first argument at the location specified by the signal input to the left inlet.

See


wahwah~

Realizes a time-varying bandpass filter.

Input

signal
In the left inlet. Signal to be bandpass filtered.
signal
In the middle inlet. Center frequency in Hertz.
signal
In the right inlet. Filter Q or ratio of center frequency to bandwidth. This determines the"sharpness" of the filter, with a high Q becoming increasingly resonant. A Q of zero means the is exactly equal to the input.

Arguments

None.

Output

signal
A bandpass filtered version of the input signal. Note that while wahwah~ is the most computationallly expensive filter offered by Fts, it is the only one whose parameters are set by signals and is thus the only one which can be changed dynamically without clicks.

See


writesf~

Writes a signal to disk as a NeXT soundfile.

Input

open
Creates a NeXT soundfile in which to write (name is the first argument of the message). Warning, writesf~ writes over an existing soundfile with the same name. If the file name starts with a slash / it is taken as an absolute pathname. Otherwise the file is written in a location relative to the patch's directory.
int
1 or 0. '1' tells writesf~ to start playing a soundfile which was opened already using an"open" message. '0' tells it to stop. Be careful, writesf~ will continue writing to disk until a '0' message is received or until the disk fills up, whichever comes first. Note: Wait at least two seconds between sending a 0 message and a new open message (the time for the buffer to clear). Furthermore, an open message must precede each 1 message.

Arguments

int
The number of channels to be read (up to 8). writesf~ creates as many inlets as there are specified channels. The default number of channels is one.
int
A process number between 1 and 10. Each time Fts reads or writes a soundfile, it creates a NeXT process for this task. Fts does this automatically if no process number is given. Performance can sometimes be improved, however, by allocating NeXT processes explicitly. In the case of a configuration with more than one disk drive, we recommend that the user assign one or two separate processes per physical disk.

Output

None.

See