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.

CHAPTER 8. SOFTWARE IMPLEMENTATION 110<br />

typedef struct unitcell_str {<br />

Hole hole;<br />

Vector bore;<br />

Map openMatrixMap;<br />

Map closedMatrixMap;<br />

} *UnitCell;<br />

The member matrixMap in Head <strong>and</strong> members openMatrixMap <strong>and</strong> closedMatrixMap<br />

in UnitCell are used by the program to store calculated transfer matrices for a particular frequency.<br />

The members upstreamBore <strong>and</strong> downstreamBore in Head <strong>and</strong> bore in UnitCell are<br />

linked lists <strong>of</strong> bore segments (cylinders or truncated cones). The member upstreamFlange in<br />

Head stores the termination condition for the upstream air column. For flutes the upstream<br />

air column is always stopped, so upstreamFlange is equal to -1. For the sake <strong>of</strong> generality<br />

upstreamFlange is provided as a parameter.<br />

The structure BoreSegment is defined as<br />

typedef struct boresegment_str {<br />

double radius1;<br />

double radius2;<br />

double length;<br />

double c;<br />

double rho;<br />

} *BoreSegment;<br />

where the members c <strong>and</strong> rho are provided to store the speed <strong>of</strong> sound <strong>and</strong> density <strong>of</strong> air for<br />

the segment. The remaining members are self-explanatory.<br />

The embouchure hole is defined by the structure<br />

typedef struct embouchurehole_str {<br />

double radiusin;<br />

double radiusout;<br />

double length;<br />

double boreRadius;<br />

double c;<br />

double rho;<br />

} *EmbouchureHole;<br />

where radiusin <strong>and</strong> radiusout are the inside <strong>and</strong> outside radii <strong>of</strong> the embouchure hole. Tone<br />

holes are defined by the structure<br />

typedef struct hole_str {<br />

double radius;<br />

double length;<br />

double boreRadius;<br />

Key key;<br />

double c;<br />

double rho;<br />

char* fingering;<br />

} *Hole;

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

Saved successfully!

Ooh no, something went wrong!