Recherche Google
OpenMusic 6 – User ManualOM Objects > OM Basic Objects > Functions Package > BPF and BPC Tools > Manipulations
previous pagenext page

Manipulating Objects

Defining Functions

Sampling Functions : Sample-Fun

Sample-fun applies a mathematic function over a given numeric interval, samples the resulting curve at a given frequency and returns the corresponding values. A BPF or BPC can be materilalized out of the sampled values.

Sample-fun has two default inputs and outputs :

  • "function" : a function Lisp name, such as "sin" for "sinus", "exp" for "exponantial"... The default value of "function" is "sqrt",for "square table".
  • "step" : a sampling frequency number.
  • the first output returns the sampled values
  • the second output can be connected to a BPF or BPC.

It has three optional inputs :

  • "xmin" and "xmax" : a sampling range.
  • "coeff" : a multiplication coefficient for the sampled values.
Linear Functions : Linear-Fun

Linear-fun defines linear y = f(x) functions. It can be used as a lambda-function.

Linear-fun has four inputs and one output :

  • "x0" and "y0" : coordinates of the first point.
  • "x1" and "y1" : coordinates of the second point.

Its output can be connected to :

  • a BPF or BPC
  • to sample-fun, applied as a lambda function.

Manipulating Existing Funcitons

Interpolation: BPF-Get-Val

The bpf-get-val function interpolates BPFs or BPCs with one or several values.

The bpf-get-val function has two inputs :

  • "bpf / bpc" : self value of the object
  • "val" : a single value or a list, including the coordinates of another BPF or BPC.
  • Its output can be connected to a BPF or BPC.
Get-Spline-Obj

Get-spline-obj materializes a BPF or BPC out of a spline.

The get-spline-obj has three inputs, which resembles the parameters of a BPF spline, and one output :

  • "self" : a BPF or BPC
  • "resolution" : a number
  • "degree" : a number between 1 and 8, although the spline degree remains limited.
  • Its output returns the value of a new BPF or BPC.
Spline : Get-Spline-Points

Get-spline-points extracts the coordinates of all the points of a spline.

The get-spline-points function has three inputs and one output :

  • "self" : a BPF or BPC.
  • "resolution" : a number.
  • "degree" : a number.
  • Its output returns a list of coordinates.
previous pagenext page
About...(c) Ircam - Centre PompidouMade with Scenari