Amos Professional Manual  Contents  Index

Music


Playing notes

PLAY
instruction: play a voice
Play pitch,delay
Play voice,pitch,delay

PLAY OFF
instruction: stop a voice playing
Play Off

Patterns of individual notes can be played, allocated to any voice, given a pitch and delayed for pause, using just one PLAY command.

The voice parameter is optional, allowing notes to be played through any combination of the Amiga's four voices, and is set by the usual bit-map format.

The pitch parameter uses the values from 1 to 96, which correspond to the notes in the table given earlier. Delay sets the length of any pause between this PLAY command and the next instruction in the program, with a value of zero starling the note and immediately going on to the next command.

The next example demonstrates this technique, including stereo harmonies:

E> Play 1,40,0: Play 2,50,0: Rem No delay
   Wait Key
   Play 1,40,15: Play 2,50,15: Rem Delay
   Rem Play a random sequence of notes
   Do
    V=Rnd(1 5): P=Rnd(96): Play V,P,3
   Loop

PLAY is not restricted to pure notes. It is possible to assign complex wave forms to voices, using the WAVE and NOISE commands, which are explained next. To stop the playing process, simply turn it off like this:

D> Play Off

Making waves
Every individual sound has its own identity pattern, which is the equivalent of an audio fingerprint. This is because each sound is composed of its own unique frequencies. In the same way that a hospital monitor displays a moving "wave" which pulses in lime to the frequencies of a heartbeat, different sounds create their own wave forms. For example, a cymbal crash has a wave form of jagged peaks very close together, whereas the smooth harmonics of a cello make much more rounded waves.

Back    Next
08.01.04