(*--------------------------------------------------------------------------- :Program. Sound.def :Author. Bernd Preusing (concept stolen from [fbs]) :Address. Gerhardstr. 16 D-2200 Elmshorn :Phone. 04121/22486 :Shortcut. [bep] :Version. 1.0 :Date. 29-Dec-1988 :Copyright. PD :Language. Modula-II :Translator. M2Amiga :Imports. --- :UpDate. --- :Contents. play one note at a time :Remark. schabadabadu, don't worry, be happy! :Remark. Beethoven, come on, buy Amiga! ---------------------------------------------------------------------------*) DEFINITION MODULE Sound; TYPE rOctave = [0..5]; (* A0 = 220Hz A1 = 440Hz G#5 = 13258Hz *) rNote = [0..11]; (* A A# B C C# D D# E F F# G G# *) rDuration = [1..5000]; (* milliseconds *) PROCEDURE Sound(Note:rNote; Octave:rOctave; Duration:rDuration); (* :Input. Note and Octave define the frequency :Input. play this sound for Duration milliseconds :Semantic. tries to play the note on one single channel, if any free *) END Sound.def