Antic Sampling Processor and player (PLAYER.BAS)
Antic Sampling Processor and player by Steven Lashower, 69 (binary load, BASIC, MAC/65 source)
Description
Antic Sampling Processor and player by Steven Lashower, 69 (binary load, BASIC, MAC/65 source)
From the Antic disk of Antic: February/March 1990 - Vol. 8 No. 8 — disk A.
From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.
What is in this file
Atari BASIC program · 3.0 KB
- Dialect
- Atari BASIC
- Lines
- 88
- Variables
D,A,MGET$,HEAD$,START,RATE,BEGIN,FINISH,LENGTH,F$
BASIC listing (88 lines)
1 REM PLAYER
2 REM BY STEVEN LASHOWER
3 REM (c)1990, ANTIC PUBLISHING INC.
10 REM SAVE"D:PLAYER.BAS"
20 GRAPHICS 0:? "Antic Sampling Processor 1.0"
30 ? "Player utility, initializing..."
40 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*-*
50 REM Sample Player for ASP 1.0
60 REM Programmed By Steven Lashower
70 REM Revision 4-6-89
80 REM (C) 1989 Antic Publishing
90 REM (C) 1989 ArgoSoft Productions
100 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*-*
110 REM
120 REM Read in M/L Data
130 FOR A=1 TO 196
140 READ D:POKE 1535+A,D
150 NEXT A
160 REM
170 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*
180 REM MGET$: Fast M/L Get Routine
190 REM This USR call reads "L"
200 REM number of bytes into memory
210 REM starting at "S":
220 REM A=USR(ADR(MGET$),S,L,7)
230 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*
240 REM
250 DIM MGET$(28),HEAD$(9),F$(20)
260 HEAD$="♥♥♥♥♥♥♥♥♥"
270 MGET$=""♣hh↓E┘h↓D┘h↓I┘h↓H┘hh↓B┘ Vd◆"
280 REM
290 REM Calculate address to load in
300 REM the sample...It will be the
310 REM NEXT PAGE BOUNDARY located
320 REM after the end of the BASIC
330 REM program (144,155 = MEMTOP)
340 REM
350 START=PEEK(145)
360 IF PEEK(144)<>0 THEN START=START+1
370 REM
380 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*-*
390 REM Get header bytes from file:
400 REM ASP 1.0 Header Format:
410 REM Byte 4-Play Rate
420 REM Byte 8-Start Adrs (High Byte)
430 REM Byte 9-End Addrss (High Byte)
440 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*-*
450 ? "Sample file (Dn:filename.ext)?":INPUT F$
460 TRAP 470:OPEN #1,4,0,F$:GOTO 480
470 ? "Error on file ";F$:GOTO 450
480 A=USR(ADR(MGET$),ADR(HEAD$),9,7)
490 RATE=ASC(HEAD$(4,4))
500 BEGIN=ASC(HEAD$(8,8))
510 FINISH=ASC(HEAD$(9,9))
520 LENGTH=(FINISH-BEGIN)*256
530 ? "Sample Length : ";LENGTH
540 ? "Available Memory: ";FRE(0)-256
550 REM
560 REM If the sample is too long,
570 REM then only read in as much
580 REM of it as we have room for:
590 IF LENGTH>FRE(0) THEN LENGTH=FRE(0)-256
600 REM Read in the sample...
610 A=USR(ADR(MGET$),START*256,LENGTH,7)
620 REM
630 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*
640 REM Format for USR Play Routine
650 REM A=USR(1536,P,S,E,C,B)
660 REM
670 REM P = Play Rate
680 REM S = Start Address
690 REM E = End Address
700 REM C = Colors (1=On,0=Off)
710 REM B = Bmskng (1=On,0=Off)
720 REM D = DMA (34=On,0=Off)
730 REM *-*-*-*-*-*-*-*-*-*-*-*-*-*
740 REM
750 REM Play the sample...
760 A=USR(1536,RATE,START*256,START*256+LENGTH,0,0,0)
770 END
780 REM M/L Data...
790 DATA 104,104,104,133,0,104,141,198,6,104,104,141,199,6,104,104,104,141,196,6,104,104,141,197,6,104,104,141
800 DATA 0,212,169,0,133,1,173,198,6,133,2,169,0,141,14,212,173,197,6,240,9,173,199,6,133,2,169,0
810 DATA 133,1,166,0,240,3,32,192,6,160,0,177,1,170,172,197,6,208,4,106,106,106,106,41,15,9,16,141
820 DATA 1,210,201,6,172,196,6,153,25,208,138,172,197,6,240,7,106,106,106,106,76,111,6,41,15,9,16,166
830 DATA 0,240,3,32,192,6,141,1,210,172,196,6,153,25,208,173,31,208,201,6,240,42,173,197,6,240,20,198
840 DATA 1,165,1,201,255,208,167,166,2,236,198,6,240,22,198,2,76,58,6,230,1,240,2,208,135,230,2,166
850 DATA 2,236,199,6,240,2,208,138,169,64,141,14,212,169,34,141,0,212,169,247,141,14,210,96,202,208,253,96
