home *** CD-ROM | disk | FTP | other *** search
- \ S5 Multi-Forth Support Routines 1.
-
- \ Library Interface Definitions for the Sophus s5 Sound Digitiser
- \ functions.
- \
- \ Jim Hawkins August 1987 Rev 1.0
- \
- \ ******************************************************************
-
- \ For more details of usage, see the manual notes.
-
- \ The s5.library has been assigned Forth access number 20 here.
- \ If this conflicts with any other user libraries change all
- \ references by altering the following constant:
-
- 20 constant S5Number
-
- \ Next the library access words:
-
- S5Number calls.lib S5
- S5Number calls.lib@ S5@
-
- \ And finally the actual Forth definitions for the S5 Library. You
- \ probably wont need all of these at any one time, but they can
- \ be copied as and when needed. Note that Frag is defined in
- \ S5.symbols.
-
- : S5StartWave ( Frequency type -- success )
- !A1 !A0 S5@ 5 ;
-
- : S5StopWave ( -- success )
- S5@ 6 ;
- : S5StereoStart ( LeftFrag RightFrag Deviate -- success )
- !D0 !A1 !A0 S5@ 7 ;
-
- : S5StereoStop ( LeftFrag RightFrag -- success )
- !A1 !A0 S5@ 8 ;
-
- : S5CheckPlaying ( Select -- true|false )
- !A0 S5@ 9 ;
-
- : S5WaitForEnd ( Select -- )
- !A0 S5 10 ;
-
- : S5SoundStartUp ( Size LeftFrag RightFrag -- success )
- !D0 !A1 !A0 S5@ 11 ;
-
- : S5AllocateSampleBuffer ( Size Frag -- success )
- !A1 !A0 S5@ 12 ;
-
- : S5SoundShutDown ( LeftFrag RightFrag -- success )
- !A1 !A0 S5@ 13 ;
-
- : S5ConfigureHardware ( -- success )
- S5@ 14 ;
-
- : S5DeconfigureHardware ( -- success )
- S5@ 15 ;
-
- : S5RecordSamples ( LeftFrag RightFrag -- success )
- !A1 !A0 S5@ 16 ;
-
- : S5ADC ( Select -- value )
- !A0 S5@ 17 ;
-
- : S5Read1LR ( LeftPtr RightPtr -- )
- !A1 !A0 S5 18 ;
-
- : S5ClearTracks ( LeftFrag RightFrag -- )
- !A1 !A0 S5@ 19 ;
-
- : S5ValidRange ( Frag -- True|False )
- !A0 S5@ 20 ;
-
- : S5BuildEnvelopeTable ( Frag Select -- success )
- !A1 !A0 S5@ 21 ;
-
- : S5FreqToPlayRate ( Frequency -- Ticks )
- !A0 S5@ 22 ;
-
- : S5FreqToSamRateStereo ( Frequency -- loops )
- !A0 S5@ 23 ;
-
- : S5FreqToSamRateMono ( Frequency -- loops )
- !A0 S5@ 24 ;
-
- : S5SetTiming ( Con1 Con2 Con3 -- ) \ These are values
- !D0 !A1 !A0 S5 25 ;
-
- : S5GetTiming ( Con1Addr Con2Addr Con3Addr -- ) \ These are addresses
- \ of variables.
- !D0 !A1 !A0 S5 26 ;
-
- : S5LoadIFF ( Frag FileNamePtr Options -- success )
- !D0 !A1 !A0 S5@ 27 ;
-
- : S5SaveIFF ( Frag FileNamePtr Option1 Option2 -- success )
- !D1 !D0 !A1 !A0 S5@ 28 ;
-
- : S5LoadSOP2 ( Left Right FileNamePtr Option -- success )
- !D1 !D0 !A1 !A0 S5@ 29 ;
-
- : S5SaveSOP2 ( Left Right FileNamePtr Option -- success )
- !D1 !D0 !A1 !A0 S5@ 30 ;
-
- : S5LoadSOP3 ( Frag FileNamePtr Option -- success )
- !D0 !A1 !A0 S5@ 31 ;
-
- : S5SaveSOP3 ( Frag FileNamePtr Option -- success )
- !D0 !A1 !A0 S5@ 32 ;
-
- : S5AllocateFrag ( Size Type -- Frag )
- !A1 !A0 S5@ 33 ;
-
- : S5DeallocateFrag ( Frag -- )
- !A0 S5 34 ;
-
- : S5LoadEnvelope ( EnvelopeAddress FileNamePtr -- success )
- !A1 !A0 S5@ 35 ;
-
- : S5SaveEnvelope ( EnvelopeAddress FileNamePtr -- success )
- !A1 !A0 S5@ 36 ;
-
- : S5KillEnvelope ( Env )
- !A0 S5@ 37 ;
-
- : S5FastMemRecord ( Frag -- success )
- !A0 S5@ 38 ;
-
- : S5FastMemPlay ( Frag -- success )
- !A0 S5@ 39 ;
-
- : S5Seize ( -- success )
- S5@ 40 ;
-
- : S5Release ( -- success )
- S5@ 41 ;
-
- : S5SetPlay ( Frag Option Value -- )
- !D0 !A1 !A0 S5 42 ;
-
- : S5SetRecord ( Frag rate -- )
- !A1 !A0 S5 43 ;
-
- : S5FragSize ( -- size )
- S5@ 44 ;
-
- : S5StereoSample ( LeftBuf RightBuf Length Delay -- )
- !D1 !D0 !A1 !A0 S5 45 ;
-
- : S5LeftSample ( LeftBuf Length Delay -- )
- !D0 !A1 !A0 S5 46 ;
-
- : S5RightSample ( RightBuf length Delay -- )
- !D0 !A1 !A0 S5 47 ;
-
- : S5DummyRead ( length -- )
- !D0 S5 48 ;
-
- : S5Fill ( Buffer length Fillbyte -- )
- !D0 !A1 !A0 S5 49 ;
-
- : S5Move ( Source Destination Length -- )
- !D0 !A1 !A0 S5 50 ;
-
- : S5GetStatus ( Addr -- ) \ Not much use except in Basic
- !A0 S5 51 ;
-
- : S5Player ( FileNameAdr -- success )
- !A0 S5@ 52 ;
-
- \ *******************************************************************
-
-
-