Table of Contents

PLAY

Plays a tune described by a MIDI-ish "musical macro language", a string of octaves, notes, volumes, etc. Alternatively, controls event triggering from this musical score. Can also be used as a function, but return type and values are implementation-dependent.

Implemented by: cbmv7, colorext, GWBASIC, VBDOS

With variations: Simons1, MSX (uses macro language), QBasic (with ON/OFF/STOP and macro language; also as function and as ON PLAY GOSUB), ugBASIC (note, duration, channels; also with OFF)

Also written as:

Usage

Used as a function in MS QuickBasic/QBasic, PLAY returns the number of notes still to be played in its musical commands string. The given numerical argument for such usage is simply ignored.

Variations

In MSX BASIC, PLAY can be used as a function to query the free (0) or busy (-1) status of one or all of the machine's three sound channels, according to its lone argument:

In MS-QB, the arguments ON, OFF or STOP can be used not for the music itself as it might seem, but for the event triggering caused by this countdown, which can be captured by ON PLAY...GOSUB from 32 to 1 note(s) remaining.

Examples

Comments

Similar keywords

In other languages...

References