Tube - open/open
Description
A model of a column of air in an acoustic tube (either cylindrical or conical) which is open at both ends.
Syntax and Default Values
A 'open-open-tube can be created using the following Lisp syntax (the default values are shown for each of the physical parameters):
(make-object 'open-open-tube
(modes 20)
(length 1)
(air-elasticity .00000721)
(air-density 1.2)
(radius0 .01)
(radius1 .01)
(freq-loss 1)
(const-loss 1))
Parameters
The arguments for the physical parameters can be either numerical values or Modalys controllers (either dynamic or constant). If a given parameter is not supplied when using the Lisp syntax, the default parameter value will be used.
- modes: number of modes.
- length: in meters.
- air-elasticity: in m2/kg. On the planet earth at room temperature at sea level this is normally 7.21e-6.
- air-density: in kg/m3. On the planet earth at room temperature at sea level this is normally 1.2.
- radius0: in meters at one end of the tube.
- radius1: in meters at the other end of the tube.
- freq-loss, const-loss: loss coefficients. See General object information.
Accesses
An acoustic tube can be accessed only in its longitudinal direction (across the length of the tube):
(make-access my-tube my-controller 'long)
Options
Controllers
The physical parameters can optionally be controllers instead of numerical values. Therefore, it is possible to modify the physical characteristics of an object, including its pitch, during synthesis. The following example creates a tube which varies in length from 1 meter to 50 cm in 2 seconds:
(setq my-ctrl (make-controller 'envelope 1 '((0 1.0) (2 0.5)) ))
(make-object 'open-open-tube (length my-ctrl))
Tuning
An acoustic tube can be tuned to a specific pitch, using the (set-pitch ...) function, by adjusting just one physical parameter:
- 'length
For example:
(setq my-tube (make-object 'open-open-tube))
(set-pitch my-tube 'length 440)
(setq my-tube (make-object 'open-open-tube))
(set-pitch my-tube 'length (make-controller 'envelope 1 '((0 220.) (2 440.)) ))
When using Modalys in real-time contexts, you can use messages to change the pitch of an object, instead of input signal controllers.
★