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

if(side == PLUS)<br />

n->cents = cent_index;<br />

else<br />

n->cents = (-1)*cent_index;<br />

n->midi = A4_MIDI_INDEX + r_index;<br />

return n;<br />

}<br />

char* noteString(Note n) {<br />

char* note_string = (char*)malloc(BUFSIZ*size<strong>of</strong>(char));<br />

if(n->cents >= 0)<br />

sprintf(note_string, "%s plus %d cents", n->name, abs(n->cents));<br />

else<br />

sprintf(note_string, "%s minus %d cents", n->name, abs(n->cents));<br />

return note_string;<br />

}

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

Saved successfully!

Ooh no, something went wrong!