Vgm2FamiTrackerTxtSaa1099.sdlbasic 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. #! /usr/bin/sdlbrt
  2. finp$="tune.vgm"
  3. '- .vgm to FamiTracker .txt converter - SAA1099 version
  4. '- copyleft Paulo Silva, oct'20
  5. '-------------------------------
  6. '- bugs:
  7. '- - an acute sound might appear because an issue related to volume 0 that VortexTracker doesnt support, R-- note used instead (and the converter should store which note/frequency is for a probable volume changing, and set back the note/frequency value back)
  8. '- - doesn't read yet the author/title information
  9. '- - 'L' will be useful for the loop point location
  10. '- - probably will need a sample counter before converting
  11. '- - missing noise support
  12. '- - frequncy inaccuracy from the germanic notation formula probably fixed, needs more testing
  13. '-------------------------------
  14. ltxtm$="ROW .. : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ... : ... .. . ...":ltxcr$=ltxtm$
  15. freq0=0:freq1=0:freq2=0:vol0=0:vol1=0:vol2=0
  16. patsz=48:patc=0:patid=0:freqq=0
  17. hdram=0x40:vgmv=0:veof=0
  18. dim hdrv[256]
  19. if argc>2 then:finp$=argv(2):end if
  20. fout2$=finp$+"_famitracker.txt":fout3$=finp$+"_famitracker_debug.txt"
  21. frmc=0:frmr=300:trg=0
  22. frmi=735
  23. if argc>3 then:
  24. if argv(3)="1" or ucase$(argv(2))="-PAL" then
  25. frmi=882:end if:end if
  26. debug=0
  27. if argc>4 then:
  28. if argv(4)="1" or ucase$(argv(2))="-DEBUG" then
  29. debug=1:end if:end if
  30. octave0=0:octave1=0:octave2=0:octave3=0:octave4=0:octave5=0
  31. note0=0:note1=0:note2=0:note3=0:note4=0:note5=0
  32. ';- 12 notes:
  33. ';- 5, 32, 60, 85, - 05 20 3C 55 - c c+ d d+
  34. ';- 110, 132, 153, 173, - 6E 84 99 AD - e f f+ g
  35. ';- 192, 210, 227, 243, - C0 D2 E3 F3 - g+ a a+ b
  36. ' registos:
  37. ' 0x10 - oitava canais 0 e 1
  38. ' 0x08 - frequência canal 0
  39. ' 0x09 - frequência canal 1
  40. ' 0x00 - volume canal 0 (stereo)
  41. ' 0x01 - volume canal 1 (stereo)
  42. '- frequencia: nota=int(byte/22.05)
  43. '- fix: 0x0FE=440hz=A-4
  44. function nttfrqsaa$(freqb)
  45. e$= "C-1C#1D-1D#1E-1F-1F#1G-1G#1A-1A#1B-1"
  46. e$=e$+"C-2C#2D-2D#2E-2F-2F#2G-2G#2A-2A#2B-2"
  47. e$=e$+"C-3C#3D-3D#3E-3F-3F#3G-3G#3A-3A#3B-3"
  48. e$=e$+"C-4C#4D-4D#4E-4F-4F#4G-4G#4A-4A#4B-4"
  49. e$=e$+"C-5C#5D-5D#5E-5F-5F#5G-5G#5A-5A#5B-5"
  50. e$=e$+"C-6C#6D-6D#6E-6F-6F#6G-6G#6A-6A#6B-6"
  51. e$=e$+"C-7C#7D-7D#7E-7F-7F#7G-7G#7A-7A#7B-7"
  52. e$=e$+"C-8C#8D-8D#8E-8F-8F#8G-8G#8A-8A#8B-8..."
  53. 'tmq=141-(int((log(freqb*.99)/log(2))*12))
  54. tmq=freqb-12
  55. if tmq<1 then:tmq=1:end if
  56. if tmq>85 then:tmq=85:end if
  57. return mid$(e$,(tmq*3)-2,3)
  58. end function
  59. open finp$ for input as #1
  60. for i=0 to 255
  61. hdrv[i]=readbyte(1)
  62. next
  63. close #1
  64. hdram=0x040
  65. vgmv=hdrv[8]+hdrv[9]*256
  66. if vgmv>=0x0150 then:hdram=0x080:end if
  67. if vgmv>=0x0170 then:hdram=0x100:end if
  68. '- wrong information???
  69. ttsam=hdrv[0x18]+hdrv[0x19]*256+hdrv[0x1A]*65536+hdrv[0x1B]*16777216
  70. hsam$="PlayOrder=L0"
  71. for i=1 to (ttsam/(frmi*patsz))-1
  72. hsam$=hsam$+","+str$(i)
  73. next
  74. open finp$ for input as #1
  75. open fout2$ for output as #2
  76. open fout3$ for output as #3
  77. print #2,"# FamiTracker text format":print #2,""
  78. print #2,"# Module information"
  79. print #2,"TITLE \"\""
  80. print #2,"AUTHOR \"\""
  81. print #2,"COPYRIGHT \"\"":print #2,""
  82. print #2,"# Module comment"
  83. print #2,"COMMENT \"\"":print #2,""
  84. print #2,"# Global settings"
  85. print #2,"MACHINE 0"
  86. print #2,"FRAMERATE 0"
  87. print #2,"EXPANSION 16"
  88. print #2,"VIBRATO 1"
  89. print #2,"SPLIT 32":print #2,""
  90. print #2,"# Namco 163 global settings"
  91. print #2,"N163CHANNELS 3":print #2,""
  92. print #2,"# Macros":print #2,""
  93. print #2,"# DPCM samples":print #2,""
  94. print #2,"# Detune settings":print #2,""
  95. print #2,"# Grooves":print #2,""
  96. print #2,"# Tracks using default groove"
  97. print #2,"# Instruments"
  98. print #2,"INST2A03 0 -1 -1 -1 -1 -1 \"instrument01\""
  99. print #2,"INSTN163 1 -1 -1 -1 -1 -1 32 0 1 \"instrument02\""
  100. print #2,"N163WAVE 1 0 : 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0":print #2,""
  101. print #2,"# Tracks":print #2,""
  102. print #2,"TRACK "+str$(patsz)+" 1 128 \"test\""
  103. print #2,"COLUMNS : 1 1 1 1 1 1 1 1 1 1 1 1 1":print #2,""
  104. print #2,"Pattern 00"
  105. '- the amount of header bytes depends on vgm format version
  106. for eee=0 to hdram-1:q0=readbyte(1):next '- read offset byte first
  107. txou1$=" #("+str$(0)+")"
  108. while veof=0:
  109. q0=readbyte(1)
  110. '- vgm eof command
  111. if q0=0x66 then:
  112. veof=1
  113. print #3,"--vgm-eof--"
  114. print #2,""
  115. print #2,"# End of export"
  116. end if
  117. '- delay 1 byte (1..16 samples)
  118. if bitwiseand(q0,0x70)=0x70 then
  119. frmc=frmc+bitwiseand(q0,0xF)+1
  120. txou1$=" #("+str$(frmc)+")"
  121. 'print #3,txou1$
  122. end if
  123. '- delay 3 bytes (0..65535 samples)
  124. if q0=0x61 then
  125. q0=readbyte(1)
  126. frmc=frmc+q0
  127. q0=readbyte(1)
  128. frmc=frmc+(q0*256)
  129. txou1$=" #("+str$(frmc)+")"
  130. 'print #3,txou1$
  131. end if
  132. '- 1 ntsc frame delay, 735 samples
  133. if q0=0x62 then
  134. frmc=frmc+735
  135. txou1$=" #("+str$(frmc)+")"
  136. 'print #3,txou1$
  137. end if
  138. '- 1 pal frame delay, 882 samples
  139. if q0=0x63 then
  140. frmc=frmc+882
  141. txou1$=" #("+str$(frmc)+")"
  142. 'print #3,txou1$
  143. end if
  144. '- updates frameout pulses
  145. while frmr<frmc
  146. '- writes 1F in the first line of the first pattern
  147. 'if (patc<1 and patid=0) then
  148. 'ltxcr$=replace$(12,ltxcr$,"1F")
  149. 'ltxcr$=replace$(26,ltxcr$,"1F")
  150. 'ltxcr$=replace$(40,ltxcr$,"1F")
  151. 'end if
  152. '- creates a new pattern
  153. if patc>(patsz-1) then:
  154. print #2," "
  155. patid=patid+1:patc=0
  156. 'txou9$="Pattern "+str$(patid)+"]"
  157. txou9$="Pattern "+right$("00000"+ucase$(hex$(patid)),2)
  158. print #2,txou9$
  159. end if
  160. '- writes a pattern line in each frame
  161. if trg=0 then
  162. print #3,"--frameout-unchanged--"
  163. 'print #2,ltxtm$
  164. ltxcr$=ltxtm$
  165. ltxcr$=replace$(4,ltxcr$, right$("00000"+ucase$(hex$(patc)),2) ) '?????? <-----
  166. print #2,ltxcr$
  167. else
  168. print #3,"--frameout--"
  169. ltxcr$=replace$(4,ltxcr$, right$("00000"+ucase$(hex$(patc)),2) ) '?????? <-----
  170. print #2,ltxcr$
  171. ltxcr$=ltxtm$
  172. trg=0
  173. end if
  174. frmr=frmr+frmi
  175. patc=patc+1
  176. end while
  177. '- token 0xBD gets registers and values to SAA1099 output
  178. if q0=0xBD then
  179. q0=readbyte(1)
  180. '- channel 0, note
  181. if q0=0x08 then
  182. q0=readbyte(1)
  183. note0=int(q0/22.05)
  184. 'freq0= bitwiseor((bitwiseand(freq0,0xF00)),(bitwiseand(q0,0x0FF)))
  185. ltxtm1$=ltxtm$
  186. ltxtm2$=replace$(9,ltxtm1$,nttfrqsaa$(octave0*12+note0))
  187. ltxcr$=replace$(9,ltxcr$,nttfrqsaa$(octave0*12+note0))
  188. ltxcr$=replace$(13,ltxcr$,"00")
  189. print #3,ltxtm2$
  190. trg=1
  191. end if
  192. '- channel 1, note
  193. if q0=0x09 then
  194. q0=readbyte(1)
  195. note1=int(q0/22.05)
  196. 'freq1= bitwiseor ( (bitwiseand(freq1,0xF00)),(bitwiseand(q0,0x0FF)) )
  197. ltxtm1$=ltxtm$
  198. ltxtm2$=replace$(24,ltxtm1$,nttfrqsaa$(octave1*12+note1))
  199. ltxcr$=replace$(24,ltxcr$,nttfrqsaa$(octave1*12+note1))
  200. ltxcr$=replace$(28,ltxcr$,"00")
  201. print #3,ltxtm2$
  202. trg=1
  203. end if
  204. '- channel 2, note
  205. if q0=0x0A then
  206. q0=readbyte(1)
  207. note2=int(q0/22.05)
  208. 'freq2= bitwiseor ( (bitwiseand(freq2,0xF00)),(bitwiseand(q0,0x0FF)) )
  209. ltxtm1$=ltxtm$
  210. ltxtm2$=replace$(39,ltxtm1$,nttfrqsaa$(octave2*12+note2))
  211. ltxcr$=replace$(39,ltxcr$,nttfrqsaa$(octave2*12+note2))
  212. ltxcr$=replace$(43,ltxcr$,"00")
  213. print #3,ltxtm2$
  214. trg=1
  215. end if
  216. '- channel 3, note
  217. if q0=0x0B then
  218. q0=readbyte(1)
  219. note3=int(q0/22.05)
  220. 'freq3= bitwiseor((bitwiseand(freq0,0xF00)),(bitwiseand(q0,0x0FF)))
  221. ltxtm1$=ltxtm$
  222. ltxtm2$=replace$(9+45+30,ltxtm1$,nttfrqsaa$(octave3*12+note3))
  223. ltxcr$=replace$(9+45+30,ltxcr$,nttfrqsaa$(octave3*12+note3))
  224. ltxcr$=replace$(13+45+30,ltxcr$,"01")
  225. print #3,ltxtm2$
  226. trg=1
  227. end if
  228. '- channel 4, note
  229. if q0=0x0C then
  230. q0=readbyte(1)
  231. note4=int(q0/22.05)
  232. 'freq4= bitwiseor ( (bitwiseand(freq1,0xF00)),(bitwiseand(q0,0x0FF)) )
  233. ltxtm1$=ltxtm$
  234. ltxtm2$=replace$(24+45+30,ltxtm1$,nttfrqsaa$(octave4*12+note4))
  235. ltxcr$=replace$(24+45+30,ltxcr$,nttfrqsaa$(octave4*12+note4))
  236. ltxcr$=replace$(28+45+30,ltxcr$,"01")
  237. print #3,ltxtm2$
  238. trg=1
  239. end if
  240. '- channel 5, note
  241. if q0=0x0D then
  242. q0=readbyte(1)
  243. note5=int(q0/22.05)
  244. 'freq5= bitwiseor ( (bitwiseand(freq2,0xF00)),(bitwiseand(q0,0x0FF)) )
  245. ltxtm1$=ltxtm$
  246. ltxtm2$=replace$(39+45+30,ltxtm1$,nttfrqsaa$(octave5*12+note5))
  247. ltxcr$=replace$(39+45+30,ltxcr$,nttfrqsaa$(octave5*12+note5))
  248. ltxcr$=replace$(43+45+30,ltxcr$,"01")
  249. print #3,ltxtm2$
  250. trg=1
  251. end if
  252. '- channels 0 and 1, octave
  253. if q0=0x10 then
  254. q0=readbyte(1)
  255. octave0=bitwiseand(q0,0x0F)
  256. octave1=bitwiseand(q0,0xF0)/16
  257. freq0= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq0,0x0FF)) )
  258. ltxtm1$=ltxtm$
  259. ltxtm2$=replace$(9,ltxtm1$,nttfrqsaa$(octave0*12+note0))
  260. ltxcr$=replace$(9,ltxcr$,nttfrqsaa$(octave0*12+note0))
  261. ltxcr$=replace$(13,ltxcr$,"00")
  262. ltxtm2$=replace$(24,ltxtm1$,nttfrqsaa$(octave1*12+note1))
  263. ltxcr$=replace$(24,ltxcr$,nttfrqsaa$(octave1*12+note1))
  264. ltxcr$=replace$(28,ltxcr$,"00")
  265. print #3,ltxtm2$
  266. trg=1
  267. end if
  268. '- channels 2 and 3, octave
  269. if q0=0x11 then
  270. q0=readbyte(1)
  271. octave2=bitwiseand(q0,0x0F)
  272. octave3=bitwiseand(q0,0xF0)/16
  273. freq2= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq2,0x0FF)) )
  274. ltxtm1$=ltxtm$
  275. ltxtm2$=replace$(39,ltxtm1$,nttfrqsaa$(octave2*12+note2))
  276. ltxcr$=replace$(39,ltxcr$,nttfrqsaa$(octave2*12+note2))
  277. ltxcr$=replace$(43,ltxcr$,"00")
  278. ltxtm2$=replace$(9+45+30,ltxtm1$,nttfrqsaa$(octave3*12+note3))
  279. ltxcr$=replace$(9+45+30,ltxcr$,nttfrqsaa$(octave3*12+note3))
  280. ltxcr$=replace$(13+45+30,ltxcr$,"01")
  281. print #3,ltxtm2$
  282. trg=1
  283. end if
  284. '- channels 4 and 5, octave
  285. if q0=0x12 then
  286. q0=readbyte(1)
  287. octave4=bitwiseand(q0,0x0F)
  288. octave5=bitwiseand(q0,0xF0)/16
  289. freq2= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq2,0x0FF)) )
  290. ltxtm1$=ltxtm$
  291. ltxtm2$=replace$(24+45+30,ltxtm1$,nttfrqsaa$(octave4*12+note4))
  292. ltxcr$=replace$(24+45+30,ltxcr$,nttfrqsaa$(octave4*12+note4))
  293. ltxcr$=replace$(28+45+30,ltxcr$,"01")
  294. ltxtm2$=replace$(39+45+30,ltxtm1$,nttfrqsaa$(octave5*12+note5))
  295. ltxcr$=replace$(39+45+30,ltxcr$,nttfrqsaa$(octave5*12+note5))
  296. ltxcr$=replace$(43+45+30,ltxcr$,"01")
  297. print #3,ltxtm2$
  298. trg=1
  299. end if
  300. '- channel 0, volume
  301. if q0=0x00 then
  302. q0=readbyte(1)
  303. vol0l= bitwiseand(q0,0xF)
  304. vol0r= bitwiseand(q0,0xF0)/16
  305. vol0=int((vol0l+vol0r)/2)
  306. ltxtm1$=ltxtm$
  307. ltxtm2$=replace$(16,ltxtm1$,ucase$(right$(hex$(0x10+vol0),1)))
  308. ltxcr$=replace$(16,ltxcr$,ucase$(right$(hex$(0x10+vol0),1)))
  309. print #3,ltxtm2$
  310. trg=1
  311. end if
  312. '- channel 1, volume
  313. if q0=0x01 then
  314. q0=readbyte(1)
  315. vol1l= bitwiseand(q0,0xF)
  316. vol1r= bitwiseand(q0,0xF0)/16
  317. vol1=int((vol1l+vol1r)/2)
  318. ltxtm1$=ltxtm$
  319. ltxtm2$=replace$(31,ltxtm1$,ucase$(right$(hex$(0x10+vol1),1)))
  320. ltxcr$=replace$(31,ltxcr$,ucase$(right$(hex$(0x10+vol1),1)))
  321. print #3,ltxtm2$
  322. trg=1
  323. end if
  324. '- channel 2, volume
  325. if q0=0x02 then
  326. q0=readbyte(1)
  327. vol2l= bitwiseand(q0,0xF)
  328. vol2r= bitwiseand(q0,0xF0)/16
  329. vol2=int((vol2l+vol2r)/2)
  330. ltxtm1$=ltxtm$
  331. ltxtm2$=replace$(46,ltxtm1$,ucase$(right$(hex$(0x10+vol2),1)))
  332. ltxcr$=replace$(46,ltxcr$,ucase$(right$(hex$(0x10+vol2),1)))
  333. print #3,ltxtm2$
  334. trg=1
  335. end if
  336. '- channel 3, volume
  337. if q0=0x03 then
  338. q0=readbyte(1)
  339. vol3l= bitwiseand(q0,0xF)
  340. vol3r= bitwiseand(q0,0xF0)/16
  341. vol3=int((vol3l+vol3r)/2)
  342. ltxtm1$=ltxtm$
  343. ltxtm2$=replace$(16+45+30,ltxtm1$,ucase$(right$(hex$(0x10+vol3),1)))
  344. ltxcr$=replace$(16+45+30,ltxcr$,ucase$(right$(hex$(0x10+vol3),1)))
  345. print #3,ltxtm2$
  346. trg=1
  347. end if
  348. '- channel 4, volume
  349. if q0=0x04 then
  350. q0=readbyte(1)
  351. vol4l= bitwiseand(q0,0xF)
  352. vol4r= bitwiseand(q0,0xF0)/16
  353. vol4=int((vol4l+vol4r)/2)
  354. ltxtm1$=ltxtm$
  355. ltxtm2$=replace$(31+45+30,ltxtm1$,ucase$(right$(hex$(0x10+vol4),1)))
  356. ltxcr$=replace$(31+45+30,ltxcr$,ucase$(right$(hex$(0x10+vol4),1)))
  357. print #3,ltxtm2$
  358. trg=1
  359. end if
  360. '- channel 5, volume
  361. if q0=0x05 then
  362. q0=readbyte(1)
  363. vol5l= bitwiseand(q0,0xF)
  364. vol5r= bitwiseand(q0,0xF0)/16
  365. vol5=int((vol5l+vol5r)/2)
  366. ltxtm1$=ltxtm$
  367. ltxtm2$=replace$(46+45+30,ltxtm1$,ucase$(right$(hex$(0x10+vol5),1)))
  368. ltxcr$=replace$(46+45+30,ltxcr$,ucase$(right$(hex$(0x10+vol5),1)))
  369. print #3,ltxtm2$
  370. trg=1
  371. end if
  372. '?????
  373. if q0=6 then
  374. print #3,ltxtm$
  375. end if
  376. '?????
  377. 'if q0=7 then
  378. ' q0=readbyte(1)
  379. ' ltxtm1$=ltxtm$
  380. ' ltxtm2$=left$(ltxtm1$,31)+ right$(bin$(512+q0),8) +right$(ltxtm1$,2)+txou1$
  381. ' print #3,ltxtm2$
  382. ' trg=1
  383. ' end if
  384. end if
  385. if eof(1)<>0 then
  386. veof=1
  387. print #2,""
  388. print #2,"# End of export"
  389. end if
  390. wend
  391. for eeq=0 to patid
  392. txou$="ORDER "+right$(hex$(0x100+eeq),2)+" :"
  393. for eer=0 to 12
  394. txou$=txou$+" "+right$(hex$(0x100+eeq),2)
  395. next
  396. print #2,txou$
  397. next
  398. print #2,""
  399. 'print #2,"ORDER 00 : 00 00 00 00 00 00 00 00 00 00 00 00 00"
  400. 'print #2,"ORDER 01 : 01 01 01 01 01 01 01 01 01 01 01 01 01"
  401. 'print #2,"ORDER 02 : 02 02 02 02 02 02 02 02 02 02 02 02 02"
  402. 'print #2,"ORDER 03 : 03 03 03 03 03 03 03 03 03 03 03 03 03"
  403. 'print #2,"ORDER 04 : 04 04 04 04 04 04 04 04 04 04 04 04 04"
  404. 'print #2,"ORDER 05 : 05 05 05 05 05 05 05 05 05 05 05 05 05"
  405. 'print #2,"ORDER 06 : 06 06 06 06 06 06 06 06 06 06 06 06 06"
  406. 'print #2,"ORDER 07 : 07 07 07 07 07 07 07 07 07 07 07 07 07"
  407. 'print #2,"ORDER 08 : 08 08 08 08 08 08 08 08 08 08 08 08 08"
  408. 'print #2,"ORDER 09 : 09 09 09 09 09 09 09 09 09 09 09 09 09"
  409. 'print #2,"ORDER 0A : 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A"
  410. 'print #2,"ORDER 0B : 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B"
  411. 'print #2,"ORDER 0C : 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C"
  412. 'print #2,"ORDER 0D : 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D"
  413. 'print #2,"ORDER 0E : 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E"
  414. 'print #2,"ORDER 0F : 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F"
  415. 'print #2,""
  416. close #1:close #2:close #3
  417. if debug=0 then:
  418. shell("rm "+fout3$)
  419. end if
  420. 'print #2,"[Module]"
  421. 'print #2,"VortexTrackerII=1"
  422. 'print #2,"Version=3.6"
  423. 'print #2,"Title="
  424. 'print #2,"Author="
  425. 'print #2,"NoteTable=2"
  426. 'print #2,"Speed=1"
  427. 'print #2,hsam$
  428. 'print #2," "
  429. 'print #2,"[Ornament1]":print #2,"L0":print #2," "
  430. 'print #2,"[Sample1]":print #2,"Tne +000_ +00_ F_ L":print #2," "