[Coco] Program to convert Orchestra 90 ".ASC" files for use with the Orchestra 90 cartridge
Bill Pierce
ooogalapasooo at aol.com
Sat Jun 11 18:48:33 EDT 2016
Thanks Barry, you beat me to it. Next we need a bulk renaming utility to strip the ".ASC" or ".MUS" from the file (really simple) and also capitalize any lower case named files.
I may convert your code to OS9 as I about have my Orch90 player for OS9 going. I've got to finish sorting out the flow of the "SCORE" function, then decide how I'm going to implement the tables.
I've got some projects going on in the studio at the moment ($$) and don't have much time for Coco stuff.
Bill Pierce
"Charlie stole the handle, and the train it won't stop going, no way to slow down!" - Ian Anderson - Jethro Tull
My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
Global Moderator for TRS-80/Tandy Color Computer Forums
http://www.tandycoco.com/forum/
E-Mail: ooogalapasooo at aol.com
-----Original Message-----
From: Barry Nelson <barry.nelson at amobiledevice.com>
To: coco <coco at maltedmedia.com>
Sent: Sat, Jun 11, 2016 6:31 pm
Subject: [Coco] Program to convert Orchestra 90 ".ASC" files for use with the Orchestra 90 cartridge
I noticed this software was missing from the internet so I rewrote it. It converts ".ASC" Orchestra 90 files so that the Orchestra 90 CoCo cartridge can use them.1 REM PROGRAM TO CONVERT ORCHESTRA "ASC" FILES TO A FORMAT READABLE BY THE ORCHESTRA 90 CARTRIDGE10 CLEAR 500:CLS20 INPUT "FILE FOR CONVERSION";F$25 REM CONSTRUCT OUTPUT FILE NAME, REMOVE .ASC EXTENSION, IF NO EXTENSION ADD -O30 E$="":P=INSTR(F$,"."):IF P=0 THEN P=LEN(F$)+1:E$="-O"40 O$=LEFT$(F$,P-1)45 REM OPEN INPUT AND OUTPUT FILES50 OPEN "I",1,F$:OPEN "O",2,O$+E$+"."55 REM CHECK FOR END OF INPUT FILE60 IF EOF(1) THEN GOTO 14065 REM GET A LINE OF INPUT70 LINE INPUT #1,N$75 REM IF THE LINE IS EMPTY, GET THE NEXT LINE80 IF LEN(N$)>0 THEN PRINT N$ ELSE 6085 REM SPLIT UP COMMENT LINES LONGER THAN 31 CHARACTERS90 LN=LEN(N$):PN=31100 IF LN-PN>0 AND INSTR(N$,"/")>0 THEN N$=LEFT$(N$,PN)+CHR$(175)+MID$(N$,PN+1):PN=PN+31:LN=LN+1:GOTO 100105 REM SET BIT 7 HI ON THE FIRST CHARACTER OF EACH LINE110 N$=CHR$(ASC(LEFT$(N$,1)) OR 128)+MID$(N$,2)115 REM WRITE OUT 100 CHARACTERS AT A TIME, NO CR OR LF120 OP$=OP$+N$:IF LEN(OP$)>100 THEN PRINT #2,LEFT$(OP$,100);:OP$=MID$(OP$,101)125 REM GET NEXT LINE130 GOTO 60135 REM CLOSE INPUT FILE140 CLOSE #1145 REM WRITE OUT LAST BLOCK OF 100 CHARACTERS, PADDING WITH SPACES150 OP$=LEFT$(OP$+STRING$(100,32),100):PRINT #2,OP$;155 REM CLOSE OUTPUT FILE160 CLOSE #2170 END-- Coco mailing listCoco at maltedmedia.comhttps://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list