home *** CD-ROM | disk | FTP | other *** search
- /* prog.c -- this is a little test of cmtprog.h and moxc.
- * Musically, it doesn't even rate any comments.
- */
-
- #include "cmtprog.h"
-
- mainscore()
- begin
- repeat(i, 10)
- p1();
- when random(0, 1) == 1 then
- pnote(51, 300);
- pnote(54, 300);
- pnote(58, 300);
- minor(50, 300);
- otherwise
- endwhen
- p1();
- endrep
- end
-
- p1()
- begin
- midi_program(1, random(1, 32));
- rest(20);
- note(48, 15);
- note(59, 25);
- note(56, 23);
- repeat(j, 3)
- minor(random(36, 48), 20);
- endrep
- end
-
- minor(tonic, duration)
- begin
- pnote(tonic, duration);
- pnote(tonic + 3, duration);
- note(tonic + 7, duration);
- end
-