urMus - Audio and Media Interactions and Interfaces on Mobile Phones


urMus

API Documentation

Global Flowboxes

The following flowboxes are defined globally and can be used directly or as prototypes for cloning them. They can be accessed in lua in the global name space as _G["FB"..name] where name can be any of the flowbox names below.

Sources

Sources are flowboxes which do not have an input. They are typically driven by user input and provide relevant input data as output.

Accel

Description

Provides hardware specific 3-axis accelerometer data. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = 33.3Hz

Outputs

Cam

Description

Provides hardware specific camera-derived data. This flowbox is self-timed and provides a stable rate. It cannot be instanced. It is subject to other camera settings.

Typical native rate

rate = 30.0Hz

Outputs

Compass

Description

Provides hardware specific 3-axis magnetic field and compass data. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = not specificed

Outputs

Location

Description

Provides hardware specific GPS data. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = not specificed

Outputs

Mic

Description

Provides hardware microphone data. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = 48000Hz

Output

NetIn

Description

Provides network data. This flowbox is self-timed but does not provide a stable rate. It must be instanced.

Typical native rate

rate = variable, depending on incoming network data timing

Output

Push

Description

Provides data pushed by an urMus lua program. This flowbox is self-timed but does not provide a stable rate. It must be instanced. Calling its :Push(data) method will increase time and send data to its output.

Typical native rate

rate = variable, depending on the pattern Push:Push() is called

Output

RotRate

Description

Provides hardware specific 3-axis gyroscope data. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = 60Hz

Outputs

Touch

Description

Provides multi-touch contact coordinates for up to 11 contacts (less may be available for certain hardware). This flowbox is self-timed but does not provide a stable rate. It cannot be instanced.

Typical native rate

rate = variable, depending on multi-touch event pattern

Outputs

Manipulators

Manipulators are flowboxes which have both at least one input and one output. They are typically manipulate data or generate controllable data. Traditionally these are associated with unit generators or filters. A manipulator can have coupled input/output pairs. This means that a timed update at one side must require a timed update on the other side. A number of manipulators are straight from the Synthesis Toolkit (STK) by Perry Cook and Gary Scavone.

SinOsc

Description

Generates a sine wave. It is not self-timed and derives its time update from being pulled at the output Out. It provides not couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Avg

Description

Computes a sliding average of the incoming data. It is not self-timed and has coupled input/outputs.

Source of Rate

Any change to input In (0) or output Out (0)

Couples

In (0) <-> Out (0)

Inputs

Dist3

Description

Computes the distance of an input 3-vector against a stored 3-vector. While Train is 1 it will store the inputs in internal storage. If train is -1 it will compute the distance. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Add

Description

Provides the sum of two inputs at the output. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Min

Description

Provides the minimum of two inputs at the output. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Max

Description

Provides the maximum of two inputs at the output. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

MinS

Description

Indicates which is the minimum of two inputs at the output. Outputs -1 if In1 is smaller, and 1 if In2 is smaller. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

MaxS

Description

Indicates which is the maximum of two inputs at the output. Outputs -1 if In1 is bigger, and 1 if In2 is bigger. It is not self-timed and has no couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Nope

Description

Does nothing. It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

Inv

Description

Numerically inverts the input (a -> -a). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

V

Description

Computes a piece-wise linear transfer function with a V shape with (-1->1, 0->0, 1->1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

FullV

Description

Computes a piece-wise linear transfer function with a V shape with (-1->1, 0->-1, 1->1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

DV

Description

Computes a piece-wise linear transfer function with an inverted V shape with (-1->0, 0->1, 1->0). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

FullDV

Description

Computes a piece-wise linear transfer function with an inverted V shape with (-1->-1, 0->1, 1->-1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

CJ

Description

Computes a piece-wise linear transfer function with shifts the interval (-1,0,1) -> (0,1,-1), creating a center jump condition. This is equivalent to a phase shift of pi. It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

SQ

Description

Computes a piece-wise linear transfer function with creates a square wave response. (-a,0,a) -> (-1,0,1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

PGate

Description

Computes a piece-wise linear transfer function which sets all negative input to zero (-a,0,a) -> (0,0,a). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

NGate

Description

Computes a piece-wise linear transfer function which sets all positive input to zero (-a,0,a) -> (-a,0,0). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

Pos

Description

Computes a linear transfer function creating an all-positive output (-1,0,1) -> (0,0.5,1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

Neg

Description

Computes a linear transfer function creating an all-negative output (-1,0,1) -> (-1,-0.5,0). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

ZPuls

Description

Generates a unit pulse when the input is zero (0->1). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

SLP

Description

Computes a simple two-point average which acts like a basic low-pass filter. It takes returns the average of the current and the previous sample.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

PosSqr

Description

Computes a quadratic transfer function creating an all-positive output (-a,0,a) -> (a^2,0,a^2). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

Oct

Description

Returns an octave range starting at base frequency Freq.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Range

Description

Computes a linear transfer function creating a linear output (-1,1) -> (bottom,top). It is coupled for input In and output Out.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Quant

Description

Quantizes the smooth incoming signals to semi-tone intervals.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Input

Output

Gain

Description

Applies a gain factor.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Sample

Description

Allows to play back a select sample from a list of loaded sample files. This flowbox has an additional method called AddFile(filename) to add files to its sample pool.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Looper

Description

Allows the recording and play back a sample. While the input to Record is 1, it will record into an internal buffer. This will be played back looped when Play is 1.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

CMap

Description

Generates a circle map wave. A circle map is a non-linear oscillator. If the non-linearity is -1 it will behave like a linear sine oscillator. It is not self-timed and derives its time update from being pulled at the output Out. It provides not couples.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Plucked

Description

This is the STK Plucked physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

ADSR

Description

This is the STK ADSR envelope algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Asymp

Description

This is the STK Asymp asymptotic smoothing algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

BiQuad

Description

This is the STK BiQuad resonant filter algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Blit

Description

This is the STK Blit band-limted impulse train unit generator algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

BlitSaw

Description

This is the STK BlitSaw band-limted sawtooth unit generator algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

BlitSq

Description

This is the STK BlitSq band-limted square wave unit generator algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

BlowBotl

Description

This is the STK BlowBotl physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

BlowHol

Description

This is the STK BlowHol physical excitation algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Bowed

Description

This is the STK Bowed physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

BowTbl

Description

This is the STK BowTbl physical excitation algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Brass

Description

This is the STK Brass physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Clarinet

Description

This is the STK Brass physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Delay

Description

This is the STK Delay non-interpolating delay-line algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

DelayA

Description

This is the STK Delay allpass interpolating delay-line algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

DelayL

Description

This is the STK Delay linear interpolating delay-line algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Echo

Description

This is the STK Echo algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Env

Description

This is the STK Env envelope algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Flute

Description

This is the STK Brass physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

JCRev

Description

This is the STK JCRev John Chowning reverb algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

JetTbl

Description

This is the STK JetTbl physical excitation algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Mod

Description

This is the STK Mod modulation algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

OnePole

Description

This is the STK OnePole filter algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

OneZero

Description

This is the STK OneZero filter algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

PitShift

Description

This is the STK PitShift pitch shifting algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

AllPass

Description

This is the STK AllPass filter algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

ZeroBlk

Description

This is the STK ZeroBlk zero blocking filter algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

PRCRev

Description

This is the STK PRCRev Perry Cook reverb algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

ReedTbl

Description

This is the STK ReedTbl physical excitation algorithm.

Source of Rate

Any change at input In (0) or output Out (0)

Couples

Inputs

Output

Saxofony

Description

This is the STK Saxofony physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Sitar

Description

This is the STK Sitar physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

StifKarp

Description

This is the STK StifKarp physical modeling algorithm.

Source of Rate

Pulling output Out (0)

Couples

None

Inputs

Output

Sinks

Sinks are flowboxes which do not have an output. They are typically driving device actuation, output to the user, or outgoing network traffic derived from the data at its input.

Dac

Description

Provides hardware speaker playback. This flowbox is self-timed and provides a stable rate. It cannot be instanced.

Typical native rate

rate = 48000Hz

Input

Net

Description

Provides network data. This flowbox is self-timed but does not provide a stable rate. It must be instanced.

Typical native rate

rate = variable, depending on incoming network data timing

Input

Vis

Description

Provides pulling data at visual rates. This flowbox is self-timed but does not provide a stable rate, however the target rate is around 60Hz. It cannot be instanced. This flowbox offers a special method called Get() which allows access to the last data point acquired. Get is guaranteed to have been updated before the OnUpdate event fires.

Typical native rate

rate = variable, depending on computational and graphics load, target is 60Hz

Input

Pull

Description

Provides data pulled by an urMus lua program. This flowbox is self-timed but does not provide a stable rate. It must be instanced. Calling its :Pull(data) method will increase time and send data to its output.

Typical native rate

rate = variable, depending on the pattern Pull:Pull() is called

Input