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.

APPENDIX B. PROGRAM LISTINGS 310<br />

*/<br />

the TransferMatrix for the UnitCell<br />

TransferMatrix woodwindMatrix(double f, Woodwind w, double entryratio,<br />

double x);<br />

/*<br />

Calculates the TransferMatrix for a Woodwind.<br />

Parameters:<br />

f: the frequency in Hz<br />

w: the Woodwind<br />

entryratio: the ratio <strong>of</strong> the input side radius (impedance head or<br />

embouchure) to the entry radius <strong>of</strong> the instrument<br />

x: distance along the Woodwind to calculate<br />

Returns:<br />

the TransferMatrix for the Woodwind<br />

*/<br />

int getZ0_c(Woodwind w, double x, complex* Z0, double* c);<br />

/*<br />

Calculates the characteristic impedance <strong>and</strong> speed <strong>of</strong> sound at a<br />

given lateral position along an instrument.<br />

Parameters:<br />

w: the Woodwind<br />

x: the distance along the Woodwind<br />

Z0: the return variable for the characteristic impedance<br />

c: the return variable for the speed <strong>of</strong> sound<br />

Returns:<br />

1 if x within range<br />

0 otherwise<br />

*/<br />

double boreLength(Vector bore);<br />

/*<br />

Calculates the length <strong>of</strong> a bore.<br />

Parameters:<br />

bore: a vector <strong>of</strong> BoreSegments<br />

Returns:<br />

the total length <strong>of</strong> the bore<br />

*/<br />

double woodwindLengthPos(Woodwind w);<br />

/*<br />

Calculates the length <strong>of</strong> a Woodwind in the positive direction.<br />

Parameters:<br />

w: the Woodwind<br />

Returns:<br />

the length <strong>of</strong> the Woodwind from the embouchure hole in the<br />

positive direction<br />

*/<br />

double woodwindLengthNeg(Woodwind w);<br />

/*<br />

Calculates the length <strong>of</strong> a Woodwind in the negative direction.<br />

Parameters:<br />

w: the Woodwind<br />

Returns:<br />

the length <strong>of</strong> the Woodwind from the embouchure hole in the<br />

negative direction

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

Saved successfully!

Ooh no, something went wrong!