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.

294 APPENDIX B. PROGRAM LISTINGS<br />

fprintf(stderr, "PlayedImpedance error: ");<br />

fprintf(stderr, "PlayedImpedance failed to parse input file.\n");<br />

return -1;<br />

}<br />

/* retrieve data structures from XML file */<br />

if(!parseXMLFile(xml_filename, &instrument)) {<br />

fprintf(stderr, "PlayedImpedance error: ");<br />

fprintf(stderr, "PlayedImpedance failed to parse XML file.\n");<br />

return -1;<br />

}<br />

discretiseWoodwind(instrument, WW_MAX_LENGTH);<br />

setAirProperties(instrument, WW_T_0, WW_T_AMB, WW_T_GRAD, WW_HUMID,<br />

WW_X_CO2);<br />

/* print the midi numbers as column labels */<br />

for(i = 0; i < sizeVector(midiv); i++) {<br />

/* set midi from vector */<br />

midi = atoi((char*)elementAt(midiv, i));<br />

printf("\t%.d", midi);<br />

}<br />

printf("\n");<br />

/* for each frequency in spectrum range... */<br />

for(f = flo; f

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

Saved successfully!

Ooh no, something went wrong!