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

playable notes for a fingering. Multiphonics are defined as notes<br />

which are "not harmonically related" (see code for details).<br />

Ouputs the multiphonic if so.<br />

Parameters:<br />

playableminv: the set <strong>of</strong> playable minima for a fingering<br />

*/<br />

int noteDistance(Minimum m1, Minimum m2, Vector playableminv);<br />

/*<br />

Calculates the distance in playable notes between two given minima.<br />

Parameters:<br />

m1: the first minimum<br />

m2: the second minimum<br />

playableminv: the set <strong>of</strong> playable minima for a fingering<br />

Returns:<br />

The number <strong>of</strong> playable minima between the given two minima, plus<br />

1.<br />

-1 if error.<br />

*/<br />

int pitchIndex(Vector minv);<br />

/*<br />

Calculates the sum <strong>of</strong> squares <strong>of</strong> cents <strong>of</strong> the given minima.<br />

Parameters:<br />

minv: the set <strong>of</strong> minima<br />

Returns:<br />

The result <strong>of</strong> the calculation (0 if no minima).<br />

*/<br />

char* allNotes(Vector playableminv);<br />

/*<br />

Concatenates the note strings <strong>of</strong> the playable notes for a<br />

fingering, delimited by ';'<br />

Parameters:<br />

playableminv: the set <strong>of</strong> playable minima for a fingering<br />

Returns:<br />

The concatenated null terminated string<br />

*/<br />

int harmonic(Minimum m1, Minimum m2, Vector playableminv);<br />

/*<br />

Determines whether two minima are harmonically related.<br />

See code for definition <strong>of</strong> harmonic.<br />

Parameters:<br />

m1: the first minimum<br />

m2: the second minimum<br />

playableminv: the set <strong>of</strong> playable minima for a fingering<br />

Returns:<br />

1 if m1 <strong>and</strong> m2 are harmonic, 0 if not.<br />

*/<br />

int inArray(int* array, int size, int num);<br />

/*<br />

Determines whether an integer is present in a given sized<br />

array <strong>of</strong> integers.<br />

Parameters:<br />

array: the array <strong>of</strong> integers<br />

size: the number <strong>of</strong> elements in the array

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

Saved successfully!

Ooh no, something went wrong!