home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / goattracker_2.71.zip / readme.txt < prev    next >
Text File  |  2010-10-21  |  81KB  |  1,864 lines

  1. GoatTracker v2.71
  2. -----------------
  3.  
  4. Editor by Lasse ╓÷rni (loorni@gmail.com)
  5. HardSID 4U support by TΘli Sßndor.
  6. Uses reSID engine by Dag Lem.
  7. Uses reSID distortion / nonlinearity by Antti Lankila.
  8. Uses 6510 crossassembler from Exomizer2 beta by Magnus Lind.
  9. Uses the SDL library.
  10. GoatTracker icon by Antonio Vera.
  11. Command quick reference by Simon Bennett.
  12. Patches by Stefan A. Haubenthal, Valerio Cannone and Raine M. Ekman.
  13.  
  14. Distributed under GNU General Public License
  15. (see the file COPYING for details)
  16.  
  17. Covert BitOps homepage:
  18. http://covertbitops.c64.org
  19.  
  20. GoatTracker 2 SourceForge.net page:
  21. http://sourceforge.net/projects/goattracker2
  22.  
  23.  
  24. Table of contents
  25. -----------------
  26.  
  27. 1. General information
  28. 1.1 Warnings
  29. 1.2 Compatibility with v1.xx
  30.  
  31. 2. Using GoatTracker
  32. 2.1 Command line options
  33. 2.2 Hardware support
  34. 2.3 Keyboard commands
  35. 2.3.1 General keys
  36. 2.3.2 Pattern edit mode
  37. 2.3.2.1 Protracker note-entry mode
  38. 2.3.2.2 DMC note-entry mode
  39. 2.3.3 Song edit mode
  40. 2.3.4 Instrument edit mode
  41. 2.3.5 Table edit mode
  42. 2.3.6 Songname edit mode
  43. 2.4 Mouse control
  44.  
  45. 3. Song data
  46. 3.1 Orderlist data
  47. 3.2 Pattern data
  48. 3.3 Instrument data
  49. 3.4 Table data
  50. 3.4.1 Wavetable
  51. 3.4.2 Pulsetable
  52. 3.4.3 Filtertable
  53. 3.4.4 Speedtable
  54. 3.5 Playback details
  55. 3.6 Miscellaneous tips
  56. 3.6.1 Limit-based modulation steps
  57. 3.6.2 Precalculated note-independent "hifi player" portamento/vibrato
  58. 3.7 Multispeed tips
  59.  
  60. 4. Using the included utilities
  61. 4.1 INS2SND2.EXE
  62. 4.2 SNGSPLI2.EXE
  63. 4.3 MOD2SNG.EXE
  64. 4.4 BETACONV.EXE
  65.  
  66. 5. Using the songs outside the editor
  67. 5.1 Playroutine options
  68.  
  69. 6. File/data formats description
  70. 6.1 GoatTracker v2 song (.SNG) format
  71. 6.1.1 Song header
  72. 6.1.2 Song orderlists
  73. 6.1.3 Instruments
  74. 6.1.4 Tables
  75. 6.1.5 Patterns header
  76. 6.1.6 Patterns
  77. 6.2 GoatTracker v2 instrument (.INS) format
  78. 6.3 Sound effect data format
  79.  
  80. 7. Recompiling
  81.  
  82. 8. Version history
  83.  
  84.  
  85. 1. General information
  86. ----------------------
  87.  
  88. This program is a tracker-like C64 music editor running on Win32 or Linux
  89. platforms (using the SDL library, see http://www.libsdl.org)
  90.  
  91. GoatTracker v2 adds more commands and uniform step programming tables for
  92. waveform/arpeggio, pulse effects, and filter effects. It is likely much more
  93. complex to learn & master than v1.xx.
  94.  
  95. Familiarity with tracker programs in general, hexadecimal notation, and the
  96. C64's SID chip are required. Consult the C64 Programmer's Reference Guide
  97. (http://project64.c64.org) or AAY64 (http://www.the-dreams.de/aay.html) for
  98. SID chip reference.
  99.  
  100. For filesize & library compatibility reasons, precompiled binaries exist only
  101. for Win32 platform.
  102.  
  103. 1.1 Warnings
  104. ------------
  105.  
  106. 1. Always look at the end of this file for changes! Sometimes keyboard commands
  107.    change etc.
  108.  
  109. 2. Always save your songs in the .SNG-format with F11 key if you plan to
  110.    continue editing! Packed & relocated songs (PRG/BIN/SID) can not be loaded
  111.    back into the editor.
  112.  
  113. 3. Even the reSID emulation is in some cases quite far from the output of a
  114.    real SID. Especially if filters are in use, consider strongly testing your
  115.    tune on a C64 or on a HardSID card. (Using filters has always been
  116.    complicated because every SID tends to sound different.)
  117.  
  118. 4. The editor will stop playing if:
  119.    - The song restart position is illegal (beyond end of song)
  120.    - The sequence of orderlist commands is incorrect
  121.      * In a sequence of both TRANSPOSE & REPEAT, TRANSPOSE must come first
  122.      * The last thing before a RST-endmark should be a pattern number
  123.    - Gateoff timer value is too high compared to song tempo.
  124.    - The song tries to jump directly onto a table row containing a jump (FF xx),
  125.      either with instrument pointers or 8XY, 9XY, AXY commands.
  126.    - The song tries to execute pattern commands 0XY, 8XY or EXY from the
  127.      wavetable.
  128.    These all are error conditions, and trying to pack/relocate such song should
  129.    give an error message.
  130.  
  131. 5. Using delayed wavetable or no wavechange (0x 00, where x is 0-F) in the
  132.    first step of instrument wavetable is unsupported and may result in missing
  133.    notes.
  134.  
  135. 6. When using a playroutine with unbuffered SID-writes (Standard /w unbuffered
  136.    or Minimal) and encountering ADSR-bugs after packing/relocating, you can try
  137.    either:
  138.    1) Set pulse-startpos to nonzero value in the troublesome instruments and
  139.       change the 1stFrame Wave parameter of some instrument slightly, for
  140.       example from $09 to $0B, to disable a playroutine optimization. The
  141.       idea in this is to make the noteinit routine take more CPU cycles.
  142.    2) Use a playroutine with buffered writes to pack/relocate.
  143.    3) Try hardrestart attack parameter $F for alternative SID register write
  144.       order.
  145.  
  146. 7. From v2.18 onwards, wavetable left side values have changed. Delay can
  147.    now be maximum 16 frames (values $00-$0F), and waveform register values
  148.    $00-$0F (inaudible) have been mapped to table values $E0-$EF. For example,
  149.    testbit + gate would be $E9. You need to manually convert values $08-$0F
  150.    from your old songs!
  151.  
  152. 8. From v2.2 onwards, a new table (speedtable) has been added. The portamento,
  153.    vibrato and funktempo commands use it. Old songs will be converted upon
  154.    loading to use the speedtable. Note the keyboard command SHIFT+RETURN
  155.    to convert the old style parameters.
  156.  
  157. 9. From v2.4 onwards, pulse modulation speed has 1 bit added accuracy, so
  158.    you need to double pulsespeeds when composing new songs. Old songs will
  159.    be converted automatically.
  160.  
  161. 10. From v2.59 onwards, gateoff timer parameter high bit disables hardrestart
  162.    and bit $40 disables gateoff. Old songs & instruments will be converted
  163.    automatically.
  164.  
  165. 11. From v2.62 onwards, realtime calculated portamento/vibrato speeds are
  166.    supported. This is activated by having the high bit ($80) set in the speed-
  167.    table left side. Naturally, this means that very high portamento speeds (>=
  168.    $8000) or vibrato speeds (>= $80) become unavailable, but these should not 
  169.    be very useful anyway.
  170.    
  171. 12. From v2.68 onwards, SID write order has been tweaked for better stability
  172.    regarding badlines. This has the consequence, however, that notes with 
  173.    attack 0 & release 1 may ADSR-bug. In this case, try hardrestart attack 
  174.    parameter $F for alternative SID register write order.
  175.  
  176. 1.2 Compatibility with v1.xx
  177. ----------------------------
  178.  
  179. GoatTracker v2 can load v1.xx songs and instruments, but it saves only in v2
  180. format. Some subtleties (like tricks involving instrument changes) will not
  181. play back exactly like in v1.xx.
  182.  
  183. The only major feature removal is that of the arpeggio command in v2.
  184. Everything that this command does can also be done with wavetables, and the
  185. import feature converts all arpeggio commands to corresponding wavetable
  186. programs.
  187.  
  188.  
  189. 2. Using GoatTracker
  190. --------------------
  191.  
  192. 2.1 Command line options
  193. ------------------------
  194.  
  195. Start Goattracker V2 by typing GOATTRK2 in the command prompt, followed by the
  196. songname to be loaded at startup (optional) and any command line options you
  197. may want. For example "goattrk2 dojo.sng -s1 -e1" to set 1x-speed mode and SID
  198. model 8580 and to load "dojo.sng" on startup.
  199.  
  200. -Axx Set hard restart ADSR parameter in hex. DEFAULT=0F00
  201. -Bxx Set sound buffer length in milliseconds DEFAULT=100
  202. -Cxx Use CatWeasel MK3 PCI SID (0 = off, 1 = on)
  203. -Dxx Pattern row display (0 = decimal, 1 = hexadecimal)
  204. -Exx Set emulated SID model (0 = 6581 1 = 8580) DEFAULT=6581
  205. -Fxx Set custom SID clock cycles per second (0 = use PAL/NTSC default)
  206. -Gxx Set pitch of A-4 in Hz (0 = use default frequencytable, close to 440Hz)
  207. -Hxx Use HardSID (0 = off, 1 = HardSID ID0 2 = HardSID ID1 etc.)
  208. -Ixx Set reSID interpolation (0 = off, 1 = on, 2 = distortion, 3 = distortion & on) DEFAULT=off
  209. -Kxx Note-entry mode (0 = PROTRACKER 1 = DMC) DEFAULT=PROTRK.
  210. -Lxx SID memory location in hex. DEFAULT=D400
  211. -Mxx Set sound mixing rate DEFAULT=44100
  212. -Oxx Set pulse optimization/skipping (0 = off, 1 = on) DEFAULT=on
  213. -Rxx Set realtime command optimization/skipping (0 = off, 1 = on) DEFAULT=on
  214. -Sxx Set speed multiplier (0 for 25Hz, 1 for 1x, 2 for 2x etc.)
  215. -Txx Set HardSID interactive mode sound buffer length in milliseconds
  216.      DEFAULT=20, max.buffering=0
  217. -Uxx Set HardSID playback mode sound buffer length in milliseconds
  218.      DEFAULT=400, max.buffering=0
  219. -Vxx Set finevibrato conversion (0 = off, 1 = on) DEFAULT=on
  220. -Xxx Set window type (0 = window, 1 = fullscreen) DEFAULT=window
  221. -Zxx Set random reSID write delay in cycles (0 = off) DEFAULT=off
  222. -N   Use NTSC timing
  223. -P   Use PAL timing (DEFAULT)
  224. -W   Write emulated sound output to a file SIDAUDIO.RAW
  225. -?   Show command line options
  226. -??  Standalone online help window
  227.  
  228. Try the command line options if there are any problems. For example, if you
  229. experience choppy audio you can increase audio buffering with -B option. SDL
  230. seems to have trouble with some soundcards under Windows; you might want to
  231. try even a 500ms buffer, or tweak the hardware acceleration level of the
  232. soundcard (from Control Panel). Also, reSID interpolation will take remarkably
  233. more CPU time and could cause the sound and/or editing to get choppy.
  234.  
  235. Finevibrato mode is on by default. You can change this behaviour with -V
  236. option. Note that finevibrato mode only affects the conversion of old style
  237. vibrato parameters to speedtable format.
  238.  
  239. Pulse optimization -O determines if pulsetable execution will be skipped when
  240. getting new notes or a new pattern. By default it is on. Be warned that
  241. turning it off will increase the rastertime requirements of packed/relocated
  242. songs greatly!
  243.  
  244. Realtime command optimization -R determines if portamento, vibrato & instrument
  245. vibrato will be skipped on tick 0 of each pattern row. By default it is on, as
  246. this is how tracker programs have operated traditionally. Turning it off makes
  247. the commands sound same regardless of tempo but will increase rastertime use.
  248.  
  249. The hard restart ADSR parameter will especially affect how rapid passages of
  250. notes will sound like. 0000 is probably too hard to be useful, except perhaps
  251. with gateoff timer value 1. 0F00 (default) is a lot softer, and 0F01 adds also
  252. a little bit of release to the gateoff phase for even softer sound. 000F makes
  253. the note start very pronounced.
  254.  
  255. Hard restart parameter with attack at maximum (F) enables the use of an
  256. alternative playroutine, where waveform is written before ADSR. This can give
  257. more reliable note triggering, especially for very fast releases 0 & 1, but 
  258. may change the characteristics of the note's decay & release.
  259.  
  260. 2.2 Hardware support
  261. --------------------
  262.  
  263. HardSID support is available with the /H option (use first HardSID = -H1,
  264. second = -H2 etc., return to emulated output = -H0). You must have the HardSID
  265. drivers installed to use this feature.
  266.  
  267. CatWeasel MK3 PCI SID support is available with -C option (-C1 to turn on).
  268.  
  269. To use the PC64 cable, you need Daniel Illgen's HardSID-DLL-Clone. Available at
  270. http://dawork.synchronus.de/
  271.  
  272. To enable better support of multispeeds and cycle-exact timing on HardSID
  273. (currently Win32 only), download an enhanced HardSID.dll:
  274.  
  275. For HardSID ISA/PCI cards -
  276. http://sourceforge.net/project/showfiles.php?group_id=9266&release_id=61843
  277.  
  278. For HardSID 4U -
  279. http://www.hardsid.com
  280.  
  281. Cycle-exact HardSID buffer length is separately configurable for interactive
  282. mode (-T option) & playback mode (-U option).
  283.  
  284. HardSID interactive mode:
  285. Low latency mode for jamming and accurate GUI display. Interactive mode can
  286. be activated during song/pattern playback by enabling jamming (space key).
  287.  
  288. HardSID playback mode:
  289. High stability mode to avoid interruptions caused by other applications/poor
  290. drivers/weaker CPU. GUI display is less accurate in this mode. Set the -U
  291. parameter to zero to achieve the maximum stability (less accurate GUI).
  292.  
  293. 2.3 Keyboard commands
  294. ---------------------
  295.  
  296. This program is mainly operated on keyboard. For a list of keyboard commands
  297. press F12 (online help) in the tracker or see the table below:
  298.  
  299. NOTE: SHIFT & CTRL are interchangeable in the commands. You can also use [ ]
  300. or ( ) instead of < >.
  301.  
  302. 2.3.1 General keys
  303. ------------------
  304.  
  305. F1        Play from beginning
  306. F2        Play from current pos.
  307. F3        Play one pattern from current pos.
  308. F4        Stop playing & silence all sounds
  309. F5        Go to pattern editor
  310. F6        Go to song editor
  311. F7        Go to instrument/table editor
  312. F8        Go to songname editor
  313. F9        Pack, relocate & save PRG,SID etc.
  314. F10       Load song (Pattern/Song/Songname mode) or instrument (Instrument mode)
  315. F11       Save song (Pattern/Song/Songname mode) or instrument (Instrument mode)
  316. F12       Online help screen. Press F12 again to toggle context mode
  317. SHIFT+F1  Play from beginning /w follow play
  318. SHIFT+F2  Play from current pos. /w follow play
  319. SHIFT+F3  Play one pattern from current pos. /w follow play
  320. SHIFT+F4  Mute current channel
  321. SHIFT+F5  Decrease speed multiplier
  322. SHIFT+F6  Increase speed multiplier
  323. SHIFT+F7  Edit hardrestart ADSR parameter
  324. SHIFT+F8  Switch between 6581 and 8580 SID models
  325. SHIFT+,.  Move song startposition on all channels and restart last playmode
  326. TAB       Cycle between editing modes (forwards)
  327. SHIFT+TAB Cycle between editing modes (backwards)
  328. INS       Insert row (Press INS/DEL on endmark to change pattern/song length)
  329. DEL       Delete row
  330. SHIFT+ESC Optimize musicdata, or clear musicdata & set default pattern length
  331. ESC       Exit program
  332.  
  333. 2.3.2 Pattern edit mode
  334. -----------------------
  335.  
  336. - +         Select instrument
  337. / *         Select octave
  338. < >         Select pattern
  339. BACKQUOTE   Select channel
  340. 0-9 & A-F   Enter parameters
  341. SPACE       Switch between jam/editmode
  342. RETURN      (also CAPSLOCK) Insert keyoff
  343.             Enter table (when cursor is over a table-utilizing command)
  344.             Enter instrument (when cursor is over a nonzero instrument number)
  345. SHIFT+RET.  Insert keyon
  346.             Convert portamento/vibrato/funktempo old style parameter to a
  347.             speedtable entry (when cursor is over the command)
  348.             Go into an empty table entry (when parameter is zero on a
  349.             table-utilizing command)
  350. BACKSPACE   Insert rest
  351. SHIFT+BKSP. Insert rest and clear commands
  352. SHIFT+SPACE Play from cursor position
  353. SHIFT+Q     Transpose halfstep up
  354. SHIFT+A     Transpose halfstep down
  355. SHIFT+W     Transpose octave up
  356. SHIFT+S     Transpose octave down
  357. SHIFT+O     Shrink pattern (divide size by 2)
  358. SHIFT+P     Expand pattern (multiply size by 2)
  359. SHIFT+J     Join pattern with next pattern in orderlist
  360. SHIFT+K     Split pattern from edit position
  361. SHIFT+H     Calculate "hifi" left/right shifted speedtable entry for
  362.             portamento or vibrato
  363. SHIFT+I     Invert selection / whole pattern if no selection
  364. SHIFT+CRSR UP,DOWN Mark pattern
  365. SHIFT+CRSR LEFT,RIGHT Select pattern
  366. SHIFT+L     Mark/unmark entire pattern
  367. SHIFT+M,N   Choose highlighting step size
  368. SHIFT+X,C,V Cut,copy,paste pattern
  369. SHIFT+E,R   Copy,paste commands
  370. SHIFT+Z     Cycle autoadvance-mode
  371.  
  372. For pattern joining to work properly, select the pattern you want to join with
  373. the next from the orderlist first (by pressing RETURN on it). Both joining and
  374. splitting will rearrange pattern numbers (for example if you split pattern 00,
  375. pattern 01 will be created and old patterns 01-xx will be shifted forward in
  376. the pattern order)
  377.  
  378. SHIFT+SPACE will play from the pattern onwards if playback was previously
  379. stopped, but if it is pressed while in pattern play mode, it will stay in
  380. the current pattern.
  381.  
  382. There are 2 modes for note entering:
  383.  
  384. 2.3.2.1 Protracker note-entry mode
  385. ----------------------------------
  386.  
  387. This is the default or activated with command line option /K0. There are two
  388. rows of a piano keyboard:
  389.  
  390.   Lower octave     Higher octave
  391.  S D  G H  K L    2 3  5 6 7  9 0
  392. Z X CV B NM , .  Q W ER T Y UI O P
  393.  
  394. Octave (0-7) is selected with / and * keys on the numeric keypad.
  395.  
  396. In this mode there are 2 different autoadvance-modes (the mode can be seen from
  397. the color of the jam/editmode indicator)
  398.  
  399. GREEN - Advance when entering notes & command-databytes
  400. RED - Do not advance automatically
  401.  
  402. 2.3.2.2 DMC note-entry mode
  403. ---------------------------
  404.  
  405. Activated with command line option /K1, there is one row of piano keyboard
  406.  
  407.  W E  T Y U  O P
  408. A S DF G H JK L
  409.  
  410. and octave of a note (sets default octave at the same time) is changed with
  411. number keys 0-7.
  412.  
  413. In this mode there are 3 different autoadvance-modes:
  414.  
  415. GREEN - Advance when entering notes, octaves or command-databytes
  416. YELLOW - Advance when entering notes or command-databytes, not octaves
  417. RED - Do not advance automatically
  418.  
  419. 2.3.3 Song edit mode
  420. --------------------
  421.  
  422. < >         Select subtune
  423. - +         Insert Transpose down/up command (shown as -/+ in the orderlist)
  424. 0-9 & A-F   Enter pattern numbers
  425. SPACE       Set start position for F2 key
  426. BACKSPACE   Set end position for F2 key
  427. RETURN      Go to pattern
  428. SHIFT+R     Insert Repeat command (shown as "R" in the order-list)
  429. SHIFT+CRSR LEFT/RIGHT Mark orderlist
  430. SHIFT+1,2,3 Swap current channel orderlist with channel 1,2,3
  431. SHIFT+X,C,V Cut,copy,paste channel orderlist
  432. SHIFT+L     Mark/unmark entire orderlist
  433. SHIFT+SPACE Set start position on all channels
  434. SHIFT+RET.  Go to pattern on all channels
  435.  
  436. SHIFT+SPACE or SHIFT+BACKSPACE set the start/end mark on all channels to
  437. the same position. To clear the endmark, press BACKSPACE again on it or
  438. at/before the startmark.
  439.  
  440. 2.3.4 Instrument edit mode
  441. --------------------------
  442.  
  443. < >         Select instrument
  444. - +         Select instrument
  445. / *         Select octave
  446. F7          Go to table editor
  447. 0-9 & A-F   Enter parameters
  448. SPACE       Play test note
  449. SHIFT+SPACE Silence test note
  450. RETURN      Go to table position indicated by wave/pulse/filter/vibratopos.
  451. SHIFT+N     Edit instrument name
  452. SHIFT+S     Smart paste an instrument
  453. SHIFT+U     Unlock/lock table scrolling
  454. SHIFT+X,C,V Cut,copy,paste instrument
  455. SHIFT+DEL   (also SHIFT+BACKSPACE) Delete instrument & tabledata
  456. SHIFT+RET.  Set tablepointer to empty position or convert old style vibrato
  457.             parameter
  458.  
  459. The test note will be played on the channel you last were on in the pattern
  460. editor. To hear filtering as intended, be sure to play it on a channel that has
  461. been selected for filtering in the filter parameters.
  462.  
  463. Note that cut,copy,paste instrument do not touch the tabledata, just for the
  464. case you need it in another instrument. If you want to completely get rid of
  465. an instrument + its associated tabledata, press SHIFT+DEL.
  466.  
  467. If wave/pulse/filter/vibrato param. is zero and you press RETURN over
  468. it, you will move to the first free location in the corresponding table. If
  469. you press SHIFT+RETURN, also the instrument parameter will be set accordingly.
  470.  
  471. If vibrato parameter is nonzero and you press SHIFT+RETURN over it, it will
  472. be interpreted as an old style vibrato parameter (left nybble speed, right
  473. nybble depth) and converted to a speedtable entry.
  474.  
  475. "Smart paste" will convert instrument numbers in all patterns if you "move" an
  476. instrument by cut/pasting it.
  477.  
  478. 2.3.5 Table edit mode
  479. ---------------------
  480.  
  481. < >         Select instrument
  482. - +         Select instrument
  483. / *         Select octave
  484. BACKQUOTE   Select table
  485. F7          Go to instrument editor
  486. 0-9 & A-F   Enter parameters
  487. SPACE       Play test note
  488. SHIFT+SPACE Silence test note
  489. RETURN      Go back to wave/pulse/filterpos. parameter
  490. SHIFT+Q,A   Transpose speedtable portamento speed halfstep up/down
  491. SHIFT+W,S   Transpose speedtable portamento speed octave up/down,
  492.             or multiply/divide pulse/filterspeed by 2
  493. SHIFT+L     Convert <limit,speed> modulation step to <time,speed>
  494. SHIFT+N     Negate speed parameter (pulse/filtertable) or relative note
  495.             (wavetable)
  496. SHIFT+O     Optimize current table (remove unused entries)
  497. SHIFT+R     Convert note between absolute/relative in wavetable
  498. SHIFT+U     Unlock/lock table scrolling
  499.  
  500. If you need to insert rows in the beginning of an instrument's wave/pulse/
  501. filtertable, press SHIFT+INS instead of just INS: this way table pointers
  502. pointing to the table first row will not move.
  503.  
  504. For easier programming of negative modulation speeds in pulse/filtertables, you
  505. can first enter a positive speed positive value ($00-$7F) and then press
  506. SHIFT+N to negate it.
  507.  
  508. Conversion between relative and absolute notes will use the basenote C-0 if
  509. octave is 0, C-1 if octave is 1 and so on.
  510.  
  511. When table scrolling is unlocked, each table maintains its separate view
  512. position. To indicate this mode, a "U" letter is visible in the bottom right
  513. part of the screen. By default table scrolling is locked.
  514.  
  515. 2.3.6 Songname edit mode
  516. ------------------------
  517.  
  518. Use cursor UP/DOWN to move between song, author & copyright strings, and
  519. other keys to edit them.
  520.  
  521. 2.4 Mouse control
  522. -----------------
  523.  
  524. By clicking with the left mouse button, you can select the data to edit.
  525.  
  526. By dragging with middle or right mouse button, you can mark orderlist/pattern/
  527. tabledata.
  528.  
  529. Some values like octave or subtune/pattern numbers can be incremented with
  530. the left mouse button and decremented with the right.
  531.  
  532. By holding the middle/right mouse button in the status bar, a menu becomes
  533. active. Continue to hold and click with left button to select options.
  534.  
  535. In the fileselector, confirm loading or entering a directory by double-
  536. clicking. Doubleclick outside the selector to cancel.
  537.  
  538.  
  539. 3. Song data
  540. ------------
  541.  
  542. 3.1 Orderlist data
  543. ------------------
  544.  
  545. A song can consist of up to 32 subtunes. For each subtune's each channel, there
  546. is an orderlist which determines in what order patterns are to be played. In
  547. addition to pattern numbers, there can be TRANSPOSE & REPEAT commands and
  548. finally there is a RST (RESTART) endmark followed by restart position. The
  549. maximum length of an orderlist is 254 pattern numbers/commands + the endmark.
  550.  
  551. TRANSPOSE is measured in halftones. Transpose up (shown as +X) can be 0-14
  552. halftones and transpose down (shown as -X) can be 1-15. Transpose is
  553. automatically reset only when starting the song, not when looping.
  554.  
  555. A REPEAT command (shown as RX) will repeat the pattern following it 1-16 times.
  556. "Repeat 16 times" is displayed as R0.
  557.  
  558. There are some rules for orderlist command order:
  559.  
  560. - If there are both TRANSPOSE and REPEAT commands before a pattern number,
  561.   TRANSPOSE must come first.
  562.  
  563. - The last thing before the RST-endmark must be a pattern number. If you need
  564.   to reset transpose on song repeat, do it in the beginning of the repeat loop.
  565.  
  566. In case of wrong order, the editor will halt playback. This tells that the
  567. resulting packed/relocated song would play incorrectly.
  568.  
  569. 3.2 Pattern data
  570. ----------------
  571.  
  572. Patterns are single-channel only for flexibility & low memory use. They contain
  573. the actual notes, instrument changes & sound commands. A pattern can have
  574. variable length, up to 128 rows. There can be 208 different patterns in a song.
  575.  
  576. The explanation of a pattern row:
  577.  
  578.  Note name
  579.  |
  580.  | Octave
  581.  | |
  582.  | | Instrument number ($01 - $3F, or $00 for no change)
  583.  | | |
  584.  | | |  Command ($0 - $F)
  585.  | | |  |
  586.  | | |  | Databyte
  587.  | | |  | |
  588.  C-1 00 0 00
  589.  
  590. The highest note available in a pattern is G#7. To reach the top three notes
  591. (A-7 to B-7), you can use transpose.
  592.  
  593. In place of a normal note, there can also be one of these special "notes":
  594.  
  595.  ... Rest
  596.  --- Key off (clear gatebit mask)
  597.  +++ Key on (set gatebit mask)
  598.  
  599. The actual state of the gatebit will be the gatebit mask ANDed with data from
  600. the wavetable. A key on cannot set the gatebit if it was explicitly cleared
  601. at the wavetable.
  602.  
  603. Commands 1XY-4XY and FXY bear some resemblance to Soundtracker/Protracker/
  604. Fasttracker effect commands. However, they are different in some ways, so
  605. read their descriptions! Note that there is no "databyte $00 uses the last
  606. databyte"-action in the commands.
  607.  
  608. Command 0XY: Do nothing. Databyte will always be $00.
  609.  
  610. Command 1XY: Portamento up. XY is an index to a 16-bit speed value in the
  611.              speedtable.
  612.  
  613. Command 2XY: Portamento down. XY is an index to a 16-bit speed value in the
  614.              speedtable.
  615.  
  616. Command 3XY: Toneportamento. Raise or lower pitch until target note has been
  617.              reached. XY is an index to a 16-bit speed value in the
  618.              speedtable, or $00 for "tie-note" effect (move pitch instantly to
  619.              target note)
  620.  
  621. Command 4XY: Vibrato. XY is an index to the speed table, where left side
  622.              determines how long until the direction changes (speed)
  623.              and right side determines the amount of pitch change on each tick
  624.              (depth).
  625.  
  626. Command 5XY: Set attack/decay register to value XY.
  627.  
  628. Command 6XY: Set sustain/release register to value XY.
  629.  
  630. Command 7XY: Set waveform register to value XY. If a wavetable is actively
  631.              changing the channel's waveform at the same time, will be
  632.              ineffective.
  633.  
  634. Command 8XY: Set wavetable pointer. $00 stops wavetable execution.
  635.  
  636. Command 9XY: Set pulsetable pointer. $00 stops pulsetable execution.
  637.  
  638. Command AXY: Set filtertable pointer. $00 stops filtertable execution.
  639.  
  640. Command BXY: Set filter control. X is resonance and Y is channel bitmask.
  641.              $00 turns filter off and also stops filtertable execution.
  642.  
  643. Command CXY: Set filter cutoff to XY. Can be ineffective if the filtertable is
  644.              active and also changing the cutoff.
  645.  
  646. Command DXY: Set mastervolume to Y, if X is $0. If X is not $0, value XY is
  647.              copied to the timing mark location, which is playeraddress+$3F.
  648.  
  649. Command EXY: Funktempo. XY is an index to the speedtable, tempo will alternate
  650.              between left side value and right side value on subsequent pattern
  651.              steps. Sets the funktempo active on all channels, but you can use
  652.              the next command to override this per-channel.
  653.  
  654. Command FXY: Set tempo. Values $03-$7F set tempo on all channels, values $83-
  655.              $FF only on current channel (subtract $80 to get actual tempo).
  656.              Tempos $00-$01 recall the funktempo values set by EXY command.
  657.  
  658. Master volume is by default the maximum ($F), but it is only reset when loading
  659. a new song or clearing songdata in the editor, not every time playback starts.
  660. If you change mastervolume, you have to reset it manually in the beginning of
  661. your song.
  662.  
  663. If the command is not 1XY-4XY, instrument vibrato will be active.
  664.  
  665. Note that the one-shot commands 5XY-FXY allow the previous 1XY-4XY command or
  666. instrument vibrato to continue "underneath" them. In section 3.6 (hints & tips)
  667. there is an example of this.
  668.  
  669. 3.3 Instrument data
  670. -------------------
  671.  
  672. You can use up to 63 different instruments in a song. Each instrument is
  673. defined by 9 parameters:
  674.  
  675. Attack/Decay          $0 is fastest attack or decay, $F is slowest
  676.  
  677. Sustain/Release       Sustain level $0 is silent and $F is the loudest. Release
  678.                       behaves like Attack & Decay (F slowest).
  679.  
  680. Wavetable Pos         Wavetable startposition. Value $00 stops the wavetable
  681.                       execution and is not very useful.
  682.  
  683. Pulsetable Pos        Pulsetable startposition. Value $00 will leave pulse
  684.                       execution untouched.
  685.  
  686. Filtertable Pos       Filtertable startposition. Value $00 will leave filter
  687.                       execution untouched. In most cases it makes sense to have
  688.                       a filter-controlling instrument only on one channel at a
  689.                       time.
  690.  
  691. Vibrato Param         Instrument vibrato parameter. An index to the speedtable,
  692.                       see command 4XY.
  693.  
  694. Vibrato Delay         How many ticks until instrument vibrato starts. Value $00
  695.                       turns instrument vibrato off.
  696.  
  697. HR/Gate Timer         How many ticks before note start note fetch, gateoff and
  698.                       hard restart happen. Can be at most tempo-1. So on tempo 4
  699.                       highest acceptable value is 3. Bitvalue $80 disables hard
  700.                       restart and bitvalue $40 disables gateoff.
  701.  
  702. 1stFrame Wave         Waveform used on init frame of the note, usually $09 (gate
  703.                       + testbit). Values $00, $FE and $FF have special meaning:
  704.                       leave waveform unchanged and additionally set gate off
  705.                       ($FE), gate on ($FF), or gate unchanged ($00).
  706.  
  707. In case of illegal (too high) gateoff timer values, the song playback is
  708. stopped.
  709.  
  710. ADSR settings are crucial to getting any sound at all. If all of them are zero
  711. just a very short "click" will be heard. Here is a diagram to help you
  712. visualize the Attack, Decay, Sustain & Release phases:
  713.  
  714.      V      /\            |<- gatebit reset (key-off) at this point
  715.      O     /  \           |
  716.      L    /    \__________|
  717.      U   /                |\
  718.      M  /                 | \
  719.      E /                  |  \
  720. TIME ---------------------------->
  721.          A   D      S       R
  722.  
  723. Some ADSR examples:
  724.  
  725.   A/D 09 Will produce a sound that starts from full volume right away and fades
  726.   S/R 00 to silence automatically. By increasing the Decay value, the fade will
  727.          last longer.
  728.  
  729.   A/D 00 A sound that goes very fast from full volume to sustain level 8.
  730.   S/R 8A If you increase the Decay value, it will go to the sustain level
  731.          slower. After key-off, starts fading out with speed A.
  732.  
  733.   A/D CC A sound that rises slowly to maximum volume, then decays slowly to the
  734.   S/R AF sustain level A and after key-off, fades out to silence very slowly.
  735.  
  736. Instrument legato works as following: When HR/Gate Timer parameter has bit $40
  737. set, no hard restart or gateoff will be performed. When 1st Frame Wave is also
  738. $00, no 1st frame waveform will be set and gate flag is untouched. However wave/
  739. pulse/filterpointers and ADSR are initialized normally. You can also use this in
  740. conjunction with command 8XY to set another wavetable pointer for the note.
  741.  
  742. 3.4 Table data
  743. --------------
  744.  
  745. Tables control the execution of instruments' waveform/arpeggio changes, pulse
  746. modulation, and filter modulation. All the tables are controlled by the left
  747. side bytes, while the right side byte specifies additional parameters.
  748.  
  749. Note that you should never jump directly onto a table jump command (FF) either
  750. with instrument parameters or pattern commands 8XY, 9XY, AXY. Otherwise,
  751. results are undefined.
  752.  
  753. 3.4.1 Wavetable
  754. ---------------
  755.  
  756. Wavetable left side:   00    Leave waveform unchanged
  757.                        01-0F Delay this step by 1-15 frames
  758.                        10-DF Waveform values
  759.                        E0-EF Inaudible waveform values $00-$0F
  760.                        F0-FE Execute command 0XY-EXY. Right side is parameter.
  761.                        FF    Jump. Right side tells position ($00 = stop)
  762.  
  763. Wavetable right side:  00-5F Relative notes
  764.                        60-7F Negative relative notes (lower pitch)
  765.                        80    Keep frequency unchanged
  766.                        81-DF Absolute notes C#0 - B-7
  767.  
  768. Short explanation of waveform bitvalues:
  769. 01 = Gatebit. When on, initiates attack/decay/sustain phase. When off,
  770.      initiates the release phase.
  771. 02 = Synchronize. Creates weird effects using output of another channel
  772. 04 = Ring modulation. Creates weird effects using output of another channel.
  773.      Most effective with the triangle waveform.
  774. 08 = Testbit. Silences sound and resets the oscillator.
  775. 10 = Triangle waveform.
  776. 20 = Sawtooth waveform.
  777. 40 = Pulse waveform.
  778. 80 = Noise waveform.
  779.  
  780. All waveforms except noise can be combined (for example triangle+pulse), but
  781. the effect will be different on 6581 and 8580 SID chips, so use caution.
  782.  
  783. The way how the channels work with synchronize/ringmod:
  784. - When used on channel 1, channel 3's output modulates the sound.
  785. - When used on channel 2, channel 1's output modulates the sound.
  786. - When used on channel 3, channel 2's output modulates the sound.
  787.  
  788. Wavetable delay or no wavechange should not be used in the first step of
  789. instrument wavetable. Otherwise, missing notes may be caused. On the other
  790. hand, if you use 8XY command to jump into a wavetable program, those are
  791. allowed.
  792.  
  793. Using wavetable delay or a wavetable step with no frequency change allows
  794. realtime commands & instrument vibrato to be executed together with wave-
  795. table. Be warned that this has the potential for large rastertime usage!
  796.  
  797. You can execute pattern commands from the wavetable. Right side
  798. is the command parameter. Note that commands 0XY (do nothing), 8XY (set
  799. wavetable pointer) and EXY (funktempo) are illegal and should not be used.
  800. When executing a command, no wave/note will be changed on the same frame.
  801.  
  802. Some examples of wave tables (all examples start on table step 1)
  803.  
  804.   01: 21 00 Sawtooth waveform on note's original pitch.
  805.   02: FF 00
  806.  
  807.   01: 41 00 A flute sound with pulse on the first tick and triangle on all
  808.   02: 11 00 the rest.
  809.   03: FF 00
  810.  
  811.   01: 41 01 A "koto" sound that is one halfstep higher on the first tick and
  812.   02: 40 00 on original pitch the next. Gatebit is also cleared on the second
  813.   03: FF 00 tick.
  814.  
  815.   01: 81 D0 A snaredrum sound, using all absolute notes so it does not depend
  816.   02: 41 AA on which note it's played. Use pulsewidth 800 for best result.
  817.   03: 41 A4
  818.   04: 80 D4
  819.   05: 80 D1
  820.   06: FF 00
  821.  
  822.   01: 81 DF A pulse sound on original pitch, preceded with a short noise (like
  823.   02: 41 00 a hi-hat or something) that has always an absolute pitch of B-7.
  824.   03: FF 00
  825.  
  826.   01: 41 00 A 4-note looping arpeggio sound with pulse waveform. Note that
  827.   02: 00 04 waveform does not change in the looping part.
  828.   03: 00 07
  829.   04: 00 0C
  830.   05: 00 00
  831.   06: FF 02
  832.  
  833.   01: 21 00 A delayed minor chord arpeggio with sawtooth waveform. Each step
  834.   02: 02 03 takes 3 ticks.
  835.   03: 02 07
  836.   04: 02 00
  837.   05: FF 02
  838.  
  839.   01: 41 00 Use pulse first, but then switch between pulse & triangle every 5
  840.   02: 03 80 ticks while frequency remains unchanged (allowing for vibrato &
  841.   03: 11 80 slides).
  842.   04: 03 80
  843.   05: 41 80
  844.   06: FF 02
  845.  
  846.   01: 81 CF Short noise in the beginning, sawtooth, after a short delay change
  847.   02: 21 00 sustain/release (via pattern command 6XY) to $2A.
  848.   03: 08 00
  849.   04: F6 2A
  850.   05: FF 00
  851.  
  852.  
  853. 3.4.2 Pulsetable
  854. ----------------
  855.  
  856. Pulsetable left side:  01-7F Pulse modulation step. Left side indicates time
  857.                              and right side the speed (signed 8-bit value).
  858.                        8X-FX Set pulse width. X is the high 4 bits, right
  859.                              side tells the 8 low bits.
  860.                        FF    Jump. Right side tells position ($00 = stop)
  861.  
  862. Some examples of pulse tables (all examples start on table step 1)
  863.  
  864.   01: 88 00 Set pulse value $800 (middle)
  865.   02: FF 00 Stop pulse execution
  866.  
  867.   01: 80 10 Set pulse value $010 (very thin)
  868.   02: 20 40 For 32 ticks, increase pulse with speed $0040 (64)
  869.   03: 40 E0 For 64 ticks, decrease pulse with speed $FFE0 (-32)
  870.   04: 40 20 For 64 ticks, increase pulse with speed $0020 (32)
  871.   05: FF 03 Jump back to step 03 for a nice loop
  872.  
  873. 3.4.3 Filtertable
  874. -----------------
  875.  
  876. Filtertable left side: 00    Set cutoff, indicated by right side
  877.                        01-7F Filter modulation step. Left side indicates time
  878.                              and right side the speed (signed 8-bit value)
  879.                        80-F0 Set filter parameters. Left side high nybble
  880.                              tells the passband ($90 = lowpass, $A0 = bandpass
  881.                              etc.) and right side tells resonance/channel
  882.                              bitmask, as in command BXY.
  883.                        FF    Jump. Right side tells position ($00 = stop)
  884.  
  885. If "Set filter parameters" is followed by "Set cutoff" directly below, both
  886. will be executed on the same frame.
  887.  
  888. Some examples of filter tables (all examples start on table step 1)
  889.  
  890.   01: 90 F1 Set lowpass, resonance F, channel bitmask 1 (filter channel 1 only)
  891.   02: 00 40 Set cutoff to $40
  892.   03: FF 00 Stop filter execution
  893.  
  894.   01: 80 00 No passband selected, resonance 0, bitmask 0 (no filtered channels)
  895.   02: FF 00 Stop filter execution
  896.  
  897.   01: A0 87 Set bandpass, resonance 8, channel bitmask 7 (filter all channels)
  898.   02: 00 00 Set cutoff to $00
  899.   03: 7F 01 Increase cutoff with speed $01 for 127 ticks
  900.   04: 7F 01 Continue cutoff increase
  901.   05: 7F FF Then decrease back to starting position (speed $FF = -1)...
  902.   06: 7F FF
  903.   07: FF 03 ...and loop back to step 03
  904.  
  905.   01: C0 F2 Set highpass, resonance F, channel bitmask 2 (filter channel 2)
  906.   02: 00 F0 Set cutoff to $F0
  907.   03: 90 F2 On the next frame, change to lowpass...
  908.   04: 00 50 ...and set cutoff $50
  909.   05: FF 00 Stop filter execution
  910.  
  911. Note that the second example could also be achieved simply with pattern command
  912. B00 (set filter control, and stop filter execution, because parameter was $00)
  913.  
  914. 3.4.4 Speedtable
  915. ----------------
  916.  
  917. The speedtable is shared by vibrato, portamento and funktempo. No jump commands
  918. exist.
  919.  
  920. For vibrato:          XX YY Left side tells how long until vibrato direction
  921.                             changes (speed), right side is the value added to
  922.                             pitch each tick (depth).
  923.  
  924. For portamento:       XX YY A 16-bit value added to pitch each tick. Left side
  925.                             is the MSB and the right side the LSB.
  926.  
  927. For funktempo:        XX YY Two 8-bit tempo values that are alternated on each
  928.                             pattern row, starting from the left side.
  929.  
  930. For both vibrato and portamento, if XX has the high bit ($80) set, note 
  931. independent vibrato depth / portamento speed calculation is enabled, and YY
  932. specifies the divisor (higher value -> lower result and more rastertime taken).
  933.  
  934. Vibrato examples:
  935.  
  936.   01: 03 40 Vibrato with speed $03 and depth $40. Corresponds to old vibrato
  937.             parameter $34
  938.   01: 05 04 Speed $05 and depth $04. Slow shallow vibrato, suitable for bass
  939.             notes. Not possible to achieve with old parameters.
  940.   01: 83 04 Speed $03, note-independent depth enabled, depth divisor 4 right-
  941.             shifts (division by 16).
  942.  
  943. Portamento examples:
  944.  
  945.   01: 00 20 Portamento with speed $0020, corresponds to old parameter $08
  946.             (4 * $08 = $0020).
  947.   01: 01 00 Portamento with speed $0100, corresponds to old parameter $40
  948.             (4 * $40 = $0100).
  949.   01: 4F FF Portamento with speed $4fff, loops the pitch highbyte very fast
  950.             so that a SEUCK-like "space" effect is heard. Not possible to
  951.             achieve with old parameters.
  952.   01: 80 01 Note-independent speed enabled, speed divisor 1 rightshift
  953.             (division by 2).
  954.  
  955. Funktempo examples:
  956.  
  957.   01: 09 06 Play tempo $09 on even pattern steps and $06 on odd steps,
  958.             corresponds to old parameter $96.
  959.  
  960.   01: 24 18 The same funktempo adjusted for 4x-multispeed. Not possible to
  961.             achieve with old parameters.
  962.  
  963. Note that you can enter old style vibrato parameters, portamento speeds and
  964. funktempo to patterns & instruments, and when cursor is over the parameter,
  965. press SHIFT+RETURN to create a new speedtable entry corresponding to that
  966. parameter. The parameter will now be overwritten by a speedtable pointer.
  967.  
  968.  
  969. 3.5 Playback details
  970. --------------------
  971.  
  972. Each pattern row is divided into as many 50Hz/60Hz "ticks" as the tempo
  973. indicates. Some ticks are reserved for special actions, and to conserve raster-
  974. time, certain realtime effects/commands (pulse, vibrato, portamento) are
  975. skipped at the same time. Let's assume a tempo of 6 and gateoff timer value 2
  976. and look at what happens on each tick:
  977.  
  978. Tick    Actions
  979. 0       - Initialization of new notes (no audible sound yet)
  980.         - Orderlist advance if necessary
  981.         - Pulsetable execution only if no orderlist advance
  982.         - Wavetable execution
  983.         - "One-shot" commands 5XY-FXY
  984.  
  985. 1       - New notes become audible
  986.         - Pulsetable execution
  987.         - Wavetable or realtime pattern commands 1XY-4XY
  988.  
  989. 2,3     - Pulsetable execution
  990.         - Wavetable or realtime pattern commands 1XY-4XY
  991.  
  992. 4       - New notes fetched from the pattern
  993.         - Gateoff and hard restart for new notes
  994.           (2 ticks before first frame, as gateoff timer indicates)
  995.         - No pulsetable execution
  996.         - Wavetable or realtime pattern commands 1XY-4XY
  997.  
  998. 5       - Pulsetable execution
  999.         - Wavetable or realtime pattern commands 1XY-4XY
  1000.  
  1001. Filtertable is executed on each tick regardless of what the channels are doing.
  1002. Wavetable is never skipped, so arpeggios/drumsounds should always play OK.
  1003.  
  1004. With the commandline parameter /O0 (or by clicking the "PO" text on the status
  1005. bar) you can disable pulse skipping. This leads to increased rastertime use but
  1006. can be good for example with tempo 3 tunes.
  1007.  
  1008. Likewise, with the commandline parameter /R0 (or by clicking the "RO" text on
  1009. the status bar) you can disable realtime pattern command skipping on tick 0.
  1010.  
  1011. 3.6 Miscellaneous tips
  1012. ----------------------
  1013.  
  1014. - Patterns will take less memory the less there are command changes. When the
  1015.   song is packed/relocated, for example a long vibrato or portamento command
  1016.   needs to be stored only once as long as the parameter stays the same on
  1017.   subsequent pattern rows.
  1018.  
  1019. - Using instrument vibrato can make 4XY commands unnecessary and save even
  1020.   more memory. Use realtime calculated note-independent speed (see speedtable
  1021.   section) if you want the vibrato to have the same magnitude regardless of 
  1022.   the note.
  1023.  
  1024. - In the instrument parameters, there is no option to stop pulse execution
  1025.   directly. So if you have for example a sawtooth instrument, there might be
  1026.   an "unnecessary" pulsemodulation going on underneath and wasting rastertime.
  1027.   There are two ways you can stop this:
  1028.   1) Make a short pulseprogram like this and use it in the instrument:
  1029.      01: 80 00 Set pulse $000
  1030.      02: FF 00 Stop pulse execution
  1031.   2) Use pattern command 900 to stop pulse execution
  1032.  
  1033. - If you have a realtime command (vibrato/portamento), you can put "one-shot"
  1034.   commands 5XY-FXY inbetween and the realtime command will be unaffected. An
  1035.   example:
  1036.  
  1037.   C-4 01000
  1038.   --- 00401 Begin vibrato with speedtable index $01
  1039.   --- 00401
  1040.   --- 00401
  1041.   --- 0065A Set sustain/release to $5A. Vibrato executes also on this step!
  1042.   --- 00401 Continue vibrato normally
  1043.   --- 00401
  1044.  
  1045.   However, the vibrato would stop immediately if command 0 was encountered.
  1046.  
  1047. - Normally tempo 3 is the fastest you can use. However, by using the funktempo
  1048.   command you can get tempo 2. To do this, create a following speedtable entry:
  1049.   02 02, and point your funktempo command to it. You also need to use gateoff
  1050.   timer 1 in all instruments and disable the pulse-optimization skipping.
  1051.  
  1052. - For very optimized songdata & player you can refrain from using any pattern
  1053.   commands and rely on the instruments' step-programming. Even in this case, you
  1054.   can set song startup default tempo with the Attack/Decay parameter of the last
  1055.   instrument (63), if you otherwise leave this instrument unused.
  1056.  
  1057. 3.6.1 Limit-based modulation steps
  1058. ----------------------------------
  1059.  
  1060. You can enter pulse/filter modulation steps in limit-based format, and convert
  1061. them to time-based with SHIFT+L. For example, you could enter the following in
  1062. the pulsetable:
  1063.  
  1064.   01: 84 00 Set initial pulse to $400
  1065.   02: C0 10 Modulate pulse to $C00 with speed $0010
  1066.   03: 40 10 Modulate pulse back to $400 with speed $0010
  1067.  
  1068. Now position the cursor on step 02 and press SHIFT+L twice, to convert both of
  1069. the modulation steps to usual time-based steps. If necessary, the steps will
  1070. be expanded to several (if the resulting time parameter is over $7F.)
  1071.  
  1072. Remember that the player only understands time-based steps and you always have
  1073. to convert limit-based steps before they play correctly!
  1074.  
  1075. 3.6.2 Precalculated note-independent "hifi player" portamento/vibrato
  1076. ---------------------------------------------------------------------
  1077.  
  1078. From v2.62 onwards, GoatTracker actually supports realtime calculated note 
  1079. independent portamento and vibrato speeds, see speedtable section for this. 
  1080. However, this makes the player bigger and much slower. You can still also use 
  1081. the old method of manually precalculating needed note-independent speeds with 
  1082. the SHIFT+H function, which this section is about.
  1083.  
  1084. The idea is to take the frequency difference between 2 adjacent notes in
  1085. the frequency table and manipulate it by bit shifting left (multiply) or
  1086. right (divide).
  1087.  
  1088. To use, you need a portamento or vibrato command in the pattern, and the note
  1089. you wish to base the calculation on on the current pattern step or before it
  1090. (before it only for toneportamento) The amount of shift is determined by the
  1091. command parameter. A number in the left nybble means shift left and right
  1092. nybble right shift. When you press Shift+H while the cursor is on the command,
  1093. a speedtable entry is created, and the parameter is replaced with a speedtable
  1094. index.
  1095.  
  1096. Some examples:
  1097.  
  1098.   C-3 00110 Take the frequency difference between C-3 & C#3 and shift it left
  1099.             1 times (multiply by 2.)
  1100.  
  1101.   E-4 00000
  1102.   ... 00000
  1103.   G-4 00302 Take the frequency difference between E-4 & F-4 and shift it right
  1104.             2 times (divide by 4.)
  1105.  
  1106. 3.7 Multispeed tips
  1107. -------------------
  1108.  
  1109. - When making multispeed songs, remember to multiply your tempos and also the
  1110.   gateoff timer values! For example, gateoff timer is normally 2, but in a 2X-
  1111.   speed tune the same gateoff length would be achieved with value 4.
  1112.  
  1113. - If you want to keep vibrato the same compared to 1X-speed, you must multiply
  1114.   vibrato speed by the speed multiplier, and divide vibrato depth by the
  1115.   multiplier. Remember also to divide portamento and pulse/filter modulation
  1116.   speeds as necessary.
  1117.  
  1118. - When importing a v1.xx multispeed song, you also need to multiply the
  1119.   gateoff timers.
  1120.  
  1121. - In the instruments, using Attack 0 might result in a very silent first row of
  1122.   the wavetable. You could try increasing the attack, or adding one or more
  1123.   rows of E9 00 (testbit+gate) to the beginning of the wavetable.
  1124.  
  1125.  
  1126. 4. Using the included utilities
  1127. -------------------------------
  1128.  
  1129. 4.1 INS2SND2.EXE
  1130. ----------------
  1131.  
  1132. INS2SND2.EXE converts GoatTracker v1.xx or v2 instruments (.INS-files) into
  1133. sound effects, outputting the data as source code or binary.
  1134.  
  1135. Usage: INS2SND <instrumentfile> <sourcecodefile> <options>
  1136. Options:
  1137. -b output in binary
  1138. -c output in CovertScript format (deprecated)
  1139.  
  1140. Default output is C64 assembler (DASM) style source code
  1141.  
  1142. Look at section 6.3 or run the program without parameters to see the
  1143. limitations of the sound effect system.
  1144.  
  1145. 4.2 SNGSPLI2.EXE
  1146. ----------------
  1147.  
  1148. SNGSPLI2.EXE splits the patterns of a GoatTracker v2 song into smaller pieces
  1149. for memory use optimization. It is comfortable to compose with large patterns
  1150. but usually more efficient memory-wise to use small patterns. Remember! Always
  1151. keep the original song because a pattern-splitted song is much harder to edit
  1152. further.
  1153.  
  1154. Usage: SNGSPLI2 <source> <destination> [target len]
  1155.  
  1156. For example, if a pattern is 64 rows long and the target length is 16, it will
  1157. be split into 4 pieces. A pattern that falls below 2 x target length, will not
  1158. be split at all.
  1159.  
  1160. 4.3 MOD2SNG.EXE
  1161. ---------------
  1162.  
  1163. Dedicated exclusively to T.M.R, this program converts the pattern & orderlist
  1164. data of 4-channel, 31-instrument MOD-files into GoatTracker .SNG files. You
  1165. must choose one channel to leave out, and obviously instruments are not
  1166. converted, except for their names. You can also specify a transpose in
  1167. halfsteps.
  1168.  
  1169. Usage: MOD2SNG <mod> <sng> [channel] [transpose]
  1170.        [channel] is the channel to leave out (1-4), default 4
  1171.        [transpose] is the halfstep transpose added to notes, default 0
  1172.  
  1173. 4.4 BETACONV.EXE
  1174. ----------------
  1175.  
  1176. Converts GT v2 beta songs to new format used by GT v2 RC1 onwards. Old format
  1177. had 47 instruments max. and new has 63 max. Additionally, depending on what
  1178. beta version you used, you can choose to halve vibrato depths and pulse speeds
  1179. to make them play correct in the current version. Warning: the conversion is
  1180. irreversible, so have backups if you overwrite the old versions.
  1181.  
  1182. Usage: BETACONV <source> <destination> [vibdepth] [pulse]
  1183.        [vibdepth] decides whether to halve vibdepth (1=yes 0=no), default 0
  1184.        [pulse] decides whether to halve pulse speed (1=yes 0=no), default 0
  1185.  
  1186.  
  1187. 5. Using the songs outside the editor
  1188. -------------------------------------
  1189.  
  1190. Press F9 in the editor to enter the packer/relocator. Choose playroutine
  1191. options, startaddress, zeropage address (need 2 consecutive locations) and file
  1192. format (PRG/BIN/SID), then type the filename.
  1193.  
  1194. If you use patterns longer than 64 rows, there is the possibility that
  1195. relocation fails because of too complex patterns. Each pattern row can be 0-4
  1196. bytes packed, and the total amount of bytes per one pattern may not exceed 256.
  1197.  
  1198. If wave/pulse/filtertables overflow past row 255 without a jump command or there
  1199. are other serious errors, you get a warning screen and have to fix the error.
  1200.  
  1201. The relocator optimizes & removes when saving:
  1202. - Unused patterns
  1203. - Unused instruments
  1204. - Unused table-entries
  1205. - Selfcontained (ie. no jumps to/from outside) duplicate parts of tables
  1206. - Player code not needed in the playback of the song
  1207.  
  1208. Look at /examples/example1.prg - example4.prg to get an idea how much these
  1209. playroutines take rastertime. No promises!
  1210.  
  1211. The basic functions independent of playroutine options are:
  1212.  
  1213. Init music:
  1214.  
  1215.         LDA #subtunenumber       ;Starting from 0
  1216.         JSR startaddress
  1217.  
  1218. Play one frame of music:
  1219.  
  1220.         JSR startaddress+3
  1221.  
  1222. 5.1 Playroutine options
  1223. -----------------------
  1224.  
  1225. BUFFERED SID-WRITES - Instead of writing each SID value as soon as possible,
  1226. waits for the end of the channel's execution on each frame and then writes the
  1227. registers in one go. Improves sound stability but takes more memory & raster-
  1228. time.
  1229.  
  1230. SOUND EFFECT SUPPORT - Adds a sound effect engine for use in games. Implies
  1231. buffered writes. To use, call in the following way:
  1232.  
  1233.         LDA #<effect        ;Start address of sound effect data
  1234.         LDY #>effect
  1235.         LDX #channel        ;0, 7 or 14 for channels 1-3
  1236.         JSR startaddress+6
  1237.  
  1238. The sound effects have a hardcoded priority system based on their start
  1239. addresses. A sound higher up in memory (bigger address) will never be
  1240. interrupted with a sound lower in memory.
  1241.  
  1242. VOLUME CHANGE SUPPORT - Adds a routine in the player's jumptable to change the
  1243. master volume level. To use, call in the following way:
  1244.  
  1245.         LDA #volume        ;0-15
  1246.         JSR startaddress+6 ;(startaddress+9 with sound effect support)
  1247.  
  1248. Note that the master volume command (DXY) also modifies this same location,
  1249. so it will clash if you also change the volume manually.
  1250.  
  1251. STORE AUTHOR-INFO - Writes the "AUTHOR" string from songname editor to the
  1252. location range (startaddress+$20 - startaddress+$3F). Also enables timing mark
  1253. support. A timing mark is a mastervolume command (DXY) with parameter $10-$FF.
  1254. This parameter will be copied into startaddress+$3F when the command is
  1255. encountered in playback.
  1256.  
  1257. USE ZEROPAGE GHOSTREGS - Instead of writing to the SID, a memory range in the
  1258. zeropage is used for holding the SID register data. This can then be copied
  1259. in the main program to the SID, for example to enable the playroutine & music
  1260. data to reside under the I/O area. Implies buffered writes. A reverse copy loop
  1261. should be used after each call to the playroutine:
  1262.  
  1263.         LDX #$18
  1264. copy:   LDA ghostregs,x
  1265.         STA $D400,x
  1266.         DEX
  1267.         BPL copy
  1268.  
  1269. The copy loop can also be unrolled for more speed.
  1270.  
  1271. Note that when you use the alternative hardrestart method & playroutine (hard-
  1272. restart attack parameter F) the copy loop should not be in reverse order but
  1273. should be for each channel: wave, frequency, pulsewidth, and ADSR last.
  1274.  
  1275. If you are using both sound effect support and ghostregisters, there exists
  1276. a possibility of sound errors in the case that a sound effect has finished,
  1277. and the same channel starts a new pulse-waveform note without setting an
  1278. initial pulsewidth value (for example, like in the beginning of Sanxion loader
  1279. tune). This is because the ghostregisters are shared between music & sound
  1280. effect playback, and the sound effect has already overwritten the previous
  1281. pulse width.
  1282.  
  1283. DISABLE OPTIMIZATIONS - The relocator removes saved playroutine code based on
  1284. what effects & commands the song uses, resulting in a smaller playroutine
  1285. accordingly. If you encounter anomalies in the sound (such as ADSR bugs caused
  1286. by unpredictable timing variation) you can try disabling the optimizations.
  1287. Normally this is not necessary, but is included just in case.
  1288.  
  1289.  
  1290. 6. File/data formats description
  1291. --------------------------------
  1292.  
  1293. The sections in the files appear in the sequential order in which they are
  1294. described.
  1295.  
  1296. 6.1 GoatTracker v2 song (.SNG) format
  1297. -------------------------------------
  1298.  
  1299. 6.1.1 Song header
  1300. -----------------
  1301.  
  1302. Offset  Size    Description
  1303. +0      4       Identification string GTS5
  1304. +4      32      Song name, padded with zeros
  1305. +36     32      Author name, padded with zeros
  1306. +68     32      Copyright string, padded with zeros
  1307. +100    byte    Number of subtunes
  1308.  
  1309. 6.1.2 Song orderlists
  1310. ---------------------
  1311.  
  1312. The orderlist structure repeats first for channels 1,2,3 of first subtune,
  1313. then for channels 1,2,3 of second subtune etc., until all subtunes
  1314. have been gone thru.
  1315.  
  1316. Offset  Size    Description
  1317. +0      byte    Length of this channel's orderlist n, not counting restart pos.
  1318. +1      n+1     The orderlist data:
  1319.                 Values $00-$CF are pattern numbers
  1320.                 Values $D0-$DF are repeat commands
  1321.                 Values $E0-$FE are transpose commands
  1322.                 Value $FF is the RST endmark, followed by a byte that indicates
  1323.                 the restart position
  1324.  
  1325. 6.1.3 Instruments
  1326. -----------------
  1327.  
  1328. Offset  Size    Description
  1329. +0      byte    Amount of instruments n
  1330.  
  1331. Then, this structure repeats n times for each instrument. Instrument 0 (the
  1332. empty instrument) is not stored.
  1333.  
  1334. Offset  Size    Description
  1335. +0      byte    Attack/Decay
  1336. +1      byte    Sustain/Release
  1337. +2      byte    Wavepointer
  1338. +3      byte    Pulsepointer
  1339. +4      byte    Filterpointer
  1340. +5      byte    Vibrato param. (speedtable pointer)
  1341. +6      byte    Vibraro delay
  1342. +7      byte    Gateoff timer
  1343. +8      byte    Hard restart/1st frame waveform
  1344. +9      16      Instrument name
  1345.  
  1346. 6.1.4 Tables
  1347. ------------
  1348.  
  1349. This structure repeats for each of the 4 tables (wavetable, pulsetable,
  1350. filtertable, speedtable).
  1351.  
  1352. Offset  Size    Description
  1353. +0      byte    Amount n of rows in the table
  1354. +1      n       Left side of the table
  1355. +1+n    n       Right side of the table
  1356.  
  1357. 6.1.5 Patterns header
  1358. ---------------------
  1359.  
  1360. Offset  Size    Description
  1361. +0      byte    Number of patterns n
  1362.  
  1363. 6.1.6 Patterns
  1364. --------------
  1365.  
  1366. Repeat n times, starting from pattern number 0.
  1367.  
  1368. Offset  Size    Description
  1369. +0      byte    Length of pattern in rows m
  1370. +1      m*4     Groups of 4 bytes for each row of the pattern:
  1371.                 1st byte: Notenumber
  1372.                           Values $60-$BC are the notes C-0 - G#7
  1373.                           Value $BD is rest
  1374.                           Value $BE is keyoff
  1375.                           Value $BF is keyon
  1376.                           Value $FF is pattern end
  1377.                 2nd byte: Instrument number ($00-$3F)
  1378.                 3rd byte: Command ($00-$0F)
  1379.                 4th byte: Command databyte
  1380.  
  1381. 6.2 GoatTracker v2 instrument (.INS) format
  1382. -------------------------------------------
  1383.  
  1384. Offset  Size    Description
  1385. +0      4       Identification string GTI5
  1386. +4      byte    Attack/Decay
  1387. +5      byte    Sustain/Release
  1388. +6      byte    Wavepointer
  1389. +7      byte    Pulsepointer
  1390. +8      byte    Filterpointer
  1391. +9      byte    Vibrato param. (speedtable pointer)
  1392. +10     byte    Vibrato delay
  1393. +11     byte    Gateoff timer
  1394. +12     byte    Hard restart/1st frame waveform
  1395. +13     16      Instrument name
  1396.  
  1397. After the instrument data, this structure repeats for each of the 4 tables
  1398. (wavetable, pulsetable, filtertable, speedtable).
  1399.  
  1400. Offset  Size    Description
  1401. +0      byte    Amount n of rows in the table
  1402. +1      n       Left side of the table
  1403. +1+n    n       Right side of the table
  1404.  
  1405. Note that the tables are a partial snapshot of the current song the instrument
  1406. was saved from, so upon loading they have to be relocated to the current free
  1407. table locations.
  1408.  
  1409. 6.3 Sound effect data format
  1410. ----------------------------
  1411.  
  1412. Offset  Size    Description
  1413. +0      byte    Attack/Decay
  1414. +1      byte    Sustain/Release
  1415. +2      byte    Pulse width. This value has nybbles reversed from what it looks
  1416.                 like in the editor so a middle pulse $800 will be stored as $08,
  1417.                 and the sound effect routine will put this value to both $D402
  1418.                 and $D403 registers.
  1419. +3      ?       Wavetable. Contains note/waveform pairs (different order than
  1420.                 in instrument wavetable), from which the waveform can be
  1421.                 omitted if unchanged, as the value ranges do not overlap:
  1422.                         Value $00 ends the sound effect
  1423.                         Values $01-$81 are waveforms
  1424.                         Values $82-$DF are absolute notes D-0 - B-7
  1425.                 Note that a note cannot be omitted to store only waveform
  1426.                 changes!
  1427.  
  1428. As you can see, the sound effect format is very simplistic. When converting an
  1429. instrument to a sound effect with INS2SND2, following things cause an error
  1430. message:
  1431.  
  1432. - If the resulting sound effect is more than 128 bytes
  1433. - If the instrument's wavetable contains relative notes, absolute notes C-0 or
  1434.   C#0, or waveforms > 129 ($81)
  1435.  
  1436. The instrument's pulsewidth modulation & filter settings will be completely
  1437. discarded.
  1438.  
  1439.  
  1440. 7. Recompiling
  1441. --------------
  1442.  
  1443. To recompile for Win32, you need the MinGW development environment, use the
  1444. file src/makefile.win as makefile.
  1445.  
  1446. To recompile for Linux, use src/makefile.
  1447.  
  1448. In both cases you need the SDL development libraries in addition to the SDL
  1449. runtime, see http://www.libsdl.org.
  1450.  
  1451. Compile first the utilities (datafile & dat2inc) from the src/bme directory,
  1452. and place them to your path.
  1453.  
  1454.  
  1455. 8. Version history
  1456. ------------------
  1457.  
  1458. v2.0Beta  - Original public release
  1459.  
  1460. v2.0      - Fixed crash in DMC-note entry mode.
  1461.           - Fixed v1.xx import pulse conversion, a case where pulse startpos
  1462.             was lower than the pulse low limit was not converted right.
  1463.           - Fixed instrument gatetimer becoming zero (can lead to tempo bugs)
  1464.             when cutting an instrument (SHIFT+X)
  1465.           - Fixed order of SID writes to make editor & C64 playroutine behave
  1466.             as similarly as possible.
  1467.           - Fixed removal of table-entries (when loading an instrument) in
  1468.             case another instrument uses them too.
  1469.           - Fixed toneportamento (3XY) with wavetable delays.
  1470.           - Fixed funktempo in packed/relocated songs.
  1471.           - Fixed behaviour of + & - keys while editing instrument name.
  1472.           - Fixed pattern editor transpose functions.
  1473.           - Added SHIFT+DEL to delete an instrument + its tabledata.
  1474.           - Added SHIFT+INS to insert rows on table first row without having to
  1475.             adjust tablepointers afterwards.
  1476.           - Added SHIFT+W,S for octave transpose.
  1477.           - Added SHIFT+1,2,3 to swap orderlists between channels.
  1478.           - Added SHIFT+BACKSPACE to clear a whole pattern row.
  1479.           - Added optimized playroutines, that will be used if all instruments
  1480.             have the same gateoff timer & 1st wave parameters.
  1481.           - Added duplicate check for v1.xx pulse conversion.
  1482.           - Added BETACONV-utility for conversion from beta format.
  1483.           - Added reSID interpolation option /I.
  1484.           - Added hexadecimal pattern row display option /D.
  1485.           - Added SID memory location parameter /L.
  1486.           - reSID interpolation is on by default.
  1487.           - Changed appearance of pattern special notes (rest, keyoff/on)
  1488.           - Increased amount of instruments to 63 and changed song dataformat.
  1489.           - v1.xx import converts arpeggios to instruments as long as there is
  1490.             room.
  1491.           - Vibrato depth changed back to same as in v1.xx.
  1492.           - Pulse modulation speeds are doubled.
  1493.           - Upon startup, songdata erase, or importing v1.xx data, gatetimer
  1494.             will be set to 2 * multiplier as opposed to just 2.
  1495.           - Optimized size & speed of all playroutines (initialization,
  1496.             checking for new note fetch, pulsetable execution).
  1497.           - Wavetable delay or no-wavechange on first step of instrument is
  1498.             definitely unsupported now! Protection to allow this conflicted
  1499.             with 3XY command.
  1500.  
  1501. v2.01     - Added under-IO gamemusic playroutine.
  1502.  
  1503. v2.02     - Added RETURN when instrument tableparameter (wave/pulse/filter) is
  1504.             0 to get you to the first free table location. SHIFT+RETURN will
  1505.             additionally also set the instrument tableparameter.
  1506.           - Added "set mastervolume"-jump to gamemusic routines.
  1507.           - Improved sound effect handling, when an effect is interrupted by
  1508.             another (less silence between sounds).
  1509.  
  1510. v2.03     - Added execution of realtime commands & instrument vibrato during
  1511.             wavetable delay.
  1512.           - Added wavetable right side value $80 to keep frequency unchanged
  1513.             (as a consequence, the note C-0 will cause the same effect).
  1514.           - Added relocator optimizations: all unnecessary data is stripped
  1515.             when packing/relocating.
  1516.           - Playroutines size-optimized.
  1517.           - Explanation of how different gatetimer values can lead to playback
  1518.             going out of sync (section 3.3).
  1519.           - reSID interpolation is no longer on by default :)
  1520.  
  1521. v2.04     - Added a questionable 25Hz mode (/S0)
  1522.           - Execution of commands on wavetable delay is completely reworked
  1523.             and more consistent now.
  1524.           - Note C-0 is usable again.
  1525.  
  1526. v2.05     - Added instrument legato feature (Hardres/1stwave parameter $00).
  1527.           - ADSR writes moved farther away from wave writes in the standard
  1528.             playroutine noteinit, lessening possibility of ADSR bugs.
  1529.           - Song initialization and pulsetable execution speed/sizeoptimized.
  1530.  
  1531. v2.06     - Packer/relocator tolerates up to 256 bytes long patterns now.
  1532.           - Optimized playroutine sizes.
  1533.  
  1534. v2.07     - Fixed transpose reset with F2/F3 song start (should not happen).
  1535.           - Fixed varying tempo on channels with F2/F3 song start.
  1536.           - Added warning screen to packer/relocator if table execution
  1537.             overflows.
  1538.           - Added writing of PAL/NTSC and 6581/8580 flags according to PSID V2
  1539.             NG specification.
  1540.           - -mwindows added to linker options for no displaying of DOS prompt
  1541.             window (in win32 version).
  1542.  
  1543. v2.08     - Added finevibrato mode (/V command line option).
  1544.           - Optimized playroutine sizes & speed.
  1545.  
  1546. v2.09     - Fixed max.pattern length in Clear Musicdata operation.
  1547.           - Added Minimal playroutine.
  1548.           - First wave value $80 also acts as a proper legato instrument now.
  1549.           - Optimized playroutine sizes & speed.
  1550.           - SID chip type & timing (PAL/NTSC) displayed on top row.
  1551.  
  1552. v2.1      - Added SHIFT+N for negating pulse/filter modulation speeds.
  1553.           - Added no-funktempo & no-octave0 optimizations to playroutines (a
  1554.             total of 8 sub-types for each playroutine).
  1555.           - Maximum speed is 16X now.
  1556.           - Separate song/instrument/packed song directories are remembered
  1557.             during session.
  1558.           - Pathname is displayed in the fileselector.
  1559.           - Filters ** and *.* display all files in the fileselector.
  1560.           - Song entered on commandline will be loaded at startup.
  1561.           - Song filename currently being edited is shown in the titlebar.
  1562.           - Currently edited song filename will be used as default in the
  1563.             "SAVE SONG" and "SAVE MUSIC+PLAYROUTINE" dialogs.
  1564.           - Instrument name will also be used as instrument filename as default
  1565.             in the "SAVE INSTRUMENT" dialog.
  1566.           - UPX used for compression of win32 executables.
  1567.           - Included a short reference of waveform bits (manual only).
  1568.           - Configuration file has clearer structure.
  1569.  
  1570. v2.11     - Added SHIFT+S for smart instrument paste (converts instrument
  1571.             numbers in all patterns, after cut/pasting an instrument).
  1572.           - Added SHIFT+L which allows to write <limit,speed> pulse/filter
  1573.             modulation steps and then convert them to the proper <time,speed>
  1574.             format.
  1575.  
  1576. v2.12     - Playroutine 1 has buffered SID-writes.
  1577.           - Octave 0 is not disabled in routines with sound FX (no matter what
  1578.             the relocator says...)
  1579.  
  1580. v2.13     - Standard playroutine now both in unbuffered and buffered flavors.
  1581.  
  1582. v2.15     - Added SHIFT+I for inverting current pattern selection / whole
  1583.             pattern.
  1584.  
  1585. v2.16     - Fixed octave selection with / * for laptop keyboards.
  1586.           - Empty patterns referenced in the orderlist will be saved when
  1587.             saving a song.
  1588.           - Save dialog will reappear if writing the song/instrument/executable
  1589.             music failed.
  1590.           - Optimized handling of "packed rests" in the playroutines.
  1591.           - Added < > for instrument selection in instrument/table edit modes.
  1592.  
  1593. v2.17     - Fixed initialization of instrument vibrato.
  1594.           - Playroutines size-optimized.
  1595.  
  1596. v2.18     - Wavetable left side values changed. Delay is now $01-$0F and
  1597.             inaudible waveforms (register values $00-$0F) have been mapped to
  1598.             table values $E0-$EF. Old songs using values $08-$0F have to be
  1599.             manually converted!
  1600.  
  1601. v2.2      - Added the speedtable for more precise control of vibrato,
  1602.             portamento and funktempo.
  1603.           - Added SHIFT+O to optimize the speedtable (remove unused entries).
  1604.           - Added SHIFT+R to convert between absolute/relative notes in
  1605.             the wavetable.
  1606.           - Added SHIFT+RETURN in pattern/instrument editor to convert old
  1607.             style portamento, vibrato and funktempo parameters to speedtable
  1608.             entries.
  1609.           - SHIFT+R will paste several effect rows if there is data in pattern
  1610.             copybuffer.
  1611.           - Editing during Follow Play is possible.
  1612.           - Song and instrument format modified for 4 tables. Old 3-table
  1613.             data will be loaded but not saved anymore.
  1614.  
  1615. v2.21     - Fixed NTSC CIA timer value for SID files.
  1616.           - Shift+E will copy several effect rows if pattern has been marked.
  1617.  
  1618. v2.22     - Shift+N will also negate relative wavetable notes.
  1619.           - When converting oldstyle parameters to speedtable entries with
  1620.             SHIFT+RETURN, the speedtable view will shift to the new entry if
  1621.             one was created.
  1622.  
  1623. v2.23     - Fixed SHIFT+INS in wavetable (inserts $E9 $00 now as it should).
  1624.           - Added SHIFT+U to unlock table scrolling.
  1625.           - Added SHIFT+F5/F6 to change speed multiplier.
  1626.  
  1627. v2.24     - Added SHIFT+F7 to edit the hardrestart ADSR parameter.
  1628.           - Added SHIFT+F8 to switch between 6581 and 8580 SID models.
  1629.  
  1630. v2.25     - Added detail to table overflow error message in relocator.
  1631.           - Added stop of playback if a tablepointer gets pointed directly to a
  1632.             jump (would bug in packed/relocated tune).
  1633.           - Added relocator error message for the above case.
  1634.           - Added relocator error message for illegal song restart position.
  1635.           - Not possible to save erroneous packed/relocated songs anymore
  1636.             (now that there is adequate error location).
  1637.           - Added SHIFT+,. to move song startposition on all channels and
  1638.             restart last playmode.
  1639.  
  1640. v2.26     - Fixed relocator complaining of FF parameter in speedtable.
  1641.           - To increase stability, in multispeed mode relocator does not use the
  1642.             "same gatetimer/1st wave" optimization.
  1643.           - Changed Shift+O to optimize the currently edited table, not just
  1644.             speedtable.
  1645.           - Added an option to optimize everything with the SHIFT+ESC clear
  1646.             function. This clears unused patterns, instruments and table-entries.
  1647.  
  1648. v2.27     - Fixed optimize function with different pattern lengths.
  1649.           - Added marking & copy/pasting orderlist data like patterns & tables.
  1650.  
  1651. v2.28     - Added sort of mouse control.
  1652.           - Sound reinitialization when changing multiplier or other parameters
  1653.             is now faster.
  1654.  
  1655. v2.29Beta - Internal reorganization.
  1656.           - New assembler-based relocator that leaves out unused portions of
  1657.             player code.
  1658.           - Instead of choosing a player version, one can choose combinations
  1659.             of player features.
  1660.           - Relocator does not save selfcontained duplicate parts of tables.
  1661.           - Added keys 0-9 & A-Z in the fileselector to move to the
  1662.             corresponding part of the filelist (if found).
  1663.           - Added SHIFT+H to calculate left/right shifted "hifi" speedtable
  1664.             values, according to the frequency of a note.
  1665.  
  1666. v2.3      - Fixed songdata optimize function.
  1667.           - Fixed relocator with no-hardrestart instrument in slot 1.
  1668.           - Fixed relocator handling of effect C (Set cutoff).
  1669.  
  1670. v2.31     - Fixed effect copy/paste.
  1671.           - Added possibility to disable pulseskipping with /O command line
  1672.             option. Warning: causes huge rastertime increase.
  1673.           - Tempo 2 is allowed. See the tips section (3.6) for details.
  1674.  
  1675. v2.32     - Maximum pattern length increased to 128. Do not complain of
  1676.             "pattern too complex" errors :)
  1677.           - Optimized playroutine init in case of only 1 subtune.
  1678.  
  1679. v2.33     - Fixed a bug where relocator was checking pattern 208 (illegal).
  1680.           - Optimized playroutine in case there is no keyoff/keyon used.
  1681.           - Optimized playroutine in case there are no pattern effects used.
  1682.           - Optimized playroutine channel variables in case there is no
  1683.             transpose, repeat, wavedelay and pattern effects.
  1684.           - If not using the last instrument (63), you can control song
  1685.             startup default tempo by using its Attack/Decay parameter.
  1686.  
  1687. v2.34     - Added relocator optimization for using 1 or 2 channels only. To
  1688.             enable, you must use only channels 1 or 1,2 and not be using sound
  1689.             effect support or zeropage ghostregs.
  1690.           - Turning off buffered writes in relocator options works now even
  1691.             if sound effects or zeropage ghostregs are selected (they will be
  1692.             turned off too).
  1693.  
  1694. v2.35     - Auto-creation of speedtable entries will always generate a new
  1695.             entry (except for song loading), duplicate values will be optimized
  1696.             by the relocator.
  1697.           - Pressing SHIFT+RETURN over a speedtable-using pattern command while
  1698.             the parameter is zero, goes to the next empty speedtable entry and
  1699.             sets the command parameter to point to that entry.
  1700.  
  1701. v2.4      - Added one bit of accuracy to pulse modulation speed. A new song-
  1702.             format (identifier GTS4) reflects this, old songs will be converted
  1703.             upon loading.
  1704.           - Added possibility to execute pattern commands from the wavetable.
  1705.  
  1706. v2.41     - Fixed player code assembly errors when using some pattern commands
  1707.             only from the wavetable.
  1708.           - Fixed player code bug with command B when command A is not used.
  1709.           - Fixed SHIFT+O removing table entries pointed to from wavetable
  1710.             pattern commands.
  1711.  
  1712. v2.42     - Fixed frequency table size determination.
  1713.           - Changed behaviour of keyoff in pattern editing changed to use
  1714.             releasenote() like the instrument editor.
  1715.           - Added SHIFT+RETURN when parameter is zero to get you into an empty
  1716.             table entry for 8, 9 and A pattern commands as well.
  1717.           - Added adjustment of table views when changing instrument number
  1718.             in unlocked table scrolling mode.
  1719.           - Added RETURN over nonzero instrument number (in patterns) to go
  1720.             editing that instrument.
  1721.  
  1722. v2.43     - Added duplicate pattern detection/removal to song optimize.
  1723.           - Added pattern shrink/expand (SHIFT+O,P).
  1724.           - Added pattern join/split (SHIFT+J,K).
  1725.  
  1726. v2.44     - Fixed editor playroutine to not execute tick n commands, when a
  1727.             command has already been executed through the wavetable.
  1728.  
  1729. v2.45     - Added possibility to disable realtime pattern command optimization
  1730.             at tick 0 (/Rxx command line option or click the "RO" text on the
  1731.             statusbar) for tempo-independent portamento & vibrato.
  1732.           - To make room on the status bar for the realtime optimization
  1733.             status indicator, finevibrato & pulse optimization indicators have
  1734.             been shortened to "FV" and "PO".
  1735.  
  1736. v2.46     - Added transpose of speedtable portamento speeds (SHIFT+Q,A,W,S)
  1737.             SHIFT+W,S (octave transpose, multiply/divide by 2) also work in
  1738.             pulse & filtertable.
  1739.           - When editing the wavetable, RETURN & SHIFT+RETURN work for wave-
  1740.             table executed commands as in patterns (go to table position
  1741.             pointed by command, create new speedtable entries)
  1742.  
  1743. v2.47     - Added experimental random delay to write of reSID registers, in
  1744.             order to make potential ADSR-bugging on C64 audible. The
  1745.             amount of delay in cycles can be adjusted with /Z command line
  1746.             option.
  1747.           - SHIFT+L in pulsetable creates repeated "set tempo" commands if
  1748.             speed is greater than 127.
  1749.  
  1750. v2.48     - Fixed playroutine to use configurable baseaddress again.
  1751.  
  1752. v2.49     - Added /G command line option, guard 1stwave/gatetimer parameters.
  1753.             When this is on (default), only silent waveforms can be entered
  1754.             as firstwave (only thing that makes sense) and editing gatetimer
  1755.             of one instrument affects all of them, as otherwise bugs in
  1756.             playback result easily. Use /G0 to turn off.
  1757.  
  1758. v2.5      - Fixed "optimize everything" removing the tempo setting in
  1759.             instrument 63.
  1760.           - Fixed default tempo of multispeed tunes in packer/relocator.
  1761.  
  1762. v2.51     - Fixed packing of empty patterns when not using any effects.
  1763.           - Fixed differing gatetimer value in instruments causing playback
  1764.             going out of sync.
  1765.           - /G command line option no longer has to keep gatetimer values the
  1766.             same.
  1767.           - Added high bit of gatetimer value to control whether wavetable
  1768.             execution starts right on the note init frame. If used, will cause
  1769.             significant rastertime increase.
  1770.  
  1771. v2.52     - SHIFT+ENTER in orderlist view takes the next available pattern
  1772.             if pressed on a repeat or transpose command.
  1773.           - Added SHIFT+SPACE in pattern editor to start playback on a specific
  1774.             pattern row.
  1775.  
  1776. v2.53     - Fixed F3 to always play the currently visible patterns.
  1777.           - Added BACKSPACE in the orderlist editor to set playback end position.
  1778.             Only effective when starting playback from position, not beginning.
  1779.  
  1780. v2.54     - Fixed SHIFT+F3.
  1781.           - Changed SHIFT+, . to update the pattern view.
  1782.           - Changed SHIFT+SPACE to remain in pattern playback mode, if it was
  1783.             active.
  1784.  
  1785. v2.55     - Added BACKSPACE in the fileselector to go to the parent dir.
  1786.  
  1787. v2.56     - Song filename cleared on songdata erase.
  1788.           - Added /F to set custom SID clock frequency.
  1789.           - Graphics output routines no longer compare text screen buffer to 
  1790.             previous to find out if it should be updated.
  1791.             
  1792. v2.57     - Added alternative hardrestart method & playroutine that is used when
  1793.             HR attack parameter is at maximum (FF00 or F800 for example) - this 
  1794.             can in theory give better reliability.
  1795.             
  1796. v2.58     - Cleanup, removal of a few questionable features:
  1797.             * Gatetimer high bit to start wavetable immediately
  1798.             * Guard 1stwave parameter
  1799.             
  1800. v2.59     - Songformat version update (GTS5/GTI5)
  1801.           - Gateoff timer parameter bits control now hardrestart disable ($80)
  1802.             & gateoff disable ($40).
  1803.           - 1stFrame Wave can be any from $01-$8F, $00 to leave both waveform
  1804.             & gateflag unchanged, or $FE / $FF to control gateflag but leave
  1805.             waveform unchanged.
  1806.  
  1807. v2.6      - Fixed pattern default length selection display when decrementing
  1808.             from a length of 100 or higher.
  1809.           - Fixed mouse selection of pattern when adjusting an adjacent channel.
  1810.           - Fixed help screen instructions.
  1811.           - Changed resolution to 800x600.
  1812.           - Changed all songname rows to be displayed at the same time.
  1813.           - Changed mouse control to allow pattern column selection even when
  1814.             left mouse button is held down.
  1815.           - Changed speed of PageUp/PageDown scrolling to be faster.
  1816.           - Optimized graphics output.
  1817.           - BME library is no longer needed.
  1818.  
  1819. v2.61     - Added the backquote key (top-left on keyboard) to select channel
  1820.             in pattern edit mode, and to select table in table edit mode. Use 
  1821.             with SHIFT to go backwards.
  1822.           - Added SHIFT+channel number to mute channels in pattern edit mode.
  1823.           
  1824. v2.62     - Added possibility for realtime calculated note independent (hifi)
  1825.             portamento & vibrato. Warning: has potential for huge rastertime
  1826.             increase.
  1827.             
  1828. v2.63     - Fixed note independent portamento & vibrato to use the last note
  1829.             set in wavetable for calculations, instead of the last note in
  1830.             patterndata.
  1831.             
  1832. v2.64     - Fixed paste in table (SHIFT+V) working also without SHIFT pressed.
  1833.  
  1834. v2.65     - Fixed raw keycodes over 511 interpreted as some other keys in the
  1835.             0-511 range.
  1836.  
  1837. v2.66Beta - Initial cycle-exact HardSID support (Win32 only)
  1838.           - Permit running without sound.
  1839.           
  1840. v2.67     - Configurable cycle-exact HardSID buffer length (separate for inter-
  1841.             active and playback mode, see /T and /U command line options)  
  1842.             
  1843. v2.68     - Fixed set tempo -command overwriting frequencytable in 1 or 2
  1844.             channel modes.
  1845.           - Fixed sound uninit crash with multicore processors (?)
  1846.           - SID register write order tweaked to resemble JCH NewPlayer 21.
  1847.           - Unbuffered playroutine optimized & modified to resemble buffered
  1848.             mode timing more.
  1849.           - New reSID-fp engine (with distortion & nonlinearity) from Antti
  1850.             Lankila integrated. Activated with /I command line option parameters
  1851.             2 & 3.
  1852.           - Command quick reference by Simon Bennett included.
  1853.           
  1854. v2.69     - Fixed click bug in reSID audio output.
  1855.           - Newest reSID-fp code integrated.
  1856.           - reSID-fp filter parameters adjustable from the configuration file.
  1857.  
  1858. v2.70     - Hotfix for the new HardSID UPlay/Uno devices from TΘli Sßndor.
  1859.           - Fixed possible crash on some versions of the HardSID dll.
  1860.  
  1861. v2.71     - Added keycode fix patch from Valerio Cannone.
  1862.           - Added fullscreen switch patch from Raine M. Ekman (see /X option)
  1863.           - Added context mode to online help patch from Raine M. Ekman.
  1864.           - Added /G command line option for setting A-4 pitch.