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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

312 APPENDIX B. PROGRAM LISTINGS<br />

/* Hole: */<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;<br />

/* EmbouchureHole: */<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 />

/* Head: */<br />

typedef struct head_str {<br />

EmbouchureHole embouchureHole;<br />

Vector upstreamBore;<br />

double upstreamFlange;<br />

Vector downstreamBore;<br />

Map matrixMap;<br />

} *Head;<br />

/* UnitCell: */<br />

typedef struct unitcell_str {<br />

Hole hole;<br />

Vector bore;<br />

Map openMatrixMap;<br />

Map closedMatrixMap;<br />

} *UnitCell;<br />

/* Woodwind: */<br />

typedef struct woodwind_str {<br />

Head head;<br />

Vector cells;<br />

double flange;<br />

} *Woodwind;<br />

BoreSegment createBoreSegment(double radius1, double radius2,<br />

double length);<br />

/*<br />

Creates a new BoreSegment.<br />

Parameters:<br />

radius1: input radius in m<br />

radius2: outpus radius in m<br />

length: segment length in m<br />

Returns:<br />

a new BoreSegment with the given parameters<br />

*/<br />

Hole createHole(double radius, double length, double boreRadius,

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

Saved successfully!

Ooh no, something went wrong!