offer

Store x,y pairs of numbers temporarily

Description

offer was designed for use with algorithms that transform the pitch of an incoming note stream. By storing the original and transformed note together (the transformed may be sent in the right inlet, immediately followed by the original, or they can be sent as a list) when the pitch of the note-on is changed, the transformed pitch can be retreived when the note-off is received.

Arguments

None.

Messages

bang A bang will cause offer to ouput every y-value received since the last clear message was received (or since the last initialization).
int x-value [int]
In left inlet: The number specifies 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 offer; otherwise, offer looks for an x value that matches the incoming number, sends out the corresponding y value, then deletes the stored pair. If there is no x value stored in offer that matches the number received, offer does nothing.
  (inlet1) y-value [int]
In right inlet: The number specifies a y value to be stored in offer. The next x value (int) received in the left inlet causes the two numbers to be stored together as an x,y pair.
clear In left inlet: Deletes the entire contents of offer.

Information for box attributes common to all objects

Output

int: If the number received in the left inlet matches the x value of an x,y pair stored in offer, the corresponding y value is sent out and the stored pair is deleted.

Examples

A pair of numbers can be stored then recalled a single time

See Also

Name Description
coll Store and edit a collection of different messages
funbuff Store x,y pairs of numbers together
table Store and graphically edit an array of numbers