@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED736 FREE SECTORS COPYING---D1:DIRECK.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 138ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u !7 (c)1983 Action Computer Services  B JKIHiDiELV`LY!T} Y! BLV`RL!!l L! &` Fj`8冨凪` !EӅӥU} !`ʆǪƩ Ɛee` !ƦʆǢ &Ɛeǐ " "L! !'&&&8儨児V}祂*L!&&*ń8&&L! w"`hihiHHȱȱL!c !#3`W}L!JJJJ`H !h`Hȩh !L # !L # A!L # I!L # O!H8X}`HhHh {#L # BHI V䅠L # L# Y!L #Ԇ ؠPIPP`Y} #P I!L # $L# #L$ "$L#H- #8塪墨hL"$ ;$L# B$L# #ȹP`Z}텠8堨塪 #芨Oȩ-`PP #P棩 Ѥģ0-ģ6000:,80H [}& &ehe&eģ0ʥ 8堅塅`$ #&*i0:0i #Ʀ`¢ 护\}°ڱ%ȱ%E #L|%担CS n#L|%I ;$L|%H 6%L|% $L|% &B V #NLMȑ]}` MLN%B VL # B"` 0d !ҥ `2)2ҩ`p`0)9^}~&`@0)ӈJJJJ)`Ѕ`ȱ`` &ȥ`HhƣĢ`_}ƥĤ`Ѣ ='`ȱѢĦ`膡``ťƤ`}e8夰LS' Ƥ8`ŦeѠe桊LW'd(3)=': '' A' EXIa} '  ( EXIT' (7T@1u(7( IF A>0 THE:( 7 7 7 LENLL(H(H('`LY(!G(!F(K(!Jb}(!`Lu(G(!F(!` L((L(0%EInsert %S disk in drive # %I,%Epress any key%E'(( _% #%($(`L(L(c}D1:(' I'' #%($('LG)'I:L*)%($(LG)'I:LA)%($(LG)LG)L)$(%(0L)8$(%(1d}'L)8$(%('9L)8$(%('')((($(i*(%(i+('))*(+(L)E*('(('((e})(*(+(L)8(('`L*3(2(5(4()(Ȍ((2(5*3(6*5*((6*)(L*1) $%($( $'(&((( m:(f})(*(m;(%($((( m>()(*(m?('(ȑ&((( mB()(*(mC('(ȑ&(4(m$(4(5(m%(5((()(L$*'g} # $%($(%($( w"8(9(8( 9((9(8( B"$(E %(ELh+LX+Probable tempo problems+h}? [#9(Ȍ8(7(6( w"4(5(0'2( m>(3(*(m?(6(Ѯ7(0L2,L+Not enough RAM+ [#L+%I %I %Ii} %I%E%E5(7(6( w"2( m>(3(*(m?(7(6(4(+ _% !R(iT(iU5(Y4(Xj} VR (iT!(iU2( m>(3(*(m?(YX VR (i!(im6(Tm7(U2( m>(3(*(m?(k}YX V h#`L,L,, [#L-Restoring ties..., [#+(Ȍ*()(Ȍ((2(F-3(G-F-((G-)(L.((l})(0L-8(()( m>(*(m?(i*(ȱi+((( m>()(*(m?(-(,(+(/(*(.(8,(--(-m}-.(-/(L. (m.(!(m/(%($(.(i/(i (e!(e'(&($(M&( %(M'(Ln.$(%(0Ln.$(Cn}%(0Ln. (m.(!(m/($(i.(i.(/(i/(L-(()(L5-`L.L.Removing spurious rests.... [#)(Ȍ((/(Ȍ.o}(4(.5(...(./(L~1 +(Ȍ*((m.((m/(//*(+(Ls1 (m((!(m)(L4/LW1((m6()(m7(p} (e!(e9(8( B"E E6((m6()(m7(ii (e!(eѮL/LW1((m6()(m7(q} (e!(e((m6()(m7(8&('( (m&(!(m'(&(i'(i (e!(e B"r}ee9(8( B"e$(e%( (m&(!(m'($(&(i'(i (e!(e%($( w"s}(m.((m/(8-(Ȍ,(2(03(00,(0-(LT1+1,( m>(-(*(m?(((ȱ)(LI1,( mB(-(*(mC(8t}ȱ,(И-(L0L/((i(()(i)(*(+(L/.(/(L.`L1 V(L11 [#L1Type new file name: 1 n# (u}%(Ȍ$('11$(%(L1$('I.L1L1$(%(L1L1.AM21$($(i' 'L2 destination2' I'8'0v} (LP2%EWriting %S ...%E%E'Ϣ2; _% h#''ϩ 1#'L2L2 ERROR %I OPENING OUTPUT FILE%E%E'w}2 _%L2L2L1 r(`L2)(Ȍ((2(23(22((2)(L_30)(( u#(( m:()(*(m;( e$(( u#x}(( mB()(*(mC( e$((Ѐ)(L2' b#(( u# e$)(Ȍ((4(35(33((3)(L3Wr(y}m(((m)( #(()(L3)(Ȍ((2( m>(3(*(m?(4ȱ 44(( 4)(L}4OR (m((!(m)(%(z}$($(%(0Li4$( #((i)(i (e!(e #((i(()(i)(L36(i((7(i)(2( m>(3(*(m?({}m6(4ȱm7(44((4)(L5  (m((!(m)(((i)(i (e!(e B"ee|}9(8( w"$(%(%($( w"&('($(%(0Lp5$( #&( #((i(()(i)(L4 h#`L5 ) , . 1 2}}`L5L55 [#L5Select function:5 [#L51) AMS I -> AMS II5 [#L52) Quit5 [#`L5'@@L,6}AMS I TO AM~}S II FILE CONVERTER6 [# 5 h#LA6K:6> 1#1(0(0( 1(L6 #1(0(80(00(1(1(0(1(00(}1(0L61(0(LZ6L66 [#0(I 1(IL6L7 V(L6Type old file name: 6 n# (L6source6' I'8'0 (}L+7%EReading %S ...%E%E'Ϣ7 _% h#''ϩ 1#'L7L7ERROR %I OPENING INPUT FILE%E%E'7` _%L}7L7L6 r( 5L36L77 [#L7Done!7 [# h#''``5'L7L7ERROR %I OPENING INPUT FILE%E%E'7` _%LC INCLUDE "D:SYSLIB.ACT" INCLUDE "D:SYSIO.ACT" INCLUDE "D:SYSMISC.ACT" INCLUDE "D:SYSBLK.ACT" INCLUDE "D:SYSSTR.ACT" };; AMS1AMS2;; AMS I TO AMS II File Converter;; ACTION! version by Bruce Smith; MODULE BYTE POKMSK=$10, IRQEN }=$D20E, OPOKMSK, ERRORFLAG BYTE ARRAY Xd(16), FILENMd(16), Sd(12), TEM }POd(20), BLANKS=" ", MEASd(1876), XNOTEd(30001)=16384 INT A,B,I,J,K,N,X,NU }MVCS,NUMM, Z=[15000],TEMPOMOD INT ARRAY MEASV(5), XNOTEV(5), XXNOTEV(5) CARD HOLDERROR; }; CIO PROCEDURE; PROC CIO=$E456(BYTE areg,xreg);; REPLACEMENT ERROR ROUTINE; PROC ERRORRTN(BYTE ERRCODE) ERRORFLAG=ER }RCODE RETURN;; REPLACE ERROR ROUTINE; PROC SETERROR() HOLDERROR=ERROR ERROR=ERRORRTN RETURN;; REINSTALL SYSTEM }ERROR ROUTINE; PROC FREEERROR() ERROR=HOLDERROR RETURN;; PROMPT FOR DISK INSERTION; PROC DISKSWAP(BYTE D) PRINTF( }"%EInsert %S disk in drive # %I,%Epress any key%E",Sd,D) A=GETD(4) RETURN;; PROMPT FOR A FILE NAME; PROC GETFILENA }ME() SCOPY(Xd,"D1:") INPUTS(FILENMd) A=0 IF FILENMd(0)>2 THEN DO IF FILENMd(2)=': THEN A=2 EXIT FI } IF FILENMd(3)=': THEN A=3 EXIT FI EXIT OD FI IF A>0 THEN IF FILENMd(A-1)>'1 AND FILENMd(A- }1)<'9 THEN Xd(2)=FILENMd(A-1) FI FI I=4 FOR J=A+1 TO FILENMd(0) DO Xd(I)=FILENMd(J) I==+1 OD } Xd(0)=I-1 RETURN;; READ IN THE AMS 1 FILE; PROC READAMS1FILE() BYTE IOCB1CMD=$352 CARD IOCB1BUF=$354 CARD IOCB1L }EN=$358 NUMVCS=4 NUMM=0 FOR I=1 TO NUMVCS DO A=INPUTID(1) B=INPUTID(1) MEASV(I)=A XNOTEV(I)=B XXNOTEV }(I)=B NUMM==+A OD INPUTMD(1,TEMPOd,20) A=INPUTID(1) TEMPOMOD=A/30 IF TEMPOMOD=0 OR A<>TEMPOMOD*30 THEN PR }INTE("Probable tempo problems") TEMPOMOD=1 FI IF NUMM>Z/8 OR XNOTEV(NUMVCS)>Z THEN PRINTE("Not enough RAM") P }RINTF("%I %I %I %I%E%E",NUMM,Z/8,XNOTEV(NUMVCS),Z) BREAK() FI; IOCB1CMD=7 IOCB1BUF=MEASd+1 IOCB }1LEN=NUMM CIO(0,$10); IOCB1CMD=7 IOCB1BUF=XNOTEd+1 IOCB1LEN=XNOTEV(NUMVCS) CIO(0,$10); IOCB1CMD=7 IOCB1BUF=XN }OTEd+1+Z IOCB1LEN=XNOTEV(NUMVCS) CIO(0,$10) CLOSE(1) RETURN;; AMS2TIES; PROC AMS2TIES() PRINTE("") PRINTE("Re }storing ties...") J=1 FOR I=1 TO NUMVCS DO IF I>1 THEN J=XNOTEV(I-1)+1 FI K=XNOTEV(I) FOR N=J TO K-2 }STEP 2 DO A=XNOTEd(N) B=XNOTEd(N+2) IF A=B THEN IF A>0 AND A<67 THEN XNOTEd(N)=A+128 FI } FI OD OD RETURN;; AMS2RESTS; PROC AMS2RESTS() PRINTE("Removing spurious rests...") I=1 FOR N=1 TO NUMM } DO FOR J=1 TO MEASd(N) DO DO IF XNOTEd(I)<>0 THEN EXIT FI IF XNOTEd(I+Z)<>3*TEMPOMOD OR XNOTE }d(I+Z+1)>0 THEN EXIT FI XNOTEd(I+Z)=0 B=I+Z-2 A=XNOTEd(B)+256*XNOTEd(B+1)+3*TEMPOMOD XNOTEd(B)=A XNO }TEd(B+1)=A/256 MEASd(N)==-1 FOR K=1 TO NUMVCS DO IF I<=XNOTEV(K) THEN XXNOTEV(K)==-2 FI O }D OD I==+2 OD OD RETURN;; PROMPT FOR AMS II FILE NAME; PROC NEWFILENAME() SETERROR() DO PRINTE( }"") PRINT("Type new file name: ") GETFILENAME() FOR A=1 TO Xd(0) DO IF Xd(A)=46 THEN EXIT FI ; "." OD } SASSIGN(Xd,".AM2",A,A+3) SCOPY(Sd,"destination") DISKSWAP(Xd(2)-48) PRINTF("%EWriting %S ...%E%E",Xd) CLOSE(2) } ERRORFLAG=0 OPEN(2,Xd,8,0) IF ERRORFLAG>0 THEN PRINTF("ERROR %I OPENING OUTPUT FILE%E%E",ERRORFLAG) }ELSE EXIT FI OD FREEERROR() RETURN;; WRITE OUT THE AMS2 FILE; PROC WRITEAMS2FILE() FOR I=1 TO NUMVCS } DO PRINTD(2,BLANKS) PRINTIDE(2,MEASV(I)) PRINTD(2,BLANKS) PRINTIDE(2,XXNOTEV(I)) OD PRINTDE(2,TEMPOd) PRI }NTD(2,BLANKS) PRINTIDE(2,30) FOR I=1 TO NUMM DO PUTD(2,MEASd(I)) OD FOR I=1 TO XNOTEV(NUMVCS) STEP 2 DO }A=XNOTEd(I) IF A > 0 THEN PUTD(2,A) PUTD(2,XNOTEd(I+1)) FI OD FOR I=Z+1 TO XNOTEV(NUMVCS)+Z STEP 2 DO } A=(XNOTEd(I)+256*XNOTEd(I+1))/TEMPOMOD B=A/256 IF A>0 THEN PUTD(2,A) PUTD(2,B) FI OD CLOSE }(2) RETURN; ; THIS ROUTINE ORGANIZES THE CALLS; NEEDED TO CONVERT AMS I TO AMS II; PROC AMS1TOAMS2() READAMS1FILE() } AMS2TIES() AMS2RESTS() NEWFILENAME() WRITEAMS2FILE() RETURN; ; PROGRAM INITIALIZATION; PROC INIT() P }RINTE("") PRINTE("Select function:") PRINTE("1) AMS I -> AMS II") PRINTE("2) Quit") RETURN;; THE MAINLINE PROGRAM }; PROC MAIN() OPOKMSK=POKMSK POKMSK=64 IRQEN=64 PRINTE("}AMS I TO AMS II FILE CONVERTER") DO INIT() CL }OSE(4) OPEN(4,"K:",4,0) X=0 WHILE X=0 DO X=GETD(4) X==-48 IF X<0 OR X>2 THEN X=0 FI OD PRINTE }("") IF X=2 THEN EXIT FI SETERROR() DO PRINT("Type old file name: ") GETFILENAME() SCOPY(Sd,"source") } DISKSWAP(Xd(2)-48) PRINTF("%EReading %S ...%E%E",Xd) CLOSE(1) ERRORFLAG=0 OPEN(1,Xd,4,0) IF ERRORFLAG }>0 THEN PRINTF("ERROR %I OPENING INPUT FILE%E%E",ERRORFLAG) ELSE EXIT FI OD FREEERROR() }AMS1TOAMS2() OD PRINTE("") PRINTE("Done!") CLOSE(4) POKMSK=OPOKMSK IRQEN=OPOKMSK RETURNOD FREEERROR() hp0TP p0TP I wrote two programs, AMS2MMS and AMS2MMSV, to convert } ADVANCED MUSICSYSTEM II (AMS II) files to Midi Music System (MMS) format. All of my personal music files ar}e in AMS II format, so I wrote the programs to only support that input format. However, most file}s are in AMS (the original product from APX) format. My programs would not properly handle those files}. Therefore, I wrote AMS1AMS2, which converts files from AMS to AMS II format. It is written i}n Action!, and is heavily based on the original programs. It looks and acts the same. The only } meaningful differences are that the message prompts will have changed slightly and the output files will hav}e a file extender of AM2, to identify them as AMS II files. To run the program, simply load }it from the DOS menu (or from a menu program). Select 1 to convert a file or 2 to quit. From this }point, just follow the prompts. The program will default to drive 1 if you do not specify a drive. You do } not need to specify a file extender for the output file because it will always be set to AM2 by the pro}gram. The files produced by this program can then be processed by AMS2MMS or AMS2M}MSV, allowing you to listen to some of those great old AMS files on your synthesizer using MMS. } The main difference between the file formats in the two versions of AMS relates to how tied notes are handl}ed. In AMS II, the note is flagged as being tied by having 128 added to the note number. In AMS, a non}-tied note is stored with a duration value 3 less than normal, and a short rest (also of duration }3) is inserted after the note. My program searches out the existence of these short rests and deletes them,} adding 3 to the duration of the previous note. If the rest is missing and the two adjacent notes are t}he same tone, then the first note is assumed to be tied to the second, and so I add 128 to the note} number and extend its duration by 3. One other difference causes problems with some of the } converted files. There are 10 numbers on the front of an AMS file; the first 8 hold the number of measures and o}ffsets to the last notes in each of the four voices, the ninth number is the tempo and the tenth is }usually 30. If this last number is higher, then the music plays faster than the tempo value would imp}ly (e.g. a 60 causes it to play twice as fast). AMS II files also have 10 numbers, but the last one has a} different meaning. When reading the AMS file, I check to see if the tenth number is 30, a}nd issue a warning message if not. It turns out that most of the demo files on the original AMS dis}k do not convert properly because of this problem. I have not found any other files as yet which do not have a }30 as the tenth number. I have used this program to convert dozens of excellent AM}S files. I hope you will find it as useful as I do.zens of excellent AM] !< (c)1983 Action Computer Services  B JKIHiDiELV`LY!} Y! BLV`RL!!l L! &` Fj`8冨凪` !EӅӥ} !`ʆǪƩ Ɛee` !ƦʆǢ &Ɛeǐ " "L! !'&&&8儨児}祂*L!&&*ń8&&L! w"`hihiHHȱȱL!c !#3`}L!JJJJ`H !h`Hȩh !L # !L # A!L # I!L # O!H8}`HhHh {#L # BHI V䅠L # L# Y!L #Ԇ ؠPIPP`} #P I!L # $L# #L$ "$L#H- #8塪墨hL"$ ;$L# B$L# #ȹP`}텠8堨塪 #芨Oȩ-`PP #P棩 Ѥģ0-ģ6000:,80H }& &ehe&eģ0ʥ 8堅塅`$ #&*i0:0i #Ʀ`¢ 护}°ڱ%ȱ%E #L|%担CS n#L|%I ;$L|%H 6%L|% $L|% &B V #NLMȑ}` MLN%B VL # B"` 0d !ҥ `2)2ҩ`p`0)9}~&`@0)ӈJJJJ)`Ѕ`ȱ`` &ȥ`HhƣĢ`}ƥĤ`Ѣ ='`ȱѢĦ`膡``ťƤ}e8夰LS' Ƥ8`ŦeѠe桊LW'''' 211 211 212 212 212 21 3'}'(  213 213 213BDGIKNPSUX[^acehjlmnopqsuvxy{}}} (<< < zcM7#tfWI</" }u}ld\UMF?71*# ~zwsplieb^[XUQNKHEB?}=:741/,)'$"  }~}|{zyxw}vvutsrqpponmllkjihhgfeedcbba`_)0L!+++'`L.+!'!' +!+!`LJ+'!'!` 0+(}L^+X+W+Z+Y+Y+Z+L+Y+ m+Z+*(m+W+ѮX+L+L+Y+Z+Ll+Y+Z+0L+Z+Y+ )mY+)mZ+}Z+Y+Z+Y+`73L++L-,0%EInsert %S disk in drive # %I,%Epress any key%E'++ _% #+`! 2LT,L}[,D1:,W' I'' #P,'L,'I:L,P,L,'I:L,P,L,L,L~,P,L,8P,1'L,8P,}'9L,8P,''N,P,iO,' - -O,L-7O,'N,'N,O,L,8N,'`67 L/-)- )-Lt- $+-*-)}- m)*(m)+-*-)-L4- m)*(m) m)*(m)qȱq m)*(m)qq} m)*(m)q'q' m)*(m) !m''m''%m'm'm'm'm}''m'' m)*(m)'''6'0L.'6'5''0L.'5'8'6''' )m')m'}''S''00'u'0LG/L/Not enough RAM. [#L/%I %I %I %I%E%E'S''u0'/ _}% !R(iT(iU'Y'X V m)*(m) m)*(m) m)*(m) m)}*(m) m)*(m)8񪅨ȱ񪑮 m)*(m) m)*(m) m)*(m)8񪅨ȱ񪑮 }m)*(m) m)*(m) m)*(m)8񪅨ȱ񪑮`E AMP FORMAT) 0;0 L0'Ȍ'L0 AMP}0 ( ( I'''' '0Ȍ0͎00L5''L 1"Converting Notes For Voice #%I%E%E000 _%L61V}120 I'0Ȍ0͊00L1'm0'm0 (e (e0000LL1'i''i''0'00 m})0*(m)LC2L11Ѣ0 I'0Ȍ0͊00L/2'm0'm0 (e (e0000L1}'i''i'L]50Ȍ00 m)0*(m)~2ȱ2~2͌020L42 #00 #000IC 0IL}20U0800000I 0IL20T00I 0IL30X0͆000L1380逍0000i00}0i000LQ380鰍0000ɀ0Lq380`00000 (m0 (m000i00i0 (m}0 (m000'0'''(m'(m''Q 'IL4'i'i (e (eV'' !00}00 !8'宍0'寍0'i'i (e (e0'i'i (e (e0'i''i'}'0'0''''''0i00i0Lm2L44ۢ0 I'0Ȍ0͊00LF58''m0m}0 (e (e000е0L4'i0'i0L]5L00 m)0*(m)8' '00L0''}'Ȍ'000Ȍ0͎00L7L5!Doing Durations for Voice #%I%E%E005 _%0 m)0*(m)L*6}0i00i0L70Ȍ00 m)0*(m)e6ȱf6e6͌0f60L76 #00 #0000 !}0e00e0800 (e (eIXL600 [+00L700 w"000 0L70Ȍ}0 (m0 (m00''(m'(m''Q 'ILv70i00i0''''0i00i00i0}0i0LT60i00i0L7L500L5L7 A0$70 I''00Ȍ0 ͊00L,8'm0'm0 (e} (e0000L7'i ''i' (m' (m'0Ȍ0͌00L+90 m)0*(m)'}'0m000m00'' !0000 !8'宍0'寍00i0i (e (e00i}0i (e (e000L[8 h#`CL59 ++L<99; [#L[9Type new file name: 9F n# Q,19'{9{919L919'I.}L9L919Lp9L9.AMP91919i' 'L9 destination9' I'8'0 +L9%EWriting %S ...%E%E'٢9 _}%''٩ 1#'L\:LF: ERROR %I OPENING OUTPUT FILE%E%E':% _% h#L_:Lb:L89 G+`Li: R (iT (iU}'Y'X V h#`L: ,- 0 29 f:`L:L:: [#L:Select function:: [#L:1) AMS -> AMP: [#L:2) Quit: }[#`L;'@@L1;}AMS II TO AMP FILE CONVERTER; [# : h#LF;K:;C 1#::L; #:8:0:}: :L;:L\;L;; [#:IL;L~< ++L;Type old file name: ; n# Q,L;source;Т' I'8'0 +L <}%EReading %S ...%E%E'٢; _% h#''٩ 1#'Lo _%Lr _%Lr=AMS}TEMPO(I) THEN EXIT FI OD IF I>255 THEN I=255 FI I=AMPTEMPO(I) RETURN(I);; PROMPT FOR DISK INSERTION; PROC DISKSW}AP(BYTE D) BYTE X PrintF("%EInsert %S disk in drive # %I,%Epress any key%E",Sd,D) X=GetD(4) RETURN;; PROMPT FOR A F}ILE NAME; PROC GETFILENAME() BYTE I,J,X Scopy(Xd,"D1:") InputS(FILENMd) X=0 IF FILENMd(0)>2 THEN DO IF F }ILENMd(2)=': THEN X=2 EXIT FI IF FILENMd(3)=': THEN X=3 EXIT FI EXIT OD FI I!}F X>0 THEN IF FILENMd(X-1)>'1 AND FILENMd(X-1)<'9 THEN Xd(2)=FILENMd(X-1) FI FI I=4 FOR J=X+1 TO FIL"}ENMd(0) DO Xd(I)=FILENMd(J) I==+1 OD Xd(0)=I-1 RETURN;; READ IN PART OF THE AMS FILE; PROC READAMSFILE#}() BYTE D INT X FOR D=1 TO 10 DO X=InputID(1) A(D)=X OD MEA=A(1)+A(3)+A(5)+A(7) LEN=(A(8) RSH 1)+MEA$} LEN=37+LEN+LEN+LEN TEMPO=A(9) IF TEMPO<54 THEN TEMPO=54 FI IF TEMPO>309 THEN TEMPO=309 FI TEMPO==-54 TEMPO=AMPT%}EMPO(TEMPO) IF MEA>1875 OR LEN>30000 THEN PrintE("Not enough RAM") PrintF("%I %I %I %I%E%E",MEA,1875,LEN,30000) B&}REAK() FI; IOCB1CMD=7 IOCB1BUF=MEASd+1 IOCB1LEN=MEA CIO(0,$10); VL(1)=A(2) VL(2)=A(4)-A(2) VL(3)=A(6)-A(4)'} VL(4)=A(8)-A(6) RETURN;; READ IN MAIN PART OF AMS FILE; AND CONVERT IT TO AMP FORMAT; PROC CONVERT() INT LO,HI,C,(}D,V,X BYTE ARRAY HOLDd(12) MNUM=1 SCopy(MUSd,"AMP") NC=0 LEN=13 FOR V=1 TO 4 DO DO CM=2 )} PrintF("Converting Notes For Voice #%I%E%E",V) SCopy(HOLDd,"V") FOR C=1 TO 3 DO MUSd(LEN+C)=HOLDd(*}C) OD LEN==+3 X=LEN IF VL(V)=0 THEN SCopy(HOLDd,"") FOR C=1 TO 3 DO MUSd(L+}EN+C)=HOLDd(C) OD LEN==+3 EXIT FI; FOR D=1 TO VL(V) STEP 2 DO LO=GetD(1) ,} HI=GetD(1) IF LO=67 THEN LO=85 FI LO==-1 IF LO=-1 THEN LO=84 FI IF LO=127 THEN LO=88 FI -} IF LO>127 THEN LO==-128 HI==+48 FI IF HI>=192 THEN HI==-176 FI IF HI>=128 THEN HI==-96 FI X==+1 .} MUSd(X)=LO X==+2 MUSd(X)=HI LEN=X NC==+1 IF NC=MEASd(MNUM) THEN MUSd(LEN+1)=86/} HI=CM RSH 8 LO=CM-(HI LSH 8) MUSd(LEN+2)=LO MUSd(LEN+3)=HI LEN==+3 X=LEN 0} MNUM==+1 NC=0 CM==+1 FI OD; SCopy(HOLDd,"") FOR C=1 TO 3 DO 1}MUSd(LEN-3+C)=HOLDd(C) OD X=LEN+1 EXIT OD LE(V)=LEN-13 OD NC=0 MNUM=1 X=18 FOR V=1 TO 4 2} DO DO PrintF("Doing Durations for Voice #%I%E%E",V) IF VL(V)=0 THEN X==+3 EXIT FI FOR D3}=1 TO VL(V) STEP 2 DO LO=GetD(1) HI=GetD(1) LO=(LO+(HI LSH 8)) IF MUSd(X-1)=88 THEN4} LO=FIXTEMPO(LO) ELSE LO=LO/5 IF LO=0 THEN LO=1 FI FI MUSd(X)=LO NC=5}=+1 IF NC=MEASd(MNUM) THEN X==+3 NC=0 MNUM==+1 FI X==+3 OD X==+3 6} EXIT OD OD SCopy(HOLDd,"A0$") HOLDd(4)=TEMPO FOR C=1 TO 11 DO MUSd(LEN+C)=HOLDd(C) OD LEN=7}=+12 MUSd(LEN)=155 FOR D=1 TO 4 DO CM=LE(D) X=D+D HI=CM RSH 8 LO=CM-(HI LSH 8) MUSd(X+2)=LO MU8}Sd(X+3)=HI OD Close(1) RETURN;; PROMPT FOR AMP FILE NAME; PROC NEWFILENAME() BYTE X SETERROR() DO PrintE9}("") Print("Type new file name: ") GETFILENAME() FOR X=1 TO Xd(0) DO IF Xd(X)=46 THEN EXIT FI ; "." OD :} SAssign(Xd,".AMP",X,X+3) SCopy(Sd,"destination") DISKSWAP(Xd(2)-48) PrintF("%EWriting %S ...%E%E",Xd) ERRORFLAG;}=0 Open(1,Xd,8,0) IF ERRORFLAG>0 THEN PrintF("ERROR %I OPENING OUTPUT FILE%E%E",ERRORFLAG) Close(1) <} ELSE EXIT FI OD FREEERROR() RETURN;; WRITE OUT THE AMP FILE; PROC WRITEAMPFILE() IOCB1CMD=11 IOCB1=}BUF=MUSd+1 IOCB1LEN=LEN CIO(0,$10) Close(1) RETURN; ; THIS ROUTINE ORGANIZES THE CALLS; NEEDED TO CONVERT AMS II T>}O AMP; PROC AMSTOAMP() READAMSFILE() CONVERT() NEWFILENAME() WRITEAMPFILE() RETURN; ; PROGRAM INITIALI?}ZATION; PROC INIT() PrintE("") PrintE("Select function:") PrintE("1) AMS -> AMP") PrintE("2) Quit") RETURN;; @}THE MAINLINE PROGRAM; PROC MAIN() BYTE X OPOKMSK=POKMSK POKMSK=64 IRQEN=64 PrintE("}AMS II TO AMP FILE CONVERA}TER") DO INIT() Close(4) Open(4,"K:",4,0) X=0 WHILE X=0 DO X=GETD(4) X==-48 IF X<0 OR X>2 TB}HEN X=0 FI OD PrintE("") IF X=2 THEN EXIT FI SETERROR() DO Print("Type old file name: ") GETFILENAMC}E() SCopy(Sd,"source") DISKSWAP(Xd(2)-48) PrintF("%EReading %S ...%E%E",Xd) Close(1) ERRORFLAG=0 OpenD}(1,Xd,4,0) IF ERRORFLAG>0 THEN PrintF("ERROR %I OPENING INPUT FILE%E%E",ERRORFLAG) ELSE EXIT FE}I OD FREEERROR() AMSTOAMP() OD PrintE("") PrintE("Done!") Close(4) POKMSK=OPOKMSK IRQEN=OPOKMSK RETUF}RN OD FREEERROR() AMSTOAMP() OD PrintE("") PrintE("Done!") Close(4) POKMSK=OPOKMSK IRQEN=OPOKMSK RETUp0TP p0TP Ever since buying our first (of several) Atari H} computers, an Atari 800, many years ago, I have enjoyed using our computers to make music. I bought many I}of the music programs for the 8-bit Atari's, and after buying our 520ST, added a Roland synthesizerJ} and Yamaha tone generator because of the ST's excellent MIDI capabilities. I even bought the MIDI-K}MATE interface from Hybrid Arts (so that the old 800 would not feel left out). When the DeL}cember 1988 copy of ANTIC arrived in the mail, I immediately went out and bought the disk version, to M} get a copy of the ANTIC MUSIC PROCESSOR (AMP from now on). I tried it and liked it, and so I proceeded to coN}nvert many of my AMS II files using the supplied converter program. However, several problems O}quickly came to light. Since it is written in Basic, it is quite slow of course. Some of my filesP} are quite large, and my patience started to wear thin. Also, it had problems with files which did not include Q} all four voices (a minor bug which was easy to fix). Unfortunately, a more serious probleR}m quickly became evident. It did not handle AMS tempo values properly at all. It simply divided them byS} 5, like it did the durations for notes. This does not work right at all, and produced meaningless tempos.T} It was time to fix these problems, so I pulled out my Action! cartridge and started coding.U} A while back, I had written several similar programs, also in Action!, to convert AMS files toV} other formats. I used one of these as a model, and quickly had AMSTOAMP working. It evenW} converted AMS tempos accurately. Unfortunately, AMP itself does not deal with tempos properly. X} If you take an AMS song and plot a graph of elapsed times versus various tempos, you get the expected exponenY}tial curve (double the tempo, halve the time; double it again, and halve the time again). If you do theZ} same with AMP, you get a straight line graph. This means that my converted AMS tempos did not w[}ork out right at all. Some songs played too fast while others played too slow. I fixed this in my program by\} adding a conversion table, mapping the AMS tempos to tempo numbers which seemed to work out in AMP ]} (most of the time anyway). The program was now working just fine. I used it to ^} convert all my better AMS II files, with excellent results. I even ran one of my earlier programs to convert _}many excellent AMS (the original program from APX) files to AMS II format, and then further converted`} them to AMP, again with excellent results. I hope that the program will work out as well for a} you as it did for me.k out as well for X !#9 (c)1983 Action Computer Services  B JKIHiDiELV`LY!!c} Y! BLV`L!!l L! &` Fj`8冨凪` !EӅӥ!d} !`ʆǪƩ Ɛee` !ƦʆǢ &Ɛeǐ " "L! !'&&&8儨児!e}祂*L!&&*ń8&&L! w"`hihiHHȱȱL!c !#3`!f}L!JJJJ`H !h`Hȩh !L # !L # A!L # I!L # O!H8!g}`HhHh {#L # BHI V䅠L # L# Y!L #Ԇ ؠPIPP`!q}JB%DOS SYSB*)DUP SYSB/SAMS1AMS2OBJB+AMS1AMS2ACTBAMS1AMS2TXTB9AMSTOAMPOBJBDAMSTOAMPACTBGAMSTOAMPTXTB2bAMS2MMS OBJB=AMS2MMSVOBJB:AMS2MMS ACTBEAMS2MMSVACTB-YAMS2MMS TXT #P I!L # $L# #L$ "$L#H- #8塪墨hL"$ ;$L# B$L# #ȹP`!r}텠8堨塪 #芨Oȩ-`PP #P棩 Ѥģ0-ģ6000:,80H !s}& &ehe&eģ0ʥ 8堅塅`$ #&*i0:0i #Ʀ`¢ 护!t}°ڱ%ȱ%E #L|%担CS n#L|%I ;$L|%H 6%L|% $L|% &B V #NLMȑ!u}` MLN%B VL # B"` 0d !ҥ `2)2ҩ`p`0)9!v}~&`@0)ӈJJJJ)`Ѕ`ȱ`` &ȥ`HhƣĢ`!w}ƥĤ`Ѣ ='`ȱѢĦ`膡``ťƤ!x}e8夰LS' Ƥ8`ŦeѠe桊LW'!y} (TsMB9::89 .9 $9 ''''''''''^+jKNn L / @ !z}t  u+h.d8yX8zcM7#tfWI</" !{}}uld\UMF?71*# ~zwsplieb^[XUQNKH!|}EB?=:741/,)'$"  !}}~}|{z!~}yxwvvutsrqppon7(L***'`L*!*!**!*!`L**!*!`L**L*0%EInsert %S disk in driv!}e # %I,%Epress any key%E'** _% #((`L+L&+D1:+"' I'' #(('L+'I:Lc+(!}(L+'I:Lz+((L+L+LL+((0L+8((1'L+8(('9L+8((!}''( ((i((i(' , ,((L-,(' (' ((((L+8 ('`L:, # # #)(i!})(*(i*(`Lh,b,a,b,a, w"c,d,a, #c, #)(i)(*(i*(`L, (("(!((Ȍ ((, (!},, (,(L- $,, $,, ( m+((*(m,(,, ( m/((*(m0(,ȑ, ( m3!}((*(m4(,ȑ,!(m,!("(m,"( ((L, $&(%( $,,(('( w"!("(0'( !}m/( (*(m0('(Ѯ((0Ln.L.NOT ENOUGH RAM- [#L.%I %I %I %I%E%E"((('( w"( m/( (*(m0!}((('(!(. _% !R'iT'iU"(Y!(X VR(iT(iU( m/( (*(m0(!}YX V(Ȍ((Ȍ (( m/( (*(m0( w"%/&/%/ (&/(Lk/'m ((m((m(!}(m((i((i( (Я(L/R(iT(iU( m/( (*(m0(YX V h#`L/ *L// [!}#L/Type new file name: / n# +(Ȍ('00((L0('I.L0L0((L/L&0.MUS0((i!'!} 'LO0 destination0C' I'8'0 *L0%EWriting %S ...%E%E'Ϣ0l _% h#''ϩ 1#'L0L0 ERR!}OR %I OPENING OUTPUT FILE%E%E'0 _%L0L0L/ *`L0 # # #*()(&(%( e, # #(Ȍ (!} ((LU1 # ((L41 #0 ## #)(i )(*(i*(`L1(((Ȍ ((1 (11 (1(L2 ( m!}+((*(m,(L1(Ȍ(L1(( ( m+((*(m,(m(ȱm( B"(e((e( ( !}m/((*(m0( w" B"m((m(((( e, ((L1(i ( (i(c ((!}L2(i((i((( e, ((L2`L2+(,((Ȍ ((Ȍ(((((((((((($((#(!}(((( ((0LG3L96( m+((*(m,(Ln3 7,L96( m+((*(m,((q((q((i(i!}(Ů(0L3L66 7,(((Ȍ('m('m(33((L36'm ((m( ( ((m((m(!}(i(i(e(e B"e(e( (((i((i(((0L4L4L3 (IC (I!}L4 ( ( (I (IL5( (( ((( w"(((( B"M (M (L5#($(L<5&DURATION !}ERROR: VOICE %I, MEASURE %I%E(( m+((*(m,(8(񮅬(񮅭8(嬅(孅(5 _% (I (IL6&( %(!}"%(&(L5%( m}*&(*(m~*(Ѯ(L5L5%(&(L5"%(&(0L5&("%(&((%(( ( ( ( #)!}(*((( e,((L3L3L+3(( ((0LM6LP6L+3(i ( (i(c ((L~6 7, ((La6 h#L6'%E# duration tr!}anslation errors: %I%E%E$(#(6 _%L6# bytes in file=%I%E*()(6 _%`L6L66 [#L7Select function:6 [#L#7!}1) AMS II -> MMS7 [#L672) Quit7- [#`LA7 , / 0 |1 2`LT7'@@L7}AMS II TO MMS FILE CONVERTER7e [# 6 !}h#L7K:7 1#((( (L8 #((8(0(((((0((0L7((L7L88 [#!}(I (IL!8L8 *L<8Type old file name: 8' n# +LP8source8I' I'8'0 *L8%EReading %S ...%E%E'Ϣ8!}m _% h#''ϩ 1#'L8L8ERROR %I OPENING INPUT FILE%E%E'8 _%L8L8L$8 * >7L7L88 [#L 9D!}one!9 [# h#''``Q7'L8L8ERROR %I OPENING INPUT FILE%E%E'8 _%L8L8L$8 * >7L7L88 [#L 9D # %B (c)1983 Action Computer Services  B JKIHiDiELV`LY%%} Y% BLV`SL%%l L% &` Fj`8冨凪` %EӅӥ%} %`ʆǪƩ Ɛee` %ƦʆǢ &Ɛeǐ & &L% %'&&&8儨児%}祂*L%&&*ń8&&L% w&`hihiHHȱȱL%c !#3`%}L%JJJJ`H %h`Hȩh %L ' %L ' A%L ' I%L ' O%H8%}`HhHh {'L ' BHI V䅠L ' L' Y%L 'Ԇ ؠPIPP`%} 'P I%L ' (L' 'L( "(L'H- '8塪墨hL"( ;(L' B(L' 'ȹP`%}텠8堨塪 '芨Oȩ-`PP 'P棩 Ѥģ0-ģ6000:,80H %}& &ehe&eģ0ʥ 8堅塅`$ '&*i0:0i 'Ʀ`¢ 护%}°ڱ%ȱ%E 'L|)担CS n'L|)I ;(L|)H 6)L|) (L|) &B V 'NLMȑ%}` MLN%B VL ' B&` 0d %ҥ `2)2ҩ`p`0)9%}~*`@0)ӈJJJJ)`Ѕ`ȱ`` *ȥ`HhƣĢ`%}ƥĤ`Ѣ =+`ȱѢĦ`膡``ťƤ%}e8夰LS+ Ƥ8`ŦeѠe桊LW+37 432 423 419 414 4>p 406 40%} 8 394 396 382 378BTPFMcMꀙ: 364 361 357 354 350o:347 344 341 33BB B B B +4>HR\foY,%} 3''''''''''^+jKNn L / @ t  u+h.d8yX8zcM7#%}tfWI</" }uld\UMF?71*# %}~zwsplieb^[XUQNKHEB?=:741/,)'$"  %}%}~}|{zyxwvvutsrqppono,121L...+`L.%.%..%%}.%`L..%.%` L..L./0%EInsert %S disk in drive # %I,%Epress any key%E+.. _) ',,`LW/L^/%}D1:/Z+ I++ ',,+L/+I:L/,,L/+I:L/,,L/L/L/,,0L08,,1%}+L08,,+9L08,,++$,#,,i',,i(,+E0E0',(,Le0O',+#,+#,%}$,',(,L508#,+`Lr0 ' ' 'C,iC,D,iD,`ERROL00000 w&000 '0 'C%},iC,D,iD,`kL0:,9,<,;,$,Ȍ#,9,1:,11#,1$,L1 (00 (00#, mI,$,*(mJ,%}00#, mM,$,*(mN,0ȑ0#, mQ,$,*(mR,0ȑ0;,m0;,<,m0<,#,$,L 1 (@,?%}, (006,5, w&;,<,0'9, mM,:,*(mN,5,Ѯ6,0L2L92NOT ENOUGH RAM2) ['LM2 %I %I%}%E%E<,9, mM,:,*(mN,;,2C _) %R ,iT ,iU<,Y;,X VR,iT,iU9, mM%},:,*(mN,YX V&,Ȍ%,$,Ȍ#,9, mM,:,*(mN, w&637363#,73$,L3(A,m#,%},m$,,m%,,m&,%,&,,m#,,m$,,m%,,m&,)%,&,#,Ј$,L%3R,iT,iU9, m%}M,:,*(mN,YX V h'`L3 .L33 ['L4Type new file name: 3 n' T/,Ȍ,+:4:4,,LV4s%},+I.LK4LV4,,L*4L^4.MUS4,,iY+ +L4 destination4{+ I+8+0 .L4%EWriting %S ...%E%E%}+Ϣ4 _) h'++ϩ 1'+L 5L5 ERROR %I OPENING OUTPUT FILE%E%E+4 _)L#5L&5L3 .`L-5 '%} ' 'D,C,@,?, 0 ' '$,Ȍ#,#,$,L5 '#,$,Ll5 '0 '# 'C,i C,D,iD,`%}L5$,Ȍ#,&,Ȍ%,*,Ȍ),9,5:,55),5*,L,8 0,/,'B,A,),I *,IL\6), mM,*,*(mN,8),*%}, mM,*(mN,87,ȱ8,L}6), mM,*,*(mN,ȱ8,7,(,Ȍ',8,7, w&666',6(,L%}7 ,m#,,m$,2,1,,m#,,m$, ,,,m%,,m&,%,i&,i,e,e B&%}e,e,1,2,0Lk72,1,,m#,,m$,1,MA, 2,MB,L71,2,0L7,I ,IL7,,%}0L7/,0,2,B,1,A,L7,m#,,m$,#,$,%,i%,&,i&,',(,L6), mU,*,*(mV,0,/,),%}*,L5`L080,/,$,Ȍ#,9,\8:,]8\8#,]8$,Lh9#, mI,$,*(mJ,L8.,Ȍ-,L8.,-,#, mI,$,*(m%}J,m-,ȱm.,#, mU,$,*(mV,qq B&/,e/,0,e0,#, mM,$,*(mN,%} w& B&m/,,m0,,,, 0#,$,LK89,i#,:,i$,c#,$,L9,i,,i,,%}, 0#,$,Ly9`L9I,J,$,Ȍ#,&,Ȍ%,(,',(,*,',),(,8,',7,(,>,',=,),*,9,),:,*,0L:%}L=), mI,*,*(mJ,LC: o0L=), mI,*,*(mJ,7,q7,8,q8,'B,A,',i(,i7,Ů8,0L:L%}= o0',(,0,Ȍ/, ,m', ,m(,::/,0,L= ,m#,,m$,2,1,,m#,,m$, ,,,m%,%},m&,%,i&,i,e,e B&e,e,1,MA, 2,MB,L;1,2,0L;2,B,1,A,%} 'C,D,1, mk,2,*(ml,2,1,2,1, 0#,$,%,i%,&,i&,,,0L;L;L:,IC ,IL< ,%},,I ,IL<,",,!,,, w&,,,, B&M!,M",L<=,>,L<&DURATION ERROR: VO%}ICE %I, MEASURE %I%E*,), mI,*,*(mJ,87,񮅬8,񮅭8',嬅(,孅),'%E# duration translation%} errors: %I%E%E>,=,= _)L7># bytes in file=%I%ED,C,>" _)`LJ>LN>>M ['Li>Select function:>X ['L>1) AMS II%} -> MMS>s ['L>2) Quit> ['`L> 0 5 3 *5 -8 9`L>+@@L>}AMS II TO MMS FILE CONVERTER> [' G> h'L>%}K:> 1'4,3,3, 4,Lg? '4,3,83,03,4,4,3,4,03,4,0Ld?4,3,L?Lk??j ['3,I%} 4,IL?LnBL?ENTER APPROPRIATE VELOCITIES? [' mE,*(mF,L?PPP?È mE,*(mF,L? PP?ȑ舑%} mE,*(mF,L@ P@ȑ  mE,*(mF,L4@ MP@ȑ0 mE,*(mF,LX@ MF@ȑT mE,*(mF%},L|@ F@ȑx mE,*(mF,L@ FF@ȑ mE,*(mF,L@FFF@ȑ$,Ȍ#,#,$,LA#, mE,%}$,*(mF,,,LA%S (DEFAULT=%I): ,#, mk,$,*(ml,ȱ,A _) (4,3,3,4,0LA#, %}mk,$,*(ml,4,3,#,$,L@ .LAA ['LAType old file name: A n' T/LAsourceAƢ+ I+8+0 .L%}A%EReading %S ...%E%E+ϢA _) h'++ϩ 1'+L_BLNBERROR %I OPENING FILE%E%E+B4 _)LbBLeBLA %}. >L>LrBBq ['LBDone!B| [' h'++``> 1'+L_BLNBERROR %I OPENING FILE%E%E+B4 _)LbBLeBLA $; INCLUDE "D:SYSLIB.ACT" INCLUDE "D:SYSIO.ACT" INCLUDE "D:SYSMISC.ACT" INCLUDE "D:SYSBLK.ACT" INCLUDE "D:SYSSTR.ACT")};; AMS2MMS;; AMS II TO MMS File Converter;; ACTION! version by Bruce Smith; MODULE BYTE POKMSK=$10, IRQEN=$D)}20E, OPOKMSK, ERRORFLAG BYTE ARRAY Xd(16), FILENMd(16), Sd(12), MEASd()}1876), XNOTE1d(7501), XNOTE2d(15001) INT A,B,C,I,II,J,K,L,M,N,X, NUM,NUMVCS,NUMM,DURERROR)}, TEMPO,Z=[15000],BYTES INT ARRAY MEASV(5), XNOTEV(5), XXNOTEV(5), AMSTEMPO=[999)}9 9999 9999 9999 9999 9999 9999 9999 9999 9999 6750 6125 5604 5163 4785 4458 4171 3918 3694 3493 3312 3148 2999 2863 2738)} 2624 2518 2420 2329 2244 2165 2091 2022 1957 1896 1838 1783 1732 1683 1636 1592 1550 1510 1472 1436 1401 1368 1336 1306 1)}276 1248 1221 1195 1170 1146 1123 1101 1079 1059 1038 1019 1000 982 964 947 931 915 899 884 870 855 841 828 815 802 790 77)}8 766 755 743 732 722 712 701 692 682 673 663 654 646 637 629 620 612 604 597 589 582 575 567 561 554 547 541 534 528 522)} 516 510 504 498 492 487 481 476 471 466 461 456 451 446 441 437 432 427 423 419 414 410 406 402 398 394 390 386 382 378 )}375 371 368 364 361 357 354 350 347 344 341 337 334 331 328 325 322 319 317 314 311 308 305 303 300 297 295 292 290 287 28)}5 282 280 277 275 273 270 268 266 264 261 259 257 255 253 251 249 247 245 243 241 239 237 235 233 231 229 227 225 224 222)} 220 218 217 215 213 212 210 208 207 205 203 202 200 199 197 196 194 193 191 190 188 187 185 184 183 181 180 178 177 176 )}174 173 172 171 169 168 167 165 164 163 162 161 159 158 157 156 155 154 152 151 150 149 148 147 146 145 144 143 141 140 1)}39 138 137 136 135 134 133 132 131 130 129 128 128 127 126 125 124 123 122 121 120 119 118 118 117 116 115 114 113 112 112)} 111 110] CARD HOLDERROR;; CIO PROCEDURE; PROC CIO=$E456(BYTE areg,xreg);; REPLACEMENT ERROR ROUTINE; PROC ERRORRT)}N(BYTE ERRCODE) ERRORFLAG=ERRCODE RETURN;; REPLACE ERROR ROUTINE; PROC SETERROR() HOLDERROR=ERROR ERROR=ERRORRTN)} RETURN;; REINSTALL SYSTEM ERROR ROUTINE; PROC FREEERROR() ERROR=HOLDERROR RETURN;; PROMPT FOR DISK INSERTION; P)}ROC DISKSWAP(BYTE D) PRINTF("%EInsert %S disk in drive # %I,%Epress any key%E",Sd,D) A=GETD(4) RETURN;; PROMPT FOR A )}FILE NAME; PROC GETFILENAME() SCOPY(Xd,"D1:") INPUTS(FILENMd) A=0 IF FILENMd(0)>2 THEN DO IF FILENMd(2)=':)} THEN A=2 EXIT FI IF FILENMd(3)=': THEN A=3 EXIT FI EXIT OD FI IF A>0 THEN IF FILENM)}d(A-1)>'1 AND FILENMd(A-1)<'9 THEN Xd(2)=FILENMd(A-1) FI FI I=4 FOR J=A+1 TO FILENMd(0) DO Xd()}I)=FILENMd(J) I==+1 OD Xd(0)=I-1 RETURN;; WRITE A NEW MEASURE MARKER; PROC NEWMEASURE() PUTD(2,250) PUTD(2,)}0) PUTD(2,0) BYTES==+3 RETURN;; WRITE A WORD IN LSB/MSB FORMAT; PROC PUTWORD(CARD D) CARD DD DD=D/256 PUTD(2,)}D) PUTD(2,DD) BYTES==+2 RETURN;; READ IN THE AMS II FILE; PROC READAMS2FILE() INT A,B BYTE IOCB1CMD=$352 CAR)}D IOCB1BUF=$354 CARD IOCB1LEN=$358 NUMVCS=4 NUMM=0 FOR I=1 TO NUMVCS DO A=INPUTID(1) B=INPUTID(1) MEASV(I)})=A XNOTEV(I)=B XXNOTEV(I)=B NUMM==+A OD TEMPO=INPUTID(1) A=INPUTID(1) IF NUMM>Z/8 OR XNOTEV(NUMVCS)>Z T)}HEN PRINTE("NOT ENOUGH RAM") PRINTF("%I %I %I %I%E%E",NUMM,Z/8,XNOTEV(NUMVCS),Z) BREAK() FI; )} IOCB1CMD=7 IOCB1BUF=MEASd+1 IOCB1LEN=NUMM CIO(0,$10); IOCB1CMD=7 IOCB1BUF=XNOTE2d+1 IOCB1LEN=XNOTEV(NUMVCS) C)}IO(0,$10); II=1 FOR I=1 TO XNOTEV(NUMVCS)/2 DO XNOTE1d(I)=XNOTE2d(II) II==+2 OD; IOCB1CMD=7 IOCB1BUF=XN)}OTE2d+1 IOCB1LEN=XNOTEV(NUMVCS) CIO(0,$10) CLOSE(1) RETURN;; PROMPT FOR MMS FILE NAME; PROC NEWFILENAME() SETER)}ROR() DO PRINTE("") PRINT("Type new file name: ") GETFILENAME() FOR A=1 TO Xd(0) DO IF Xd(A)=46 THEN E)}XIT FI ; "." OD SASSIGN(Xd,".MUS",A,A+3) SCOPY(Sd,"destination") DISKSWAP(Xd(2)-48) PRINTF("%EWriting %S ...%)}E%E",Xd) CLOSE(2) ERRORFLAG=0 OPEN(2,Xd,8,0) IF ERRORFLAG>0 THEN PRINTF("ERROR %I OPENING OUTPUT FIL)}E%E%E",ERRORFLAG) ELSE EXIT FI OD FREEERROR() RETURN;; WRITE OUT STANDARD HEADER DATA; PROC PUTHEADER)}DATA() PUTD(2,1) PUTD(2,0) PUTD(2,0) BYTES=3 PUTWORD(TEMPO) PUTD(2,0) PUTD(2,4) FOR I=1 TO 7 DO PUTD(2,)}0) OD PUTD(2,6) PUTD(2,'0) PUTD(2,'#) BYTES==+12 RETURN;; WRITE OUT # BYTES VOICE;; (3 * # MEASURES + 3 * # )}NOTES); PROC PUTMEASUREDATA() N=0 FOR I=1 TO NUMVCS DO IF MEASV(I)=0 THEN M=1 ELSE M=0 FI N==+3*(MEASV(I)+M) *} A=XNOTEV(I)/2*3+N PUTWORD(A) OD FOR I=NUMVCS+1 TO 99 DO A==+3 PUTWORD(A) OD RETURN;; WRITE OUT THE *}ACTUAL NOTE DATA; PROC PUTNOTEDATA() MEASV(0)=0 I=1 II=1 J=0 K=J NUM=J DURERROR=J DO DO K==+1 *}IF K>NUMVCS THEN EXIT FI IF MEASV(K)=0 THEN NEWMEASURE() EXIT FI NUM==+MEASV(K) DO IF J+1>NU*}M THEN EXIT FI NEWMEASURE() J==+1 FOR N=1 TO MEASd(J) DO DO B=XNOTE1d(I) A=XNOTE2d(*}II)+ 256*XNOTE2d(II+1) I==+1 II==+2 IF A>0 THEN EXIT FI OD IF B=67 THEN B=0 FI*} IF B<>128 THEN C=A A=A/5 IF 5*A<>C THEN DURERROR==+1 PRINTF("DURATION ERROR: VOICE*} %I, MEASURE %I%E",K,J-(NUM-MEASV(K))) FI FI IF B=128 THEN FOR TEMPO=10 TO 290 DO*} IF A>=AMSTEMPO(TEMPO) THEN EXIT FI OD IF TEMPO>290 THEN TEMPO=290 FI A=TEMP*}O B=240 FI PUTD(2,B) BYTES==+1 PUTWORD(A) OD OD OD IF K>NUMVCS THEN EXIT FI* } OD FOR I=NUMVCS+1 TO 99 DO NEWMEASURE() OD CLOSE(2) PRINTF("%E# duration translation errors: %I%E%E",DURER* }ROR) PRINTF("# bytes in file=%I%E",BYTES) RETURN;; PROGRAM INITIALIZATION; PROC INIT() PRINTE("") PRINTE("Select * }function:") PRINTE("1) AMS II -> MMS") PRINTE("2) Quit") RETURN; ; THIS ROUTINE ORGANIZES THE CALLS; NEEDED TO CON* }VERT AMS II TO MMS; PROC AMS2TOMMS() READAMS2FILE() NEWFILENAME() PUTHEADERDATA() PUTMEASUREDATA() PUTNOTEDATA()* } RETURN;; THE MAINLINE PROGRAM; PROC MAIN() OPOKMSK=POKMSK POKMSK=64 IRQEN=64 PRINTE("}AMS II TO MMS FILE CO*}NVERTER") DO INIT() CLOSE(4) OPEN(4,"K:",4,0) X=0 WHILE X=0 DO X=GETD(4) X==-48 IF X<0 OR X*}>2 THEN X=0 FI OD PRINTE("") IF X=2 THEN EXIT FI SETERROR() DO PRINT("Type old file name: ") GETFIL*}ENAME() SCOPY(Sd,"source") DISKSWAP(Xd(2)-48) PRINTF("%EReading %S ...%E%E",Xd) CLOSE(1) ERRORFLAG=0 *}OPEN(1,Xd,4,0) IF ERRORFLAG>0 THEN PRINTF("ERROR %I OPENING INPUT FILE%E%E",ERRORFLAG) ELSE EXIT *} FI OD FREEERROR() AMS2TOMMS() OD PRINTE("") PRINTE("Done!") CLOSE(4) POKMSK=OPOKMSK IRQEN=OPOKMSK *} RETURN OD FREEERROR() AMS2TOMMS() OD PRINTE("") PRINTE("Done!") CLOSE(4) POKMSK=OPOKMSK IRQEN=OPOKMSK ( INCLUDE "D1:SYSLIB.ACT" INCLUDE "D1:SYSIO.ACT" INCLUDE "D1:SYSMISC.ACT" INCLUDE "D1:SYSBLK.ACT" INCLUDE "D1:SYSSTR..}ACT"; AMS II TO MMS File Converter; (supports AMS dynamics); ACTION! version by Bruce Smith; MODULE BYTE POKMSK=$10.}, IRQEN=$D20E, OPOKMSK, ERRORFLAG BYTE ARRAY Xd(16), FILENMd(16), Sd(12), .} Td(16), MEASd(1876), XNOTE1d(7501)=18000, XVEL1d(7501)=25501, .} XNOTE2d(15001)=33002, DYN INT A,B,C,I,II,J,K,L,M,N,V,X, Z=[15000],NUM,NUMVCS,NUMM, DURERROR.},TEMPO,OLDVEL,BYTES CARD ARRAY ADDR(9) INT ARRAY MEASV(5), XNOTEV(5), XXNOTEV(5), NUMV.}EL(5), MIDIVEL(9)=[ 0 43 52 62 72 82 92 102 111], AMSTEMPO=[9999 9999 9999 9999 9999 9999 9999 .}9999 9999 9999 6750 6125 5604 5163 4785 4458 4171 3918 3694 3493 3312 3148 2999 2863 2738 2624 2518 2420 2329 2244 2165 20.}91 2022 1957 1896 1838 1783 1732 1683 1636 1592 1550 1510 1472 1436 1401 1368 1336 1306 1276 1248 1221 1195 1170 1146 1123.} 1101 1079 1059 1038 1019 1000 982 964 947 931 915 899 884 870 855 841 828 815 802 790 778 766 755 743 732 722 712 701 69.}2 682 673 663 654 646 637 629 620 612 604 597 589 582 575 567 561 554 547 541 534 528 522 516 510 504 498 492 487 481 476.} 471 466 461 456 451 446 441 437 432 427 423 419 414 410 406 402 398 394 390 386 382 378 375 371 368 364 361 357 354 350 . }347 344 341 337 334 331 328 325 322 319 317 314 311 308 305 303 300 297 295 292 290 287 285 282 280 277 275 273 270 268 26.!}6 264 261 259 257 255 253 251 249 247 245 243 241 239 237 235 233 231 229 227 225 224 222 220 218 217 215 213 212 210 208."} 207 205 203 202 200 199 197 196 194 193 191 190 188 187 185 184 183 181 180 178 177 176 174 173 172 171 169 168 167 165 .#}164 163 162 161 159 158 157 156 155 154 152 151 150 149 148 147 146 145 144 143 141 140 139 138 137 136 135 134 133 132 1.$}31 130 129 128 128 127 126 125 124 123 122 121 120 119 118 118 117 116 115 114 113 112 112 111 110] CARD HOLDERROR;; C.%}IO PROCEDURE; PROC CIO=$E456(BYTE areg,xreg);; REPLACEMENT ERROR ROUTINE; PROC ERRORHANDLER(BYTE ERRCODE) ERRORFLAG=.&}ERRCODE RETURN;; REPLACE SYSTEM ERROR ROUTINE; PROC SETERROR() HOLDERROR=ERROR ERROR=ERRORHANDLER RETURN;; REIN.'}STALL SYSTEM ERROR ROUTINE; PROC FREEERROR() ERROR=HOLDERROR RETURN;; PROMPT FOR DISK INSERTION; PROC DISKSWAP(BYTE.(} D) PRINTF("%EInsert %S disk in drive # %I,%Epress any key%E",Sd,D) A=GETD(4) RETURN;; PROMPT FOR A FILE NAME; P.)}ROC GETFILENAME() SCOPY(Xd,"D1:") INPUTS(FILENMd) A=0 IF FILENMd(0)>2 THEN DO IF FILENMd(2)=': THEN A=2 .*} EXIT FI IF FILENMd(3)=': THEN A=3 EXIT FI EXIT OD FI IF A>0 THEN IF FILENMd(A-1)>'1 AND .+} FILENMd(A-1)<'9 THEN Xd(2)=FILENMd(A-1) FI FI I=4 FOR J=A+1 TO FILENMd(0) DO Xd(I)=FILENMd(J) .,}I==+1 OD Xd(0)=I-1 RETURN;; WRITE A NEW MEASURE MARKER; PROC NEWMEASURE() PUTD(2,250) PUTD(2,0) PUTD(2,0) .-}BYTES==+3 RETURN;; WRITE A WORD IN LSB/MSB FORMAT; PROC PUTWORD(CARD D) CARD DD DD=D/256 PUTD(2,D) PUTD(2,DD) ..} BYTES==+2 RETURN;; READ IN THE AMS II FILE; PROC READAMS2FILE() INT A,B BYTE IOCB1CMD=$352 CARD IOCB1BUF=$354 ./} CARD IOCB1LEN=$358 NUMVCS=4 NUMM=0 FOR I=1 TO NUMVCS DO A=INPUTID(1) B=INPUTID(1) MEASV(I)=A XNOTEV(I)=.0}B XXNOTEV(I)=B NUMM==+A OD TEMPO=INPUTID(1) A=INPUTID(1) IF NUMM>Z/8 OR XNOTEV(NUMVCS)>Z THEN PRINTE("N.1}OT ENOUGH RAM") PRINTF("%I %I%E%E",NUMM,XNOTEV(NUMVCS)) BREAK() FI; IOCB1CMD=7.2} IOCB1BUF=MEASd+1 IOCB1LEN=NUMM CIO(0,$10); IOCB1CMD=7 IOCB1BUF=XNOTE2d+1 IOCB1LEN=XNOTEV(NUMVCS) C.3}IO(0,$10); II=1 FOR I=1 TO XNOTEV(NUMVCS)/2 DO XNOTE1d(I)=XNOTE2d(II) II==+1 XVEL1d(I)=XNOTE2d(II)&15 II=.4}=+1 OD; IOCB1CMD=7 IOCB1BUF=XNOTE2d+1 IOCB1LEN=XNOTEV(NUMVCS) CIO(0,$10) CLOSE(1) RETURN;; PROMPT FOR M.5}MS FILE NAME; PROC NEWFILENAME() SETERROR() DO PRINTE("") PRINT("Type new file name: ") GETFILENAME() FOR .6}A=1 TO Xd(0) DO IF Xd(A)=46 THEN EXIT FI ; "." OD SASSIGN(Xd,".MUS",A,A+3) SCOPY(Sd,"destination") DISKS.7}WAP(Xd(2)-48) PRINTF("%EWriting %S ...%E%E",Xd) CLOSE(2) ERRORFLAG=0 OPEN(2,Xd,8,0) IF ERRORFLAG>0 THEN .8} PRINTF("ERROR %I OPENING OUTPUT FILE%E%E",ERRORFLAG) ELSE EXIT FI OD FREEERROR() RETURN;; WRITE OUT .9}STANDARD HEADER DATA; PROC PUTHEADERDATA() PUTD(2,1) PUTD(2,0) PUTD(2,0) BYTES=3 PUTWORD(TEMPO) PUTD(2,0) PUT.:}D(2,4) FOR I=1 TO 7 DO PUTD(2,0) OD PUTD(2,6) PUTD(2,'0) PUTD(2,'#) BYTES==+12 RETURN;; ROUTINE TO COU.;}NT NUMBER OF VELOCITY; CHANGES PER VOICE; PROC VELOCITY() I=1 II=1 FOR K=1 TO NUMVCS DO N=0 OLDVEL=9999.<} IF K<>1 THEN NUM=XNOTEV(K)-XNOTEV(K-1) ELSE NUM=XNOTEV(K) FI FOR J=1 TO NUM/2 .=} DO V=XVEL1d(I) B=XNOTE1d(I) A=XNOTE2d(II)+ 256*XNOTE2d(II+1) IF V>8 THEN V=8 XVEL1d(I)=8 .>} FI IF V<>OLDVEL AND V>0 AND B<>128 AND A>0 THEN N==+1 OLDVEL=V ELSE XVEL1d(I)=0 F.?}I I==+1 II==+2 OD NUMVEL(K)=N OD RETURN;; WRITE OUT # BYTES VOICE;; (3 * # MEASURES + 3 * # NOTES +;.@} 3 * # VELOCITY CHANGES); SUM IS CUMULATIVE ACROSS ALL VOICES; PROC PUTMEASUREDATA() N=0 FOR I=1 TO NUMVCS DO I.A}F MEASV(I)=0 THEN M=1 ELSE M=0 FI N==+3*(MEASV(I)+M+NUMVEL(I)) A=XNOTEV(I)/2*3+N PUTWORD(A) OD FOR I=NUMVCS+1 T.B}O 99 DO A==+3 PUTWORD(A) OD RETURN;; WRITE OUT THE ACTUAL NOTE DATA; PROC PUTNOTEDATA() MEASV(0)=0 I=1.C} II=1 J=0 K=J NUM=J DURERROR=J DO DO K==+1 IF K>NUMVCS THEN EXIT FI IF MEASV(K)=0 THEN NEWME.D}ASURE() EXIT FI NUM==+MEASV(K) OLDVEL=9999 DO IF J+1>NUM THEN EXIT FI NEWMEASURE() J==+.E}1 FOR N=1 TO MEASd(J) DO DO V=XVEL1d(I) B=XNOTE1d(I) A=XNOTE2d(II)+ 256*XNOTE.F}2d(II+1) IF V<>OLDVEL AND V>0 THEN OLDVEL=V PUTD(2,247) BYTES==+1 V=MIDIVEL(V) .G} PUTWORD(V) FI I==+1 II==+2 IF A>0 THEN EXIT FI OD IF B=67 THEN B=0 FI IF .H}B<>128 THEN C=A A=A/5 IF 5*A<>C THEN DURERROR==+1 PRINTF("DURATION ERROR: VOICE %I, MEAS.I}URE %I%E",K,J-(NUM-MEASV(K))) FI FI IF B=128 THEN FOR TEMPO=10 TO 290 DO .J}IF A>=AMSTEMPO(TEMPO) THEN EXIT FI OD IF TEMPO>290 THEN TEMPO=290 FI A=TEMPO B.K}=240 FI PUTD(2,B) BYTES==+1 PUTWORD(A) OD OD OD IF K>NUMVCS THEN EXIT FI OD F.L}OR I=NUMVCS+1 TO 99 DO NEWMEASURE() OD CLOSE(2) PRINTF("%E# duration translation errors: %I%E%E",DURERROR) PRI.M}NTF("# bytes in file=%I%E",BYTES) RETURN;; PROGRAM INITIALIZATION; PROC INIT() PRINTE("") PRINTE("Select function:".N}) PRINTE("1) AMS II -> MMS") PRINTE("2) Quit") RETURN; ; THIS ROUTINE ORGANIZES THE CALLS; NEEDED TO CONVERT AMS I.O}I TO MMS; PROC AMS2TOMMS() READAMS2FILE() VELOCITY() NEWFILENAME() PUTHEADERDATA() PUTMEASUREDATA() PUTNOTEDATA.P}() RETURN;; THE MAINLINE PROGRAM; PROC MAIN() OPOKMSK=POKMSK POKMSK=64 IRQEN=64 PRINTE("}AMS II TO MMS FILE.Q} CONVERTER") DO INIT() CLOSE(4) OPEN(4,"K:",4,0) X=0 WHILE X=0 DO X=GETD(4) X==-48 IF X<0 O.R}R X>2 THEN X=0 FI OD PRINTE("") IF X=2 THEN EXIT FI PRINTE("ENTER APPROPRIATE VELOCITIES") ADDR(1)="PPP" A.S}DDR(2)=" PP" ADDR(3)=" P" ADDR(4)=" MP" ADDR(5)=" MF" ADDR(6)=" F" ADDR(7)=" FF" ADDR(8)="FFF" FOR I=1.T} TO 8 DO DYN=ADDR(I) PRINTF("%S (DEFAULT=%I): ",DYN,MIDIVEL(I)) X=INPUTI() IF X>0 THEN MIDIVEL(I)=X FI .U} OD SETERROR() DO PRINTE("") PRINT("Type old file name: ") GETFILENAME() SCOPY(Sd,"source") DIS.V}KSWAP(Xd(2)-48) PRINTF("%EReading %S ...%E%E",Xd) CLOSE(1) ERRORFLAG=0 OPEN(1,Xd,4,0) IF ERRORFLAG>0 .W} THEN PRINTF("ERROR %I OPENING FILE%E%E",ERRORFLAG) ELSE EXIT FI OD FREEERROR() AMS2TOMMS() .X} OD PRINTE("") PRINTE("Done!") CLOSE(4) POKMSK=OPOKMSK IRQEN=OPOKMSK RETURNOD FREEERROR() AMS2TOMMS() ,[p0TP p0TP Several years ago, I bought MIDI MUSIC SYSTEM (MMS) from 2Z} Hybrid Arts, to complement the other Midi software I use on our ATARI 800 and 520ST. Included with MMS is a2[} Basic program to convert ADVANCED MUSIC SYSTEM (AMS) files into MMS format. One reason I bought MMS wa2\}s that I have a large number of very good AMS files and I wanted to convert them and hear them 2]}through our synthesizer. Unfortunately, several of my better files were too big for the converter program2^} to handle. I decided to write my own converter program, and chose Action! since it would create2_} a smaller and faster program. I pulled apart the original Basic program, and kept only 2`} the AMS II to MMS portion (the basic program could do AMS I to MMS and AMS I to AMS II as well). By wri2a}ting this program, I learned a fair bit about the format of the files used in both AMS II and MMS,2b} plus I learned a bit more about programming in Action! You will notice a rather large tab2c}le in the program, called AMSTEMPO. The original Basic program used a rather complex formula using f2d}loating point numbers to convert the AMS II tempo to the equivalent MMS tempo. I do not have the A2e}ction! Toolkit package which adds floating point support, so I had to find an alternate method of doi2f}ng the conversion. I built the table which maps the two tempo values as follows. I search the ta2g}ble for an entry which is less than or equal to the AMS II tempo. When one is found, the subscript into the 2h} table for that value is the equivalent MMS tempo. For example, if the AMS II tempo was 4171, the a2i}ppropriate entry in the table is in the entry subscripted by 16 (Action! arrays start with subsc2j}ript 0, so the 17'th entry (4171) is at subscript location 16), so the equivalent MMS tempo is 16. 2k} Running AMS2MMS is quite simple. After loading it, you are presented with the selection screen. You can 2l} choose to convert a file by pressing 1, or quit execution by pressing 2. Having selected to convert2m} a file, you are prompted for the file name. If you do not specify the device, the default of drive2n} 1 (D1:) will be added to the name you supply. You are then prompted to enter the source disk. At this point2o}, the original file will be read. You will be prompted for the MMS file name you want to use. There is2p} no need to supply the file extender, since it will be set to .MUS for you. You will then be prompted t2q}o insert the output disk. The converted file will then be written. The output process will not be 2r} extremely fast, but a lot of processing is going on as the file is being converted and written. Believe me, 2s}it is MUCH faster than the original Basic program. If the program cannot accurately conve2t}rt the duration of a note, it so informs you, telling you the voice and measure where the problem occurred. 2u} Be sure to go back and fix the problem with MMS later, or the voices in the music file could go out of synch 2v}when played. I was able to use this program on all of my AMS II files, but there was one proble2w}m. It did not support the dynamics (volume of the notes --- ppp (quiet) to FFF (loud)) that each not2x}e had in AMS II. I therefore decided to add this feature. I put in a table which contains the equivalent velociti2y}es for the 8 different AMS II dynamics I support (ppp to FFF). These work fine on our Roland, but might2z} not on your synthesizer if it does not support all the possible velocity values between 0 and 127. Yo2{}u should check into the velocity capabilities of your synthesizer, and change the table accordingly. The table 2|} is called MIDIVEL; update the source to make the changes permanent, or override the defaults at start2}}up time (you will be prompted for the appropriate velocity values - enter a number or just hit retu2~}rn to accept the default). Support of velocity values makes the MMS files somewhat bigger. This co2}uld mean that some very large AMS files might convert but be too large to fit into MMS. The two2} versions of my program are called AMS2MMS and AMS2MMSV (V for Velocity). AMS2M2}MS and AMS2MMSV represented my most ambitious projects in Action! at the time. If the programs seem a bit cluttere2}d, it is because my brain naturally works that way, plus I was converting a Basic program which w2}as not written in a structured form in the first place. Even though they are not elegant, they do 2}at least work. Writing them was worth the effort. Although the music files sounded quite good through 2} AMS II, they sound much better through the synthesizer.ite good through 0c