home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / goattracker_2.65.diz < prev    next >
Text File  |  1996-01-01  |  78KB  |  1,845 lines

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