Package wiat :: Package instruments :: Module Flutes
[hide private]
[frames] | no frames]

Source Code for Module wiat.instruments.Flutes

 1  # Copyright 2008 Antoine Lefebvre 
 2  # 
 3  # This file is part of "The Wind Instrument Acoustic Toolkit". 
 4  # 
 5  # "The Wind Instrument Acoustic Toolkit" is free software: 
 6  # you can redistribute it and/or modify it under the terms of 
 7  # the GNU General Public License as published by the 
 8  # Free Software Foundation, either version 3 of the License, or 
 9  # (at your option) any later version. 
10  # 
11  # "The Wind Instrument Acoustic Toolkit" is distributed in the hope 
12  # that it will be useful, but WITHOUT ANY WARRANTY; without even 
13  # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
14  # See the GNU General Public License for more details. 
15  # 
16  # You should have received a copy of the GNU General Public License 
17  # along with "The Wind Instrument Acoustic Toolkit". 
18  # If not, see <http://www.gnu.org/licenses/>. 
19  # 
20  # All rights reserved. 
21   
22  """ Flutes.py - This file defines flute-like instruments. 
23   
24      It contains the following instruments: 
25   
26          - B{OldFlute} 
27   
28            An old wooden flute. The data come from [1].  
29           
30            TODO: This instrument is still incomplete. 
31   
32      References: 
33   
34          1. Nederveen, C. J. (1998). 
35             Acoustical Aspects of Woodwind Instruments., revised edition. 
36             147 pages. Northern Illinois University Press. 
37           
38  """ 
39   
40  import wiat 
41   
42  _OLDFLUTEBODY = wiat.TM.CreateCylindersAndConesFromList( 
43      [(0.,0.0188), (0.132,0.0188), (0.340,0.0152),  
44       (0.452,0.0135), (0.583,0.0112)]) 
45   
46  _D_RADIATION = 0.0112 
47   
48  _OLDFLUTETONEHOLES = \ 
49  [wiat.TM.ToneHole(d=0.0117,t=0.0043,p=0.474,d_pad=0.,h_pad=0.),\ 
50   wiat.TM.ToneHole(d=0.0112,t=0.0043,p=0.505,d_pad=0.,h_pad=0.),\ 
51   wiat.TM.ToneHole(d=0.0102,t=0.0043,p=0.540,d_pad=0.,h_pad=0.)] 
52   
53  _OLDFLUTEFINGERINGS ={'C': [0,0,0],\ 
54                       'C sharp':[0,0,1],\ 
55                       'D': [0,1,1],\ 
56                       'D sharp': [1,1,1],\ 
57                       'cross':[1,0,0]} 
58   
59  OldFlute = wiat.TM.Instrument( 
60                  "Nederveen old flute", _OLDFLUTEBODY, 
61                  wiat.TM.UnflangedOpenEnd(_D_RADIATION), 
62                  _OLDFLUTETONEHOLES, _OLDFLUTEFINGERINGS) 
63