Skip to content

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:

The Elder Scrolls V: Skyrim theme song

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

Surprise

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

Unnamed...sounds like a retro ringtone of some kind

++cegecege-faCafaCagbDgb+dg-b+cccc 0.05

European siren ;-)

ECECECEC 0.6
Clone this wiki locally