MU500 - A Music 500 Compatibility Module for the Music 5000

This document describes a software module which enables the Music 5000 synthesiser to play many Music 500 music programs without alteration. The module requires the M5 module from the Music 5000 Release 2 software to be available. This document and the program described in it are copyright (C) 1989-1995, Angus J. C. Duggan.

A tar archive containing a PDF version of this document and the program itself is available from mu500.tar.gz.

Contents

  1. Words provided
  2. Errors

Words provided

The words provided by the MU500 module are detailed in this section. Note that some words have slightly different interpretations under the Music 500 and MU500.
'
This word is provided for compatibility only, and generates an error if used.
<
This word lowers the pitch of subsequent notes by an octave.
>
This word raises the pitch of subsequent notes by an octave.
@
This word finishes the previous notes, rests, or ties explicitly.
ADSR
Alters the current envelope to a simple attack-decay-sustain-release shape. The default parameters are:
Attack     1  Immediate attack
Decay 	 100  Medium Decay
Sustain  115  Slightly lower sustain level
Release   10  Soft release
number AENV
Sets the numbered envelope as the amplitude envelope for the current channel.
flag AGATE
AGATE sets the current channel's amplitude envelope to the start of the on or off section, depending on the value of flag.
time ATTACK
Sets the attack time (in centiseconds) of the current envelope, which will normally have been set up by ADSR.
length BAR
This word sets the bar length, for checking by bar lines. If the bar length is set to 0, bar length checking is disabled.
period depth CYCLE
CYCLE makes the current envelope into a repeating up-down shape for use as a pitch envelope. The depth argument is the value of the peaks measured from zero. Negative depth arguments cause the pitch to drop first. The period argument is the period of the cycle in centiseconds.
time DECAY
Sets the decay time (in centiseconds) for the current envelope, which will normally have been set up by ADSR.
flag EBIG
Increases the range of pitch steps in the current pitch envelope. Pitch steps are normally 1/16 semitone units, but can be increased to 1/4 semitone units with this word.
difference time segment EGRAD
EGRAD sets the gradient of a segment in the current envelope. The difference is in normal units of amplitude or pitch, with a range of -255-255. The time is in centiseconds, with a range of -127-127.
level segment ELEV
This word sets the target level for a segment in the current envelope. This level must be reached before the envelope starts the next section.
number EMOD
Sets an envelope as the current envelope for modification.
on repeat off ESECT
ESECT sets the number of segments in each of the on, repeat, and off sections of the current envelope. There can be from 0-10 segments in the on and off sections, and 1-10 segments in the repeat section, but no more than 10 segments in the whole envelope.
NOTE( )NOTE
These words enclose a sequence of words which are used as the playing action of the current player's notes. The sequence is called with the parameters:
pitch voice length
The default playing action is:
DURATION VOICE PITCH ON GATE
number PENV
Selects an envelope as the pitch envelope for the current channel.
flag PGATE
PGATE sets the current pitch envelope to the start of the on or off section, depending upon the value of flag.
number PITCH
Sets the base pitch of the current channel.
number PLAY( )PLAY
These words enclose a sequence of words to be executed concurrently with other PLAY( ... )PLAY sequences. The number controls which player the sequence is assigned to.
number PLAYERS
Creates the specified number of dynamic players.
PVAR address
PVAR leaves the address of a player-specific variable on the stack.
RAND? number
This word generates a random number in the range -32768-32767 and leaves it on the stack.
time RELEASE
Sets the release time (in centiseconds) of the current envelope, which will normally have been set up by ADSR.
REST( )REST
These words set the enclosed sequence of words as the playing action for the current player's rests. The enclosed words are called with the following parameters:
voice length
The default playing action for rests is:
DURATION VOICE OFF GATE
SIMPLEA number
SIMPLEA leaves the number of the default amplitude envelope on the stack, for selecting with AENV.
SIMPLEACT
This word resets the playing actions associated with the current player to their default values.
SIMPLEP number
SIMPLEP leaves the number of the default pitch envelope on the stack, for selecting with PENV.
SIMPLEW number
SIMPLEW leaves the number of the default waveform on the stack, for selecting with WAVE.
SOUND
This word prepares a voice by resetting the channels to their default states, selecting default amplitude and pitch envelopes, the default waveform, setting the amplitude of channel 1 to maximum and the amplitudes of all other channels to zero.
level SUSTAIN
Sets the sustain level of the current envelope, which will normally have been set up by ADSR.
number TEMPO
TEMPO sets the period of the master timebase is 10 microsecond units. The default value is 1000.
TIE( )TIE
These words set the enclosed sequence of words as the playing action for the current player's notes, when called by `/', `' or `)'. The enclosed words are called with one parameter:
length
The default playing action for ties is:
DURATION
TIME number
Returns the time (in timebase units) to go before the next sound request on the player will play.
offset TUNE
TUNE sets a pitch offset which applies to the whole synthesiser. The offset is in 1/16 semitone units in the range -1024-1023.
number WAVE
Selects a waveform for use by the current channel.
value point WG!
This word sets the value of a single point in the geometric waveform buffer. The value has a range of -127-127, and there are 128 points.
point WG? value
Reads a point from the geometric waveform buffer.
WGC
This word copies the content of the geometric waveform buffer to the current waveform (selected by WMOD).
amplitude harmonic WH!
Adds a harmonic of the fundamental waveform into the harmonic waveform buffer, with a specified amplitude. The amplitude has a range of 0-127, and the harmonic has a range of 1-14.
WHG
WHG converts the contents of the harmonic waveform buffer into geometric form and stores it in the geometric waveform buffer.
number WMOD
This word selects the number of the waveform for modification.
WZERO
Clears the geometric and harmonic waveform buffers.

Errors

The following errors are generated by the MU500 module:
' requires manual conversion
This error is generated by use of the tick word ('). Tick was used to distinguish between AMPLE words and user words with the same name.
Invalid envelope
This error is generated if an envelope number outside the range 0-15 is used.
Invalid point
Points in the range 1-128 are allowed in waveform definitions. This error is generated if a point outside of this range is used.
Invalid harmonic
Harmonics 1-14 are permitted for creating waveforms. An attempt to use a harmonic outside this range generates this error.
Invalid section
This error is generated if a segment number larger the number of segments in the current envelope is used.
Invalid waveform
This error is generated if a waveform number outside the range 0-13 is selected.
Too many sections
An attempt to create an envelope which takes the total number of segments over the maximum limit will cause this error.

[Home] [Up]
Last modified on 12th February 2004 by angus@harlequin.com