'A Guide to AMOS commands part 2 
'
'AMOS Pro specific commands (music & sound)
'
'Written by Bruce Laing for Megadisc Digital Publishing
'
'© 1994 Bruce Laing for Megadisc Digital Publishing
'
'commands covered: 
'
'Med Load - load med module
'
'Med Play - play MED module
'
'Med Stop - Stops Med module 
'
'Med Cont - lets the Med module continue playing 
'
'Med Midi On - allows Med modules with MIDI instructions to be played (not used in this demo)
'
'Talk Misc - sets the volume and frequency with speech 
'
'Talk Stop - Turns off speech in multitask mode
'
'Mouth Width - returns the width of an animated mouth (not used in this demo)
'
'mouth height - same as above but the height (not used in this demo) 
'
'Mouth Read - this reads the position of an animated mouth (?)(not used in this demo)  
'
Screen Open 0,640,256,2,Hires : Curs Off : Paper 0 : Colour 1,$FFF
Locate ,1 : Centre "Sound demo for AMOS Professional"
Locate ,3 : Centre "Written for the AMOS Commands explained series"
Locate ,4 : Centre "By Bruce Laing for Megadisc Digital Publishing"
Locate ,6 : Centre "© 1994 Bruce Laing for Megadisc Digital Publishing"
Talk Misc 63,25000 : Rem this changes to a slightly higher than normal speech rate
Say "Welcome to the sound command demo for aymos professional." : Rem yes, i spelled it correctly! 
Locate ,8 : Centre "An example of the TALK MISC Command" : _SAYIT
Locate ,10 : Centre "Please insert your Examples disk to continue......"
Talk Misc 63,20000
Say "Please insert your examples disk so that i can load the med module."
Repeat : Until Exist("AMOSPro_Examples:Music")=True : Rem this will be explained later in the series 
'but basically means that the requester will not pop up
Med Load "AMOSPro_Examples:Music/Med_module",5
Med Play 5
Print : Locate ,13 : Print "Press right mouse button to pause module."
Locate ,15 : Print "Press Left mouse to continue the module"
Locate ,17 : Centre "Press both buttons to finish this section of demo"
Do 
   If Mouse Key=1 Then Med Cont : Rem if left button pressed then continue 
   If Mouse Key=2 Then Med Stop : Rem if right button pressed then stop  
   If Mouse Key=3 Then Med Stop : Exit : Rem if both pressed then stop & exit loop  
Loop 
Procedure _SAYIT
   Say "And now, a quick demo of the TALK MISC command."
   For X=10 To 63 Step 10
      For Y=5000 To 25000 Step 5000
         Talk Misc X,Y
         Say "I compute, therefore, i am."
      Next Y
   Next X
End Proc
