tune

Section: User Commands (1)
Updated: 20 November 1989
Index Return to Main Contents
 

NAME

tune - play a tune in sine-waves on the speaker  

SYNOPSIS

tune [string]  

DESCRIPTION

Tune(1) uses one of the DTMF sine-wave generators of the SPARCstation's audio chip to play simple tunes. A tune can be specified by the argument string, or (if there are no arguments) can be read from standard input. The tune language is very simple:

A tune is an optional tempo followed by a series of notes. The tempo, if present, is an integer specifying the number of beats per minute. The default tempo is 150. A note is a rest or a pitch, followed by an optional time modifier. A rest is indicated by a space character. A pitch is a capital A, B, C, D, E, F, or G, followed by an optional sharp (#) or flat (b), followed by an optional series of octave adjustments. An octave adjustment is a circumflex (^) or a lower-case v. A ^ raises the pitch one octave; a v lowers it one octave. The default (unadjusted) pitches span middle C.

Each note gets one beat, unless it is followed by a time modifier. A time modifier is zero or more dashes (-), followed by zero or more slashes (/), followed by zero or more dots (.). Each dash adds one beat to the length of the note. After accounting for dashes (if any), each slash cuts the length of the note in half. Two slashes cut it to one quarter of its original (dashed) value, etc. After accounting for slashes (if any), a dot (.) increases the length of the note by 50%. Two dots increase it by 75%, etc.

Commas, vertical bars, and newlines are ignored between notes.  

ENVIRONMENT

SST_PLAY - playback gain, from 0 to 99, default 75
SST_EARPHONES - if set, send output to the earphone jack
 

SEE ALSO

tones(1), dial(1)  

BUGS

Can only play one note at a time. Lacks a provision for changing volume during a tune. The highest playable note is B^^^.  

AUTHOR

Michael Scott. Based on a portable sound library [Copyright (C) 1989 by Jef Poskanzer].

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.


 

Index

NAME
SYNOPSIS
DESCRIPTION
ENVIRONMENT
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 00:32:00 GMT, January 04, 2023