-
Notifications
You must be signed in to change notification settings - Fork 6
Examples for playnotes.c
flarn2006 edited this page Aug 20, 2014
·
13 revisions
playnotes.c
is a small program which plays a string of notes given on the command line. The syntax is simple: letters a
through g
(uppercase is one octave higher) represent notes, +
and -
go up and down octaves respectively, and any other character (I typically use .
) will pause for the length of one note. The length of each note in seconds can be specified in an additional command line parameter. Feel free to add more.
To try these examples, just use the entire string as the command line parameters for playnotes
:
fef...fef...feg.f.e.d...dcd...dcd...cde.f.c.d...fef.f.fga.a.aCg.g.fed...dcd...dcd...cde.f.c.d 0.15
cdfda..a..g.....cdecg..g..f..ed.cdfdf...g.e..dc...c.g...f.......cdfda..a..g.....cdecC...e.f..ed.cdfdf...g.e..dc...c.g.f.f 0.125
++cegecege-faCafaCagbDgb+dg-b+cccc 0.05
ECECECEC 0.6