home *** CD-ROM | disk | FTP | other *** search
- /* musiprog.h -- include file for cmt application programs */
-
- #define true 1
- #define false 0
-
- /*
- * override the definition of l_rest
- */
- #define l_rest(d) m_rest(d)
- #define l_restuntil(t) m_restuntil(t)
-
- long gettime();
-
- #define rest(x) l_rest( (long) x )
- #define restuntil(x) l_restuntil( (long) x)
-
- #define when if (
- #define then ) {
- #define otherwise ;} else {
- #define endif ;}
- #define endwhen ;}
- #define begin {
- #define end ;}
-
- #define repeat(var, count) {int var; for (var=1; var <= count; var++) {
- #define endrep ;}}
-
- extern cause();
- extern long event_time;
-
- int moxc_loudness = 127;
-
- #define loud(l) moxc_loudness = (l);
-
- /* pnote -- play a note, return immediately */
- /**/
- pnote(pitch, duration)
- begin
- midi_note(1, pitch, moxc_loudness);
- cause(duration, midi_note, 1, pitch, 0);
- end
-
-
- /* note -- play a note, return after end of note */
- /**/
- note(pitch, duration)
- begin
- midi_note(1, pitch, moxc_loudness);
- rest(duration);
- midi_note(1, pitch, 0);
- end
-