The ACT command

Andy Thomas
The AMPLE Nucleus ROM does not contain a music specific language, but a general multi-tasking operating environment. The computer knows how to play a note from a command called ACT. This command is called every time a note or rest is played, and has seven pieces of information passed to it. These pieces of information correspond to the pitch, volume and duration of the note, and which voice the note is being played on.
The ACT command normally has the following format:
ON ACT(
1 FVAR #? VOICE
2 FVAR #? PITCH
3 FVAR #? VOICE
4 FVAR #? VEL
5 FVAR #? VOICE
6 FVAR #? GATE
7 FVAR #? DURATION
)ACT
The 1 FVAR #? just references which piece of data is being accessed. The command after this takes this piece of data and uses it. Most are self-explanatory. For instance, the first piece of data sent contains which voice the note is being played on. The fourth piece of data is used by VEL (velocity) and controls the volume of the note. The sixth item is used by GATE, and controls whether the note is on or off.
As hinted earlier, these commands do not all appear in the Nucleus ROM. Some are contained in the modules loaded when the system disc is booted. For example GATE, PITCH and VEL are contained in the 'M5' module. To catalogue all of the modules present type:
MCAT
To display the contents of a module type:
"modulename" MSHOW
Notepad, Mix and Staff are all written as modules, and I would be interested to hear if anyone has managed to list or write a module.
Well that's probably lost half of you, so what is the use of knowing all this? The answer is that a number of special effects can be achieved by altering the ACT command. I have included a couple of rewritten ACT commands in the file 'ACTdemo' (included on this AMPLINEX disc).
The first, 'newact1', enables sixteen part music to be played. All I have done is to change the VOICEs to CHANs. This means that every note is played on one channel rather than a VOICE, a couple of channels.
So to hear sixteen part chords, you need to set up a sixteen part instrument. I have already done this (with 'instrum16') so you just need to type:
newvoices
This turns on the new ACT command, sets up the sixteen part instrument, and then plays a sixteen part chord.
You could also play two lots of eight part music for instance, by setting up two eight channel instruments.
The second ACT command makes each note play twice, by taking the note length of the original note, halving it, and playing it twice (by placing an ACT command inside the new ACT command). You can try this by typing:
ON newact2
and playing some notes.
Finally please note that SCORE and READY perform a SIMPLEACT command which resets the ACT command to its original format, cancelling out any changes made. So put any new ACT command after the SCORE statement in your programs.

The program 'ACTdemo' can be LOADed into AMPLE in the usual way or selected from the menu in the Features section. Brief instructions are given in the word 'info'. These are displayed automatically (via RUN) if the program is loaded via the AMPLINEX menu.

Published in AMPLINEX 002, November 1987