Acoustic Hole Connection
Description
Makes a tone hole of variable diameter along an acoustic tube.
This function has been deprecated (see details below).
(make-connection 'hole ... )
Syntax and Default Values
The 'hole connection can be created using the following Lisp, mlys (Max) or mlys.lua syntax:
(make-connection 'hole access_ref radius_ctl noise_ctl weight)
[mlys.hole @name MyHole @radius 0.01 @noise 0.7 @weight 0.9]
radius, noise and weight can be controlled via Max messages with:
•MyHole@radius {value}
•MyHole@noise {value}
•MyHole@weight {value}
modalys.create_connection{kind="hole",where=access_ref,name="MyHole",radius=[value/ctrl],noise=[value/ctrl],weight=0.8}
For radius, noise or weight, if it is passed as value, a dynamic controller is created that you can change via Max messages:
•MyHole@radius {value}
•MyHole@noise {value}
•MyHole@weight {value}
The weight is initially a value, but you can change it also with a message: MyHole@weight {value}
Parameters
The 'hole connection takes four arguments:
- access_ref: any access.
- radius_ctl: radius of hole (in meters).
- noise_ctl: hole noise coefficient.
- weight: (optional) controller weighing the interaction.
The weight controller is optional. If not provided, it defaults to 1.
Discussion
This interaction internally creates a small closed-open tube and adheres it to the access you provide. Since the hole radius is given by a controller, the hole can be opened and closed dynamically. The noise coefficient is expected to be between 0 and 1; when it is high, then opening and closing the hole produces some air turbulence in the tube (although this has not been tested much and seems to have very little effect...).
Here is an example of how to open and close a hole over 2 seconds:
(setq my-tube (make-object 'closed-open-tube (modes 40) (radius0 .01) (radius1 .01)))
(setq hole-radius (make-controller 'envelope 1 '((0 0.) (1 0.) (1.05 .01) (2 .01) (2.05 0.))))
(setq my-tube-hole (make-access my-tube (const 0.7937) 'long))
(make-connection 'hole my-tube-hole hole-radius (const 0.))
Options
Other Ways of Making Tone Holes
To simulate a hole you can also create a Modalys object (such as a very small closed-open tube), typically with few modes, to act as a hole and connect it with an 'adhere connection to your object acting as a tube. (Which is basically what this connection does, anyway.) The hole will be made more or less active (more or less open) by varying the weight controller of that adhere connection. If you really want to use the hole connection, please note that the radius is made internally to .01 m by default, so please adapt your radius messages accordingly.
A very small closed-open tube like this can be adhered to another tube as an alternative to making a tone hole on a wind instrument:
(make-object 'closed-open-tube
(modes 4)
(length 2e-3)
(radius0 5e-3)
(radius1 5e-3)
(freq-loss 10) )
See Also
This tone hole is adhered to a resonating air column (i.e. another tube serving as the instrument itself) at the closed end of the tube. Opening and closing the tone hole is achieved by modifying the interaction weight of the adhere connection itself. (A weight of 1 means the hole will be open, a weight of 0 means it will be closed.
★