Index of AMPLE Nucleus words

This index is an extract from The AMPLE Nucleus Programmer Guide (c) 1987 Hybrid Technology.

The entries are arranged in a sequence based upon the following order of characters:

! " # $ % & ' ( ) * , - / : ; < = > ? @ [ \ ] ^ | ~ 0-9 A-Z

except that leading non-letters are treated as if they were at the end.

Each entry gives the word name and a brief description of its function.

A status may be shown on the right indicating that the word can be used only as a command or used only inside a word definition. If no status is shown the word can be used both as a command and inside a word definition.

Where relevant the following line shows the word's inputs and/or outputs. Where there are both, the -> symbol is used to separate them.

Index of words

<carriage return> mark line end

<space> separate items

! move an extra octave up or down

" start literal string

"characters" -> string inside []

string1 "characters" -> string2 string1 outside []

#! store number at address

datanumber addressnumber #!

#* multiply two numbers

number1 number2 #* -> productnumber (number1 x number2)

#+ add two numbers

number1 number2 #+ -> sumnumber (number1 + number2)

#+! add number to number at address

datanumber addressnumber #+!

#- subtract number from previous number

number1 number2 #- -> differencenumber (number1 - number2)

#/ divide previous number by number

number1 number2 #/ -> quotientnumber remaindernumber

#11 duplicate number

number #11 -> number number

#12 swap two numbers

number2 number1 #12 -> number1 number2

#2 discard number

number #2

#212 duplicate previous number

number2 number1 #212 -> number2 number1 number2

#2121 duplicate number and previous number

number2 number1 #2121 -> number2 number1 number2 number1

#213 rotate positions of three numbers

number3 number2 number1 #213 -> number2 number1 number3

#< test previous number is less than number

number1 number2 #< -> flag (number1 < number2)

#= test numbers are equal

number1 number2 #= -> flag (number1 = number2)

#> test previous number is greater than number

number1 number2 #> -> flag (number1 > number2)

#? fetch number from address

addressnumber #? -> datanumber

$+ add string to left end of previous string [] only

rightstring leftstring $+ -> string (leftstring + rightstring)

$- split string after numbered character [] only

string number $- -> rightstring leftstring

$12 swap two strings [] only

string1 string2 $12 -> string2 string1

$2 discard string [] only

string $2

% introduce comment

& indicate hexadecimal number

&<hex digits> -> number

' accent next note or hit

( start additional chord notes

) end additional chord notes

* indicate operating system command command

*<line>

+ sharpen next note

, set length

number ,

- flatten next note or indicate negative number

/ hold music event

: set octave

number :

; set music voice

voicenumber ;

= naturalise next note

@ set transposition in semitones

transnumber @

[ start word definition command

namestring [...]

\ move back

] end word definition [] only

~ slur next note

^ play rest

^; play chord rest

| mark end of bar

0 to 9 decimal digits

<decimal digits> -> number

A to G play note with ascending pitch

a to g play note with descending pitch

ACT execute music action

see text

ACT( start music action sequence [] only

positionnumber ACT(

)ACT end music action sequence [] only

ALIGN ensure text cursor is at start of line

AMPLE restart system command

AND AND bits of numbers

number1 number2 AND -> ANDnumber

ARRAY access array element

elementnumber baseaddressnumber ARRAY -> addressnumber

ASC convert character to number [] only

string ASC -> asciinumber

#B! store low byte of number at address

datanumber addressnumber #B!

#B? fetch byte from address

addressnumber #B? -> datanumber

#B12 swap high and low bytes of number

number1 #B12 -> number2

BAR set bar length in length units

lengthsnumber BAR

$CHR convert number to character [] only

asciinumber $CHR -> string

CLEAR clear editor data command

CODE call machine-code routine

YXnumber CAnumber addressnumber CODE -> YXnumber PAnumber

COMPACT compact unused memory command

COUNT return loop count [] only

COUNT -> number

DELETE delete word command

namestring DELETE

DIM reserve memory

sizenumber DIM -> addressnumber

DISPLAY display text

DURATION wait for a period of time

number DURATION

)ELSE( separate conditional sections [] only

EVERY leave 'every' value

EVERY -> number

FAST select fast/normal tempo

flag FAST

FCOPY copy numbers from frame pointer

number -> number1 ... number-n

FIND find uses of word command

namestring FIND

FOR( start definite loop [] only

countnumber FOR( ... )FOR

)FOR end definite loop [] only

FRAME set frame pointer to top of stack

FRAME! write frame pointer

pointernumber FRAME!

FRAME? read frame pointer

FRAME? -> pointernumber

FVAR access stack frame item

elementnumber FVAR -> addressnumber

GO start players together

GVAR create variable [] only

GVAR -> addressnumber

HALT halt/continue timebase

flag HALT

IDLE pass control to other players

IF( start conditional sequence [] only

flag IF( ... )IF or flag IF( ... )ELSE( ... )IF

)IF end conditional [] only

#IN wait for and get keypress

#IN -> asciinumber

$IN input line from keyboard [] only

$IN -> string

INDEX leave loop index [] only

INDEX -> number

INSTALL install module command

namestring INSTALL

K( start key signature

)K end key signature

'L set accent strength

number 'L

+L increase dynamic level

changenumber eventsnumber +L

-L decrease dynamic level

changenumber eventsnumber -L

=L set dynamic level

number =L

LEN get length of string [] only

string LEN -> string lengthnumber

LOAD load program command

namestring LOAD

MAX leave larger of two numbers

number1 number2 -> largestnumber

MCAT display catalogue of modules command

MDELETE delete module command

namestring MDELETE

MEM show memory usage in bytes command

MIN leave smaller of two numbers

number1 number2 -> smallestnumber

MLOAD load module command

namestring MLOAD

MODE enter display mode command

number MODE

MPREFIX set module filename prefix command

string MPREFIX

MSHOW show list of words in module command

modnamestring MSHOW

MVAL! write music variables

framelev keysig barcountlen octnote length tranvoice MVAL!

MVAL? read music variables

MVAL? -> framelev keysig barcountlen octnote length tranvoice

NEW discard program command

NL print new line

NOT invert sense of flag

flag1 NOT -> flag2

NOUT print number in decimal

number NOUT

&NOUT print number in hexadecimal

number &NOUT

OFF leave off flag value

OFF -> offflag

ON leave on flag value

ON -> onflag

OR OR bits of numbers

number1 number2 OR -> ORnumber

OSCLI send string to operating system [] only

string OSCLI

#OUT send ASCII code to screen

number #OUT

$OUT print string [] only

string $OUT

P( start concurrent sequence [] only

playernumber P( ... )P

)P end concurrent sequence [] only

$PAD pad string to length with spaces [] only

string1 lengthnumber $PAD -> string2

PAUSE pause/continue sound processing

flag PAUSE

PNUM leave player number

PNUM -> number

QKEY test key status or get keypress

negativenumber QKEY -> flag

zeronumber QKEY -> asciinumber

QTIME return queue time

QTIME -> number

QUIT leave editor command

RAND get random number

RAND -> number

RAND! set starting point for random numbers

number RAND!

RANDL get random number in range

maxnumber RANDL -> number

READY make system ready

RENAME rename word command

oldnamestring newnamestring RENAME

REP( start indefinite loop [] only

)REP end indefinite loop [] only

$REV reverse the order of characters [] only

string $REV -> reversedstring

RVOICES set voices range

startnumber endnumber RVOICES

SAVE save program command

string SAVE

SCORE prepare for music words

SHARE select voice ensemble

ensemblenumber SHARE

SHOW show user words command

SIGN test number is negative

number SIGN -> flag

SIMPLEACT remove all music actions

SP print a space

STOP stop program

$STR convert number to decimal string represenation [] only

number $STR -> string

&$STR convert number to hex string representation [] only

number &$STR -> string

$STRIP remove leading spaces from string [] only

string1 $STRIP -> string2

+T increase tempo

changenumber beatsnumber +T

-T decrease tempo

changenumber beatsnumber -T

=T set tempo

number =T

TYPE type word definition on the screen command

namestring TYPE

)UNTIL( exit from indefinite loop [] only

UNUSED make voice(s) unused

VAL convert string to unsigned decimal number [] only

string VAL -> remainingstring number ON if found

string VAL -> remainingstring OFF if not found

&VAL convert to unsigned hex number [] only

string &VAL -> remainingstring number ON if found

string &VAL -> remainingstring OFF if not found

VOICE select voice(s)

voicenumber VOICE

VOICE! set voice settings in frame

voicenumber VOICE! or EVERY VOICE!

VOICES set number of voices

number VOICES

WIND advance time

ticksnumber WIND

WRITE display text of all words command

X play hit

XOR exclusive-OR bits of numbers

number1 number2 XOR -> XORnumber