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 308<br />

UnitCell createUnitCell(Hole hole, Vector bore);<br />

/*<br />

Creates a new UnitCell.<br />

Parameters:<br />

hole: the tone hole<br />

bore: the bore section downstream <strong>of</strong> the hole (optional)<br />

Returns:<br />

a new UnitCell with the given parameters<br />

*/<br />

Woodwind createWoodwind(Head head, Vector cells, double flange);<br />

/*<br />

Creates a new Woodwind.<br />

Parameters:<br />

head: the Head <strong>of</strong> the woodwind<br />

cells: a vector <strong>of</strong> unit cells<br />

flange: the termination condition at the end <strong>of</strong> the instrument<br />

Returns:<br />

a new Woodwind with the given parameters<br />

*/<br />

void setAirProperties(Woodwind w, double t_0, double t_amb,<br />

double t_grad, double humid, double x_CO2);<br />

/*<br />

Sets the speed <strong>of</strong> sound <strong>and</strong> density <strong>of</strong> air along the instrument.<br />

Parameters:<br />

w: the instrument<br />

t_0: the temperature at x = 0 (embouchure hole) in deg C<br />

t_amb: the ambient temperature (deg C)<br />

t_grad: the temperature gradient (deg C / m)<br />

humid: the relative humidity (between 0 <strong>and</strong> 1)<br />

x_CO2: the molar fraction <strong>of</strong> carbon dioxide<br />

*/<br />

void discretiseWoodwind(Woodwind w, double maxLength);<br />

/*<br />

Cuts up instrument so that no segment is longer than maxLength.<br />

Parameters:<br />

w: the instrument<br />

maxLength: the maximum segment length<br />

*/<br />

void discretiseBore(Vector bore, double maxLength);<br />

/*<br />

Cuts up a bore so that no segment is longer than maxLength.<br />

Parameters:<br />

w: the instrument<br />

maxLength: the maximum segment length<br />

*/<br />

int setFingering(Woodwind w, char* holestring);<br />

/*<br />

Sets the woodwind fingering to the given string.<br />

Parameters:<br />

w: the instrument<br />

holestring: a string <strong>of</strong> 'X's <strong>and</strong> 'O's representing the fingering<br />

Returns:<br />

1 if the operation was sucessful

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

Saved successfully!

Ooh no, something went wrong!