Amos Professional Manual  Contents  Index

Samples


The following example loads up a bank of ready-made samples stored on your "AMOSPro Examples" disc, and allows you to play them in random order:

E> Load "AMOSPro_Examples:Samples/Mixture.Abk",5
   Sam Bank 5
   Curs Off : Cls 0: Paper 0
   Locate 0,10
   Centre "Press a key from A to J"
   Do
    A$=Inkey$
    A=Asc(A$)
    If A>96 And A<107
     Sam Play A-96
    End If
   Loop

You can try playing the keys rapidly, like a miniature drum kit, as well as holding down the keys to get some hammer-drill effects! The next example demonstrates the use of two voices for a simple echo effect, and how frequency changes can alter the sample:

E> Load "AMOSPro_Examples:Samples/Mixture.Abk",10
   Sam Bank 10
   Sam Play 1,12 : Wait 5: Sam Play 2,12: Rem Simple echo effect
   Wait Key
   Sam Play 1,13,2000: Rem Lower Pitch
   Wait Key
   Sam Play 1,13,5000: Rem Higher Pitch

SAM STOP
instruction: stop one or more samples playing
Sam Stop
Sam Stop voices

This simple command is used to stop all samples playing through your loudspeaker system. If it is followed by an optional voice parameter, only the selected voices will be switched off. Voices are chosen using a binary bit-map, where any bit that is assigned to 1 will have the associated voice terminated. Otherwise it will be ignored. The voices are associated with the following bits:

Voice 3210
Bitmap %1111

For example, the next line would stop samples playing on voices 3 and 1:

X> Sam Stop %1010
Back    Next
08.02.02