Next: , Previous: , Up: Command-line commands   [Contents][Index]


17.4.57 play

Command: play file | tempo [pitch1 duration1] [pitch2 duration2] …

Plays a tune

If the argument is a file name (see File name syntax), play the tune recorded in it. The file format is first the tempo as an unsigned 32bit little-endian number, then pairs of unsigned 16bit little-endian numbers for pitch and duration pairs.

If the arguments are a series of numbers, play the inline tune.

The tempo is the base for all note durations. 60 gives a 1-second base, 120 gives a half-second base, etc. Pitches are Hz. Set pitch to 0 to produce a rest.