home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / goattracker_2.67.zip / readme.txt < prev    next >
Text File  |  2008-05-16  |  79KB  |  1,829 lines

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