Damage Tracker Version 1.05 (last QB version)

This is a simple tracker designed for making music of my own format which is
explained below. It is designed around the Turbo Grafx/PCE sound hardware
but could be useful (if someone writes the player) for other systems such as
NES, MSX, SMS, etc.

(actually, I wrote a player for MSX PSG, check the Mecha Taisen on Planet
 Oldskool Plus archive!)

Turbo Grafx sound general info

volume ranges from 0-31, the scale is logarythmic...
I have measured the base to be approximately 1.15 and have reflected this
in the .WAV file generator.

actual frequency = 3.58Mhz / ((period+1) * 32)
frame = 1/60th second

music files are based on command bytes, here are the commands:

 0-29 = set a variable, the following byte is the value to write
       variables are as follows:
       0-4   main volume (ends attack, begins initial decay)
       5-9   attack rate (value is divided by two and added to the actual
                         volume every frame)
       10-14 decay1 (value is divided by 64 and subtracted every frame)
       15-19 decay2 (value is divided by 256 and subtracted every frame)
       20-24 level volume (ends initial decay, begins secondary decay)
       25-29 release rate (after key off, divided by 64 and subtracted)
 32+x  stops reading music data until the next frame
       x ranges from 0-31 and specifies additional frames to wait
 64+x  key on / key off
       bit 0 specifies the event (0=key off 1=key on)
       bits 1-3 contain the number of the sound channel (0-4)
 96+x  vibrato on/off
       bits 0-2 contain the number of the sound channel (0-4)
       bit 4 specifies vibrato on or off (set=on clear=off)
 128+x sets the period of a sound channel
       bits 0-1 contain the 2 highest bits of the period
       bits 2-4 contain the number of the sound channel (0-4)
       the following byte contains the 8 low bits of the period
 160+x sets panning
       bits 0-2 contain the number of the sound channel (0-4)
       the following byte contains volume for left channel (bits 4-7)
       and the volume for right channel (bits 0-3)
       (note that generating a .WAV from the tracker uses only the top
       three bits of each nibble while the PCE obviously uses all of them)

Using the tracker:

starting it with a filename ( dt sonic.dt ) will open the file
a nonexistant filename will open a new empty file

press F1 for key summary

Q quit
L load
PGUP/PGDN scroll command window up/down 10
N switch to notes window
S save as
P append command to end of file
W write .WAV file
A/Z scroll the notes window up/down
F/V increase/decrease the number of frames worth of data shown in one line in
    the notes window
I insert command
T set wave patterns for each channel
        0 = square wave
        1 = sine wave
        2 =       /       /       /
                /  |    /  |    /  |
              /    |  /    |  /    |
            /      |/      |/      |

        3 =       /|      /|      /|
               /   |   /   |   /   |
             /     | /     | /     |
            /      |/      |/      |
        4 = _______
                   |
                   |___________
                               |
                               |______

        5 =                  _______
                           /       |
                 _______/          |
              /                    |
           /                       |

D delete command(s)
  enter 'y' to delete one command
  enter 'b' to delete a block of commands

F2 summary

E extend by 1 second (adds 1 second worth of waits on the end)
M modify channel (for commands 0-29)
C copy commands
X modify value  
space bar - paste commands
O obliterate (forget the whole file)
^ combine 'wait' commands in order to reduce file size

Notes window F1 summary

N switch to command window
K insert a Key On
O insert a Key Off
C clear all key on/offs for that channel and frame
Q quit
A/Z scroll up/down
P set pitch

email: damage_x@hyakushiki.net
http://www.hyakushiki.net/
