11.07.2014 Views

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

116 CHAPTER 8. SOFTWARE IMPLEMENTATION<br />

must be less than or equal to one. The parameter holestring sets the fingering for the instrument<br />

<strong>and</strong> consists <strong>of</strong> a sequence <strong>of</strong> 'O' or 'X' characters (for open <strong>and</strong> closed holes respectively).<br />

For example, the following comm<strong>and</strong> would output an impedance spectrum for a<br />

modern flute:<br />

Impedance -s XXXXOOXXOOXXXXOX -t 23.0 -h 0.8 Modern<strong>Flute</strong>.xml<br />

‘Impedance’ parses the XML file into a Woodwind structure, calculates the speed <strong>of</strong> sound<br />

<strong>and</strong> density <strong>of</strong> air given the passed-in (or default) values <strong>of</strong> temperature <strong>and</strong> humidity, <strong>and</strong><br />

calls the function impedance(double f, Woodwind w) in Woodwind.c for each frequency<br />

<strong>of</strong> interest. ‘Impedance’ then prints three columns <strong>of</strong> data: the frequency, <strong>and</strong> the real <strong>and</strong><br />

imaginary parts <strong>of</strong> the impedance. Typical output looks like<br />

2.000000e+002 1.103451e+005 2.442222e+006<br />

2.020000e+002 1.149588e+005 2.495417e+006<br />

2.040000e+002 1.198377e+005 2.550284e+006<br />

...<br />

8.1.4 ‘PlayedImpedance’<br />

The process ‘PlayedImpedance’ is similar to ‘Impedance’ but differs in several important ways.<br />

Firstly, the process calculates the input impedance <strong>of</strong> a played instrument; that is an instrument<br />

containing air <strong>of</strong> a composition more like exhaled breath than ambient air, <strong>and</strong> with a<br />

temperature gradient along its length (the properties <strong>of</strong> air in a played flute are discussed in<br />

§2.2.1). The temperature <strong>and</strong> humidity along the instrument are calculated by the model, <strong>and</strong><br />

cannot be passed in as parameters. Secondly, the returned impedance is the sum <strong>of</strong> the instrument<br />

input impedance <strong>and</strong> the player (face) impedance (i.e. the radiation impedance as<br />

baffled by the player’s face, especially lips); <strong>and</strong> the latter changes over the range <strong>of</strong> the instrument.<br />

Thirdly, the program is <strong>design</strong>ed to calculate many impedance spectra at once, <strong>and</strong><br />

the fingerings for the instrument are input as a file rather than as a string. Since the output <strong>of</strong><br />

‘PlayedImpedance’ depends on the note played (through the face impedance), <strong>and</strong> not just on<br />

the fingering, the input file is a list <strong>of</strong> tab-delimited MIDI numbers <strong>and</strong> fingerings, such as the<br />

following for a Boehm flute with C-foot:<br />

60 XXXXXXXXXXXXXXXX<br />

61 XXXXXXXXXXXXXXXO<br />

62 XXXXXXXXXXXXXXOO<br />

...<br />

The usage for ‘PlayedImpedance’ is as follows:<br />

Usage: PlayedImpedance [OPTIONS] <br />

Options:<br />

-l (default 200.0)<br />

-h (default 4000.0)<br />

-r (default 2.0)<br />

:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!