Reed Connection
Description
Makes a reed-tube interaction.
Lisp Syntax and Default Values
The 'reed connection can be created using the following Lisp, mlys (Max) or mlys.lua syntax:
(make-connection 'reed
tubeAccess
reedAccess
initialPosition
airPressure
airDensity
reedArea
apertureLength
weight)
[mlys.reed @name MyReed
@initial-position-in 0.001
@airdensity 1.2
@area 1e-8
@length 0.01
@weight 1]
💡airpressure, airdensity, readarea, aperturelength and weight can be controlled via Max messages with:
• MyReed@airpressure {value}
• MyReed@airdensity {value}
• MyReed@readarea {value}
• MyReed@aperturelength {value}
• MyReed@weight {value}
modalys.create_connection{kind="reed",
name="MyReed",
tubeaccess=<reference of access on tube>,
reedaccess=<reference of access on reed>,
initialposition=0.001,
airpressure=2e4,
airdensity=1.2,
readarea=1e-8,
aperturelength=0.01,
weight=1}
•
MyReed@airpressure {value}
•
MyReed@airdensity {value}
•
MyReed@readarea {value}
•
MyReed@aperturelength {value}
•
MyReed@weight {value}
Parameters
The 'reed connection takes eight arguments:
- tubeAccess: the access on the object used as a tube.
- reedAccess: the access on the object that will be used as a reed.
- initialPosition: the initial position of the reed with respect to the tube. (a numerical value)
- airPressure: breath pressure - the pressure of the air before exciting the reed.
- airDensity: a controller for the density of air.
- reedArea: the surface area of the reed.
- apertureLength: the width of the reed.
- weight: (optional) controller weighing the interaction.
The object used as a reed is commonly a bi-two-mass, but it could be any other Modalys object.
The initial position of the reed with respect to the tube - it is typically a small value, around 1 mm. This is provided as a numerical value, not a controller.
The object used as a tube is commonly a closed-open-tube, but feel free to experiment!
The remaining parameters are controllers:
The breath pressure of the air just before hitting the reed. Typical values: from 0 to 50000 Pa
For the air density controller, the usual value for the volumic mass of air is 1.2 kg / m^3, however you might need to play with this if you wish to blow into Modalys objects other than air columns (the various tubes).
Typical values for the reed area controller are from 1e-14 to 1e-3 m^2. This value is unrelated whatsoever to the physical values used when defining the reed object. It is up to you to match them or not.
The aperture length controller controls the vibrating width of the reed. A typical value is around 2.76e^-4, although this may need to be changed when experimenting with uncommon objects.
The weight controller is optional. If not provided, it defaults to 1.
Discussion
The reed connection simulates most of the mouthpiece of a typical single-reed instrument. You need an access to serve as the reed tip, an access to serve as the top of the acoustic tube, and the reed connection supplies all else, simulating a “virtual mouthpiece” that the reed can bang against, simulating the effects of blowing, etc.
Because the 'reed connection cannot access the base of the reed by itself, you must make a separate position connection to “clamp” the base of the reed in place; so it is necessary to make a position connection, with a position controller fixed at zero. (see example 3).
Options
Appropriate Objects to Use as Reeds
The frequency of oscillation of the reed is calculated according to the formula:
sqrt(k/m)/2pi
or in Lisp:
(/ (sqrt (/ 200 .000002)) (* 2 pi))
(setq my-reed (make-object 'mono-two-mass
(small-mass .000002)
(large-mass .000002)
(stiffness0 200)
(const-loss0 60)
(freq-loss0 260) ))
(setq my-reed-tip (make-access my-reed (const 1) 'trans0))
(setq my-reed-base (make-access my-reed (const 0) 'trans0))
(make-connection 'position my-reed-base (const 0))
(setq my-reed (make-object 'harmonic-oscillator
(mass .000002)
(stiffness 200)
(const-loss 60)
(freq-loss 260)))
(setq my-reed-tip (make-access my-reed (const 1) 'normal))
(setq my-reed (make-object 'rect-plate
(modes 5)
(length0 .7e-2)
(length1 2e-2)
(thickness 2e-5)
(density 700)
(freq-loss 400)
(const-loss 200) ))
(setq my-reed-tip (make-access my-reed (const .1 .2) 'normal))
Retro-Compatibility
When updating (very) old Modalys Lisp scripts, the air pressure controller values used may need to be increased in range, due to corrections made to this connection.
★