__init__(self,
name,
sections,
radiation,
toneholes=None,
fingerings=None)
(Constructor)
| source code
|
Instrument class
Example:
>>> import wiat
>>> from wiat.TM import *
>>> I1 = Instrument("Cylinder with one tone hole",
... [Cylinder(0.014,0.583)], UnflangedOpenEnd(0.014),
... [ToneHole(0.0117,0.0043,0.474-0.0117/2),
... ToneHole(0.0112,0.0043,0.505-0.0112/2)],
... {'D':[1,1], 'C sharp':[0,1], 'C':[0, 0]})
By default, all toneholes of the instrument are supposed close. Then
the fingering can be set with the set_fingering method.
- Parameters:
name (string) - the name of the instrument
sections (list) - a list of Waveguides
radiation (an instance of a radiation class (see Radiation.py)) - a radiation condition
toneholes (list) - optional list of ToneHole
fingerings (dictionary) - an optional fingering dictionary The fingering dictionary should
contains lists of open and closed toneholes. The length of the
lists should be the same as the number of toneholes.
|