/* Header file to the MusicLib library of sound routines for Turbo C. */ #define BASENOTE 440.00 /* frequency of LA in octave 3 */ #define BASEOCTAVE 3 #define K 1.0595 /* k^12=2 -- constant of the geometric sequence of note frequencies */ #define OCTAVESIZE 12 /* number of notes in octave */ #define BASENOTENUM 11 /* number of LA */ typedef struct { char octave; char note; char staccato; unsigned length; } NOTEREC; typedef struct { unsigned frequency; unsigned time; unsigned end_delay; /* delay at the end -- staccato */ } SOUNDREC; /* function prototypes */ void beep (unsigned freq, unsigned length); void playnote (unsigned note, unsigned octave, unsigned length, unsigned staccato); int playnotefile (char *notefilename); unsigned get_note_freq (unsigned note, unsigned octave); SOUNDREC *read_note_file (char *fname, SOUNDREC **notebuf, size_t *buf_size);