Todays date is 18.05.2013 12:02

-------------------------------------------------------------------------------

                 SID DUZZ' IT V2.1 (update 6) (c) 2013 SHAPE

-------------------------------------------------------------------------------
               Written by Geir Tjelta and Glenn Rune Gallefoss                  
-------------------------------------------------------------------------------

INTRODUCTION:
This Doc file is under construction.  
And might get updated now and then.
-------------------------------------------------------------------------------
SDI is a music tracker system for the Commodore 64.


BACKGROUND:
-------------------------------------------------------------------------------
SID Duzz' It is built on ideas from JCH/Vibrants editor,
Olav Morkrid/Panoramic "Digitalizer" editor and
Geir Tjelta/Shape/Moz(ic)art "SID Systems. And some others.

The name, SID Duzz' It, was invented by us while watching a
terrible TV commercial from America.  It was a screwdriver that
really did it!


HARDWARE COMPATIBILITY:
-------------------------------------------------------------------------------
C64 and C128 in c64 mode.
And it should work on all disk drives/devices that can be connected to these
computers using device number #6 - #30.

Only the drives and cartridges listed below has been tested:

Disk drives:
------------
1541,1541-II and clones (Oceanic ++)
1570,1571 and 1581
CMD FD 2000,CMD FD 4000 and CMD HD.
CMD Ramlink and IDE64.
SD2iec
Netdrive (TFR)


Cartridges:
-----------
The Final Cartridge III:
Works with fastload and fastsave on 1541(II) and 1571.
You will have to use the KILL command before loading/saving from a 1581 or a CMD drive.

Action Replay 6:
Works with fastload and fastsave on 1541(II), 1571 and 1581.

Epyx Fastload:
Works with fastload and fastsave on 1541(II) and 1571.

Retro Replay:
Works with fastload and fastsave on 1541(II), 1571, 1581.
I know CMD FD 4000 work with fastload, but im not sure how reliable fast save is.

The Final Replay with Netdrive works.

The reason we list these cartridges is that their fastload and fastsave 
routines works with the editor.

NOTE
-------------------------------------------------------------------------------
This editor has NO UNDO function. Save you work often to avoid pain.


INPUT
-------------------------------------------------------------------------------
All parameters you change and values you enter in sound editor, sequencer and
tracker are hexidecimal.
Heximal input keys: 0123456789ABCDEF

In Name sound, Load menu, Save/Dump menu & dos command window you
can use most of the keys on the keyboard to enter text.


OVERALL KEYBOARD COMMANDS for SEQUENCER, TRACKER & SOUND EDITOR:
-------------------------------------------------------------------------------
<-              Fast forward play
CBM 1-4         Track on/off
F1              Play from mark (mark made with F2)
F2              Set play mark
F3              Stop/Continue play
F6              Tracker data on/off
F7/F8           Select octave (individual octaves for each track)
=               Play current line (press again to stop)
Z               Play song from current line
RUNSTOP         Sound Editor (Press again to exit)
/               Toggle Sequencer/Tracker & Sound editor edit on same screen
SH L            Load music
CBM S           Dump music
CBM +/-         Next/Previous song
?               Set speed calls
CBM Q           Quantize (0/2) for recording notes
CRSR            Left/Right/Up/Down



When Quantize is 0 you will record notes on every line.
When Quantize is 2 you will record notes on every even line.



KEYBOARD COMMANDS FOR SEQUENCER AND TRACKER:
-------------------------------------------------------------------------------
F5              Toggle Tracker or Sequencer
CBM *           Set speed channels (place cursor on track)
H               Hunt for next unused sequence and replace it.
S/L             Tab jump left/right
V               View player counters/Full screen sequencer
SH CLRHOME      To start of song
SH S            Save Music
SH A            Increase cursor jump
CBM A           Decrease cursor jump
SH C            Copy sequence (whole sequence)
SH V            Paste into sequence (whole sequence)
SH D            Double sequence length
CBM C           Clone sequence and insert on next track line
CBM F           Fill sequence with empty lines (From cursor position)
CBM H           Hunt for next unused sequence - Insert it in the next track line
CBM I           Insert a track line
CBM K           Kill sequence/Unused/Make a sequence ready for use
M               Set start mark (grey background is marked area)
SH M            Set end mark
CBM M           Copy marked area to cursor position
:/[             Set track transpose
;/]             Set sequence number

Active speed channels are highlighted with light grey on the top of the screen.

Clone sequence (CBM+C) makes a copy of the current seqeunce and paste it into
a new sequence number on the next track line.
Hunt unused sequence (H and CBM+H) will search through sequencer memory
for the next available sequence. It will not scan track data to check if
that sequence is already present as a "unused" sequence.

When you use the mark function (M and SH+M) you will
notice that the marked area turns grey, this area can be copied anywhere
within another sequence or inside the same sequence.
The copy marked area (CBM+M) function in the sequencer works as a "EOR" copy.
Copy some sequence data with some empty lines into a sequence, 
now move the cusor down one line and copy again - and you'll see.



KEYBOARD COMMANDS IN SEQUENCER:
-------------------------------------------------------------------------------
F4              Edit/Synth/Record mode (Grey/Blue/Red)
INSTDEL         Delete a line
SH INSTDEL      Insert a line
CLRHOME         Cycle Sequence Top/Middle/Bottom
SPACE           Delete down (depends on cursor jump)
SH SPACE        Delete up (depends on cursor jump)
SH X            Narrow sequence fom cursor pos. (remove every 2nd line)
CBM X           Expand sequnce from cursor pos. (place cursor on a odd line)
CBM RTYU        Set sequencer mark.
CBM 5678        Jump to sequencer mark.
,/.             Jump down/up 16 lines
>/<             Increase/Decrease notes from cursor position.
CBM RETURN      Start playing music from top of current sequence.
SH RETURN       Play and Loop music from top of current sequence.
RETURN          Play song from current line (same as Z)
N               Turn note to tie/normal
SH N            All marked notes turned to normal
CBM N           All marked notes turned to tie
G               Gate on (GAT in sequence)
SH G            Gate off (gat in sequence)

When entering notes in the sequencer you have 
2 octaves present at all times:
------------------------------
    1 2  4 5 6  8 9  + - 
CTRL Q WE R T YU I OP @ * UpArrow

Hold down SHIFT to get tie/attack notes.


When you press F1 to play the song, your F4 mode (grey/blue/red) is saved,
and when you press F3 to stop/pause the song, your saved F4 mode is
restored.

To use the sequence divide or multiply function (SH+X and CBM+X) you have 
to place the cursor on a odd line number (01,03,05..etc). 
Fill up a $1f length sequence with a few notes and you will understand what 
this is used for.

Channel marking (CBM RTYU) is for quick jump to different positions in the song.
Note that the marked positions can easily be corrupted by inserting
track lines infront of the marked position.

When you press Shift+Return to enable the play and Loop function you will
see that a up-arrow is inserted into the clock timer on screen.
Using this function while editing short length sequences in grey mode
is pretty neat. Note that the focus is to play and loop the sequence
your cursor is located in.

Setting gate off with Shift+G in the sequence will make the
instrument start the release cycle using its original release value.
Setting gate on with G in the sequence will make the instrument
start its original attack,deacy and sustain cycles.



TRACKER KEYBOARD COMMANDS:
-------------------------------------------------------------------------------
>               Increase transpose values or sequence values.
<               Increase transpose values or sequence values.
INSTDEL         Delete a track line
SH INSTDEL      Insert a track line
RETURN          Set loop mark for current channel
SH RETURN       Set stop mark for current channel
SH 1-3          Swap tracks (including all sub songs - music must be off)


Marking and copying Tracks:
Dont copy within the marked area and dont copy to a position above the marked
area within the same track. You can copy track data to any of the other channels 
and to subtunes. The marked area is only displayed if the track displayer 
is turned on (F6).
You can only copy tracks when the music is turned off.

Swapping tracks:
When swapping tracks you should be located at the very beginning of the first
tune. All track data is swapped, including sub tunes.
You can only swap tracks when the music is turned off.



SOUND/INSTRUMENT EDITOR KEYBOARD COMMANDS:
-------------------------------------------------------------------------------
N               Name sound/instrument (return to exit)
+/-             Select sound
SH +/-          Select sound with focus on displaying their programs
>/<             Select arpeggio number with focus on the arpeggio data.
SH A            Arpeggio program table
SH F            Filter program table
SH I            Initial volume and Filter channels/Filter speed table
SH P            Pulse program table
SH S            Sound setup table
SH T            Tempo program table
SH V            Vibrato program table
SH W            Waveform program table
M               Mark sound
SH M            Copy sound


RETURN          Put current program line into sound setup
                Only for waveform, pulse, filter and vibrato.
                (Return in tempo table will set default tempo for this song.)
SH RETURN       Delete program from sound setup.
                Only for waveform, pulse, filter and vibrato.
,/.             Jump 4 lines up/down
CLRHOME         Go to current sound's program line (if there's one).
                (For arpeggio it will display current arpeggio at top).
SH CLRHOME      Go to top of program line table
INSTDEL         Delete a program line. (not for sound setup table)
SH INSTDEL      Insert a program line. (not for sound setup table)


You cannot press SH S to save the tune when you are in sound editor mode.
Press Return to exit from Naming the sound.
Instruments $20-$2f are only available through the arpeggio program, you
should only use these instruments when you run out of $00-$1f instruments.
And as explained, they can only be used as arpeggios.
Last instrument selected is set to default instrument for blue synh mode.


LOAD MENUE COMMANDS:
-------------------------------------------------------------------------------
SPACE          Read a new directory into memory
SH SPACE       Go to DOS command screen
*              Display files A-Z
SH *           Display files Z-A
A-Z            Set display path
CTRL 1-0       Select disk drive 11,12,13,14,15,16,17,8,9 and 10.
CRSR           Select music
RETURN         LOAD MUSIC
SH RETURN      CLEAR MEMORY or Load track+sequener data only.
,/.            Jump 8 files up/down
CLRHOME        Top of directory
SH CLRHOME     Bottom of directory
RUNSTOP        Exit

The load menue will immediately access the device you started
the editor from, but only on the first time you enter the load menue.
Load routine has disk error checks in case there are any
problems loading a music.
If you try to access a drive that is turned off you will get
a message saying "disk status error". The same message will pop up if 
you try to read a dir and you have removed the disk.

Clearing memory or loading track+sequencer data can be done
by pressing SHIFT+RETURN:
If you load the file "clear memory..." memory for tracks and sequences
will be cleared - and sound memory will stay intact.
If you load any other file this way - sound memory will stay intact and
memory for track + sequencer will be replaced with the file you selected.


Load menue will only display SDI files. 
All SDI 2.X files are tagged with 'up arrow' at the beginning of the filename.

The dir displayer can only handle 128 SDI files.
A 1541 disk can only handle 144 files, while other drives 
(1581,CMD,IDE64) can handle much more. 



DOS COMMANDS:
-------------------------------------------------------------------------------
The dos command screen can be used to handle files and directories.
Anything you do here is at your own risk. Know what you are doing.
I only reccomend to use the commands listed, it is possible 
to use other commands.

Keyboard        Input text
CRSR            Move cursror around.
CLRHOME         Go to start of command line.
SH CLRHOME      Clear command line.
RETURN          Send disk command.
RunStop         Exit to load menue.
                    

Wildcards are ? and *

The following commands works on all drives:
$                   - Display dir
$a*                 - Display files starting with the letter 'a'
$??a*               - Display files where the 3rd letter is 'a'
S0:FILENAME         - Scratchfile
R0:NEWNAME=OLDNAME  - Rename file
N0:DISKNAME,ID      - Format disk (ID must be 2 letters for 1541 format)
V                   - Validate disk
I                   - Initialize drive
UI                  - Reset drive (returns dos version number)


The following commands works on CMD drives:
MD:DIRNAME          - Make dir
RD:DIRNAME          - Remove dir
CD:DIRNAME          - Go to dir
CD:/                - Go down one dir level


The following commands works on the IDE64:
MD:DIRNAME          - Make dir
RD:DIRNAME          - Remove dir
CD:DIRNAME          - Change dir
/DIRNAME            - Change dir
/                   - Go down one dir level + autodisplay dir
CD:..               - Go down one dir level
/..                 - Go down one dir level (root dir?) + autodisplay dir
T-RA                - Display date and time

Examples:
Want to list all your .d64 files on your sd2iec ?
type: "$*.d64" and hit return

Want to list all your dumped files on your sd2iec ?
type "$ *" and hit return


The two quotation marks in the sentences above should not be 
part of the dos command.



SAVE/DUMP COMMANDS:
-------------------------------------------------------------------------------
RunStop        Exit
Return         Save/Dump music
SPACE/InstDel  Delete text
Keyboard       Input text

SAVING:
-------
A filename can only be 15 letters long, the 1st letter is reserved
for the SDI filename tag ('up arrow') and it is not displayed on the screen.
Save routine has disk error check in case there are
problems saving a music. We are using a bytepacker inside the editor 
that will pack memory 3000-D000 and E000-EE00 thats why the files are small.
Everything you change will be saved, including marking tags and marked sound.
File size of a empty file is approximately 5 blocks.
File size for a tune using all sequences and tracks is approximately 60 blocks.

DUMPING:
--------
Filename can only be 15 letters long. the 1st letter is reserved for the
SDI dumpname tag " " (space), it is not displayed on the screen.
Dump routine have disk error check.
The dumper converts your tune(s) into a Turbo Assembler sequential file.

Sequences with far too much data will cause the dumper to stall.
What actually happends is that the dumped sequence data size is larger 
than the 256 byte limit we have on each sequence. We will try to fix this
or atleast display a error message on the sequence that was too large.
This happens very very very very rarely. (did we fix this?)

Furthermore, the dumper will only dump sequences that are in use inside the 
sequencer/tracker and it will not dump sequences inside a channel that is OFF.
All you have to do is make sure the music sound alright before dumping,
and remember that only channels that are turned ON will be dumped, including
any subtunes you have.
File size of a dumped file will range from 5 to 120 blocks.

Before you dump a file you should go through your instruments and check
they are ok. In most cases where a dumped tune sounds weird it
is caused by the user having program pointers to zero filled lines.
Especially waveform/vibrato/filter/pulse programs.





SOUND EDITOR:
-------------------------------------------------------------------------------

Sound Setup example:

05 WAVEFORM PRG
08 ATTACK/DECAY
7D SUST/RELEASE
20 GATE TIMEOUT
08 VIBRATO  PRG
02 PULSE    PRG
01 FILTER   PRG
1F BAND/RESONANS
00 DETUNE HI
00 DETUNE LO

05             Waveform program
               Points to the waveform table, you can access this 
               by pressing SHIFT+W.
08             Attack/decay
7D             Sustain/release
20             Gate timeout/hard restart
               Let you specify for how long the player shall wait before 
               setting release.
               For no timeout use values 00,20,40,60,80,A0,C0,E0.
               The longest timeout is 1f,3f,5f,7f,9f,bf,df,ff
               01-1F gate timeout and normal hard restart.
               21-3F gate timeout and hard restart 2.
               41-5F gate timeout and hard restart 3.      
               61-7F gate timeout and hard restart 4.      
| These        81-9F gate timeout and soft restart 1.
| was          A1-BF gate timeout and soft restart 2.
| removed ?    C1-DF gate timeout and soft restart 3.
| check it!    E1-FF gate timeout and soft restart 4.
               The latter one is like using a tie note.
08             Vibrato program
               Points to the Vibrato table, you can access this by 
               pressing SHIFT+V.
               00 indicates NO vibrato.
               01-55 Vibrato programs.
               56-FF for future expansion.
02             Pulse program
               Points to the Pulse table, you can access this by 
               pressing SHIFT+P.
               00 indicates NO pulse.
               01-40 Pulse program
               41-80 Pulse program with infinite sweep.
               8X where X can be a number between 1-F this value is stored
               directly to the sid register for Pulse High.
               90-FF for future expansion.
01             Filter program.
               Points to the Filter table, you can access this by 
               pressing SHIFT+F
               00 indicates NO filter.
               01-40 Filter program
               41-80 Filter sweep mode 1
               81-C0 Filter sweep infinite mode 2
               C1-FF Filter sweep mode 3
1F             Band/Resonance settings
               00 indicates NO filter.
00             Detune Hi
               00    = High freq. finetuning off
               01-7F = Finetune High freq. upwards.
               80-FF = Finetune High freq. downwards.
00             Detune Lo
               00    = Low freq. finetuning off
               01-ff = Finetuning. Direction depends on Detune Hi.



Creating drums:
---------------
00 SNARE DRUM        WAVES
00 WAVEFORM PRG   00:09 00
08 ATTACK/DECAY   01:81 CE
88 SUST/RELEASE   02:41 AC
22 GATE TIMEOUT   03:41 AA
00 VIBRATO  PRG   04:41 A7
88 PULSE    PRG   05:81 DE
00 FILTER   PRG   06:FF 05
00 BAND/RESONANS
00 DETUNE HI
00 DETUNE LO



01 BASED DRUM        WAVES
07 WAVEFORM PRG   07:09 00
08 ATTACK/DECAY   08:81 CE
86 SUST/RELEASE   09:41 A6
22 GATE TIMEOUT   0A:41 A2
00 VIBRATO  PRG   0B:41 9E
88 PULSE    PRG   0C:FF 0B
00 FILTER   PRG   
00 BAND/RESONANS
00 DETUNE HI
00 DETUNE LO



02 BASS AND BASED1   WAVES     PULSE
0D WAVEFORM PRG   0D:09 00  01:F7 88 08 82     ;Using pulse sweep
08 ATTACK/DECAY   0E:81 CE  02:81 2e 10 42
86 SUST/RELEASE   0F:41 A6
20 GATE TIMEOUT   10:41 A2
00 VIBRATO  PRG   11:41 00
01 PULSE    PRG   12:FF 11
00 FILTER   PRG   
00 BAND/RESONANS
00 DETUNE HI
00 DETUNE LO



03 BASS AND BASED2   WAVES     PULSE
0D WAVEFORM PRG   0D:09 00  01:08 00 03 82     ;Using pulse hold
08 ATTACK/DECAY   0E:81 CE  02:81 2e 10 42
86 SUST/RELEASE   0F:41 A6
20 GATE TIMEOUT   10:41 A2
00 VIBRATO  PRG   11:41 00
01 PULSE    PRG   12:FF 11
00 FILTER   PRG   
00 BAND/RESONANS
00 DETUNE HI
00 DETUNE LO



These examples are all using fixed notes in the waveform table, but you can
ofcourse use soft notes to create drums as well. 


WAVEFORM PROGRAM:
-----------------
   WAVES
c1 c2 c3
00:41 00
01:41 03
02:41 07
03:FF 00

You can press RETURN to insert the start of the waveform program
into your Sound Setup.

1st column (c1) displays program line position.
2nd column (c2) displays waveforms and waveform commands.
3rd column (c3) displays soft/fixed note values and 2nd part
                of the waveform commands.


Possible note values for 3rd column (c3):

00-5E	Soft notes, added to note+track transpose.
60-7F	Soft notes, subtracted from note+track transpose.
80-DE	Fixed notes, overrides note+track tranpose.
DF-FF   UNUSED.


Standard Waveforms (c2) (with gate off):

10     Triangle waveform.
20     Sawtooth waveform.
40     Pulse waveform. (pulse value must be set)
80     Noise waveform.

These waveforms sounds the same on both 6581 and 8580 sid chip.
And they can be turned on and off by adding the gate bit:

00     Gate off
01     Gate on

Sawtooth waveform with gate on  : 21
Sawtooth waveform with gate off : 20

You also have the possibilty to add ring modulation and sync:

02     Gate off Sync Bit: 
03     Gate on Sync Bit: 
04     Gate off Ring Modulation: 
05     Gate on Ring Modulation: 

Adding Gate on Ring modulation to Triangle waveform gives: 15

Combined waveforms (with gate off):

30     Triangle+Sawtooth waveform. Works best on new sids.
50     Pulse+Triangle waveform. Works with both old and new sids.
60     Pulse+Sawtooth waveform. May work differently on old sid revisions.
70     Pulse+Sawtooth+Trianlge waveform. Very silent on old sids.

These may sound differently depending on the sid chip you have.


Arpeggio Waveforms:

When creating arpeggios with the arpeggio program you have to use the 
following waveforms in the waveform table:

91     Triangle waveform.         (same as 11)
A1     Sawtooth waveform.         (same as 21)
B1     Triangle+Sawtooth waveform.(same as 31)
C1     Pulse waveform.            (same as 41)
D1     Pulse+Triangle.            (same as 51)
E1     Pulse+Sawtooth.            (same as 61)



Waveform commands:
------------------
In the waveform column (c2) you enter the command,
and in the note column (c3) you enter the parameter.

Waveform commands use $e2-$ff in the wan

FF - Jump command:
------------------
:FF XX

Jumps to program line position XX. 
XX can be any number betweeen 00-FE.


FE - Delay command:
-------------------
:FE XX
Delay the next waveform for XX frames.
XX can be any number between 00-FF.


FD - ADSR command:
------------------
:FD XX
:AD SR

AD = Attack/Decay value.
SR = Sustain/Release value.
Note that all parameters in this command are set on the same frame.
XX = 01-7F tells the music routine how many frames to wait before setting 
     gate off.
XX = 00 or 80 = no frame delay = no gate off will happen.
XX = 81-FF same as 01-7F above, but when gate is turned off it can't be 
     turned back on again.

Following example creates a nice ADSR effect:

       00:09 00
       01:41 00
       02:fe 0f
       03:41 00
       04:FD 10
       05:90 89
       06:40 00
       07:ff 01


FC - Drum command:
-----------------
:FC 00 SDI
:FC 01 MON
:FC 02 ROB
Unsupported in sdi 2.x. 
See the versions from 1997-1999.


FB - Multipulse command:
------------------------
:FB P2
:0X YY

Switches between two pulse programs.
The instrument must have a pointer to a pulse program from the sound setup.

P2 = second pulse program pointer.
X  = 0 start with P2 pointer.
X  = 1 start with sound setup pulse pointer.
YY = switch speed.

       Example:

       00:09 00
       01:FB 02
       02:01 07
       03:41 00
       04:FF 03


FA - Repeat command:
------------------------
Must be used together with the jump command.
:FA XX

XX = 01-FF

Tells the player to repeat
the following FF jump XX times.
When the last FF jump is executed
the player automatically jumps to the line
below the FF command.

       Example:

       00:FA 08   ;repeat 8 times
       01:09 00
       02:81 ce
       03:41 a7
       04:41 a5
       05:41 a2
       06:FF 01
       07:21 00   ;ends here after the repeats.
       08:FF 07

The FA command can be used together with all
the other waveform commands.


F0-F7 - D415 Filter command:
----------------------------
:FX YY

This is a 1 byte command.
The value you enter F0-F7 is the lower 3 bits of the filter cutoff, 
it is stored directly into the low filter register.
YY = not used.

       
EE - Pulse init:
----------------
:EE LH  Write low|high pulse value to sid registers (d402/d403)
        and player registers (pulselo/pulsehi)

ED - Pulse subtract:
--------------------
:ED xx   Subtract pulse with value xx
You must have set the inital value first.

EC - Pulse addition:
--------------------
:EC xx   Add pulse with value xx
You must have set the inital value first.    


EB - Pulse write:
-----------------
:EB LH   Write low|high pulse value to sid pulse registers only.


Example using the above pulse commands:

01:41 00  
02:EE 0F  ;init pulse
03:41 00  ;
04:ED 22  ;subtract 22 on pulse
05:41 00  ;
06:FF 04

When programming the pulse this way you don't need the pulse program
and can disable the pulseroutine (rem_pu   = 1) in the Turboass player.
All this to save rastertime.


E2-E7 - Noise trick:
--------------------
:Ex yy   Write Ex to waveform register. (yy is unused)
          X = 2-7.
              
This is used to get a none-random (metallic) noise waveform.
But has to be programmed properly in the waveform program:
             
01:09 00
02:E5 00
02:09 00
03:81 c8
04:FF 03



VIBRATO PROGRAM:
-------------------------------------------------------------------------------
   VIBRATO
c1 c2 c3 c4
01:10 00 00
02:FF 03 32

Press Return to put program line into sound setup.
Press Shift+Return to remove it from sound setup.

1st column (c1) displays the table position.
2nd column (c2) displays the delay value, Detune command(s) and
                infinite loop command (FF).
                Delay values range from 01-FD.
                00 = detuning and continue
             01-FD = Delay value
                FE = detuning and hold
                FF = infinite loop on vibrato.
3rd column (c3) displays vibrato width. 
                (00-7f going up then down) (80-ff going down then up)
                or..
                Detune value low byte
4th column (c4) displays vibrato speed.
                or..
                Detune value High byte


Special example 1 (Crazy comet)
       Using values greater than 80 in column 4 will produce what
       we call the Crazy Comet loop:

00:08 00 00 ;wait 8 frames 
01:FF 10 BE ;cracy comet loop


Special example 2 (Detuning):
c1 c2 c3 c4
01:FE DL DH

Special example 3 (Detuning followed by vibrato)
c1 c2 c3 c4
01:00 DL DH
02:FF 03 32

DL = Low value of frequency detuning  (Depends on DH)
DH = High value of frequency detuning (00-7F : finetune upwards)
                                      (FF-80 : finetune downwards)

Most likely you will only feel for changing the DL value
and leave DH to zero.

You can call a vibrato program from the FX column in the 
sequencer with $21-$3f.



PULSE PROGRAM:
-------------------------------------------------------------------------------
   PULSE SWEEP
c1 c2 c3 c4 c5
01:F7 88 08 82    ;jump and cut to program line 2
02:01 2e 30 42    ;continous sweep on program line 2

Press Return to put program line into sound setup.
Press Shift+Return to remove it from sound setup.

1st column (c1) displays the table position.
2nd column (c2) displays Pulse low and Pulse high starting value.
3rd column (c3) displays Pulse high/Pulsehigh sweeping value.
4th column (c4) displays sweep speed.
5th column (c5) displays sweep mode or sweep jump.


5th column commands:
00,40,80,C0 Sweep until reaching end value, then the sweep will stop.
            No jumping to other pulse program line will occur.
            The result of the pulse sweep all depends on the values
            used in c1 and c2.
0X-3f       Sweep till end value then cut to the c2 value.
            X indicates which program line to cut to when reaching end.
4X-7f       If X points to the same program line then the sweep will be
            continous between the two values in c3.
            If X points to a different program line the sweep will first
            go all the way betweem the two values in c3, then it will sweep
            to the new program line value in c3.
8X-BF       Sweep till end value then cut to the c2 value.
            Behaves the same way as 0X-3f but the sweep is reverse.
CX-FF       Continous sweep between the 2 values in column 3. 
            Behaves the same way as 4X-7f but the sweep is reverse.


   PULSE HOLD
c1 c2 c3 c4 c5
01:08 00 18 82
02:01 00 18 81

Pulse hold is another special case for creating pulse sweeps.
c2 is the init pulse value.
If c3 is equal zero, c4 will be used as a delay value, the player
will decrease this value down to zero, then perform the jump
value in c5.



FILTER PROGRAM:
-------------------------------------------------------------------------------
This program works just like the pulse program, with three exceptions:
1) The low/high byte starting values in column 2 have switched places to 
   high/low.
2) Filer program doesnt have the pulse hold routine. 

Instead of the pulse hold routine, the filter routne has special 
filter frame routine. This routine can set filter cutoff high, 
band, resonance and a frame delay counter of 1 or 2.

   FILTER FRAME
c1 c2 c3 c4 c5
01:4F 00 2f 82  ;filter frame with 1 as delay
02:22 00 64 03  ;filter frame with 2 as delay
03:11 12 01 43  ;normal filter sweep


When column c3 is zero the values of c2,c4 and c5 is used in the filter 
frame routine.
A closer look on the example lines:


01:4F 00 2f 82
    \   \  \  \
     \   \  \  8x is a 1 frame delay before jumping to line 02.
      \   \  Band = $20 and resonance = $0f
       \   Zero means this line is treated as a filter frame
        4F as filter cutoff high ($d416) 

02:22 00 64 03
    \   \  \  \
     \   \  \  0x is a 2 frame delay before jumping to line 03.
      \   \  Band = $60 and resonance = $0f
       \   Zero means this line is treated as a filter frame
        22 as filter cutoff high ($d416) 
        


Press Return to put program line into sound setup.
Press Shift+Return to remove it from sound setup.


ARPEGGIO PROGRAM:
-----------------
You can create 48 different arpeggios.
In the sequencer you use 40-6F followed by a note value to play them.
The example below displays 8 arpeggios ($40-$47), and it shows
how you can combine arpeggio data with sounds and speed.

   ARPEGGIO
c1 c2 c3 c4     ;-----##--Arpdata-
00:00 00 15     ;Arp. 40 - 037CF - sound 15 - speed 1 
01:03 00 55     ;Arp. 41 - 037CF - sound 15 - speed 2
02:07 00 95     ;Arp. 42 - 037CF - sound 15 - speed 3
03:0C 02 D5     ;Arp. 43 - 7CF   - sound 15 - speed 4
04:8F 05 15     ;Arp. 44 - 0484  - sound 15 - speed 1
05:00 05 41     ;Arp. 45 - 0484  - sound 01 - speed 2
06:04 05 01     ;Arp. 46 - 0484  - sound 01 - speed 1
07:08 03 c0     ;Arp. 47 - CF    - sound 00 - speed 4
08 84 00 00
 \  \   \  \
  \  \   \  Arpeggio speed and sound number.
   \  \   Arpeggio program line/data pointer. 
    \  Arpeggio data ($80+ loops).
     Program line (00-ff)

1st column (c1) displays the program line positon & indicates arpeggio Number.
                Use c4 together with c1 to find your arepggio number (00-2f)
                and then add $40 to find the arpeggio you should use in 
                the seuqencer.
2nd column (c2) displays arpeggio data.
3rd column (c3) displays arpeggio program line pointer. 
4th column (c4) displays arpeggio speed & sound number. 

Column 2 uses Values greater than $80 to set loop.

Column 3 and 4 always works as a pair to setup one arpeggio.


In column 4, if you want to play an arpeggio with instrument number $15
using speed 4 you must enter $d5. If you want to use speed 1, you must enter $15.

Remember that the instrument you set in column 4 need to use
these waveforms $91,$a1,$b1,$c1,$d1,$e1 in order to access the 
arpeggio data. If not the arpeggio will just sound as a regular instrument.

You call the arpeggios with $40-$6f from the sequencer.

Pressing < or > allows you to cycle the different arpeggios.
The routine will display the arpeggio with focus on its arpeggio data 
starting from the top. 
(The setup arepggio (c3+c4) pair will be located elswhere). 



TEMPO PROGRAM:
-------------
   TEMPO
c1 c2 c3
00:02 00
01:83 00

The tempo program works pretty much like the arpeggio program.
The difference is that you don't have column 4.

1st column (c1) displays the program line position & tempo program number.
2nd column (c2) displays the the tempo values.
                Using values greater than 80 indicates a loop. 
                Valid tempo values 01-7F and 81-FF.
                Do not use 00 or 80, that will not work with the final player.
3rd column (c3) displays the program line lookup pointer.

To set default tempo program  press RETURN on the lookup pointer you want to use.
(Notice that the TP value in the down-right corner of the screen will change)

You can also call these tempo programs with $40-$6f from track 4 in the sequencer.



INITIAL VOLUME:
---------------
If you want to change the volume or make the volume fade in you 
can access the INVOL menue from the sound editor by pressing Shift+I.

c1 c2 c3
00:14 00 ;volume for song 00, FS = 00
01:0F 00 ;volume for song 01, FS = 00
02:F4 00 ;volume for song 02, FS = 00

1st column (c1) displays song number.
2nd column (c2) displays volume for the song.
3rd column (c3) displays Filter channel and filter speed.

The high nibble of c2 is used to set fadein, valid numbers are 1-F where
1 is the fastest fadein (0 = no fadein ). 
The low nibble of c2 is the starting volume of the song, valid numbers are
0-F (0 = no volume and F = max volume). 
Using max volume together with a fadein value will not produce any fadein.
The fadein routine will always fadeup to max volume.
Default volume for all tunes when starting editor from scratch is is $0F.

Filter settings:
You do not need to type anything in column 3 to make use of filter in the sound editor. 
The high nibble of c3 is used to force filter on a channel when a tune is played from the beginning.
To make use of this function you need a filter instrument in one of the other channels.

0   = Filter force off
8-F = Future expansion

Force a single channel:
1 = Force channel 1
2 = Force channel 2
4 = Force channel 3

Force multiple channels into filter:
3 = Force channel 1+2
5 = Force channel 1+3
6 = Force channel 2+3
7 = Force all channels 1+2+3

The low nibble of column 3 controls filter speed delay.
The default value here is 0, which is the fastest speed delay.
This value is printed to screen next to "filter" and it is used to delay the 
filter speed inside filter program. Each song can have its own filter speed delay.
At the moment its not possible to change this value inside the tune. 
That is something for future expansion.

Valid numbers: 0 to F, where 0 is default.


Press ClrHome to go to current song's volume number.




THE TRACKER:
-------------------------------------------------------------------------------
The tracker looks pretty much like this when you start up
the editor:

OFF 00 00 OFF 01 00 OFF 02 00 OFF 03 00

xxyy      xxyy      xxyy      xxyy
A000unusedA001unusedA002unusedA003unused
J000      J000      J000      J000                      


xx displays the Transpose value
yy displays the Sequence number


Valid Tranpose values:
       80-9F Transpose down
       A0    No transpose
       A1-BF Transpose up

Valid Sequence numbers: 00-7F


Jump pointer: J000
       The jump pointer is a 2 byte value.
       You can set the jump pointer in the tracker
       by pressing Return.

Stop tag: STOP
       The stop tag triggers the music player
       to stop the music channel.
       You can set the stop tag by pressing Shift+Return
       in the tracker.


THE SEQUENCER:
-------------------------------------------------------------------------------
The sequencer consists of 4 channels.
Channels 1-3 are ordinary sid channels while Channel 4 are used for main
transpose/tempo changes and filter effects. 
(In the digi version of this editor channel 4 is used for digis.)

All sequences are marked with "unused" when you start
the editor, to make a sequence usable you have to press
CBM+K and "unused" changes to "-- ---".
Now you can change the sequence size with SH+D or SH+InstDel.

There are 3 different edit modes in the sequencer.
You can change between them by pressing F4, the edit bar will change
color between Grey, Blue and Red


1) Grey mode (Normal mode):
   You can type notes while the music is playing or when the music
   is turned off.

2) Blue mode (Synth mode):
   You can type notes with sound output. You cannot play the music
   at the same time. To select a new sound you can type in the sound
   number or arpeggio number in the FX column, or you can select a
   instrument from the sound editor (+/-).

3) Red mode (Record mode):
   Red mode is ONLY available when the music is playing, try pressing
   F4 and you'll see that the edit bar turns red and the sequencer is
   scrolling all the sequences.
   If the channel you are editing is turned ON you can record your notes
   at this point.  If the channel you are editing is turned OFF you
   can play along with the music.
   You can't edit the FX columns while in record mode.

   Special 1:
   Pressing F3 to pause the music returns you to grey or blue mode, and
   the edit bar will be at the position where you stopped your music.

   Special 2:
   Pressing F4 to switch mode returns you to the position you had before
   you pressed F1 to play the music.

   Special 3:
   When you have the split screen up (sequencer/sound edit) you will not
   be able to record your notes.  All keyboard inputs to the sequencer is
   is ignored (This is only for record mode. (Blue mode and Grey mode will
   behave as normal)). This way you can safely edit your sounds while being
   in red mode.




SEQUENCER FX + NOTE COMBINATIONS for channels 1-3:
--------------------------------------------------
Each sequence has two colums, the first is the FX column where you control 
what kind effects you want to use, the second is the note column.

FX NOTE
-- ---         Empty line
06 ---         [00-1F] Set sound number 06 and no note
10 C-4         [00-1F] Set sound number 10 and note C-4
06 c-4         [00-1F] Add sound number to waveform and tie note c-4 
2E C-4         [21-3F] Set glide value 2E and note C-4
2E c-4         [21-3F] Set glide value 2E and tie note c-4
22 ---         [21-3F] Set vibrato program 02
40 ---         [40-6F] Set arpeggio 00 and no note
44 C-4         [40-6F] Set arpeggio 04 and note C-4
6F c-4         [40-6F] Set arpeggio 2F and tie note c-4
74 ---         [70-7F] Set release 04 (cannot have a note combination here)
74 C-4         [70-7F] Set sustain 40 and note C-4
7A c-4         [70-7F] Set attack A0 and tie note c-4
-- C-4         [C#0-A#7] Notes (played with current sustain value - if set)
-- c-4         [c#0-a#7] Tie notes
-- GAT         [C-0] Set gate on for current sound
-- gat         [c-0] Set gate off using current sound release value
70 C-4         [70] Restore current sound original ADSR values with note C-4

Extra Commands (Under construction)

20 ON          Set channel in filter mode. (requires a running filter in another channel)
20 OFF         Remove filter from this channel.


Tie notes are displayed with a brown background color inside the editor.
The note for the attack function is displayed as a tie note, but it is
a note that restarts all programs the instrument is using.



SEQUENCER FX + NOTE COMBINATIONS for channel 4:
-----------------------------------------------
FX NOTE
-- ---         Empty line
06 ---         [01-1F] Set tempo to 06 and no transpose
04 C#0         [01-1F] [C-0 to A#7] Set tempo to 04 and transpose 1
-- D-0         Set transpose 2
41 ---         [40-60] Look up tempo program 01
44 GAT         [40-60] Look up tempo program 04 and transpose 0.
70 ---         [70] Filter control back to main filter channel
71 ---         [71-7F] Force filter output
21 ---         [21-3F] Force filter program 01
63 ---         [61-67] Forced filter band 03
               [68-6F] Future expansion


This channel controls main speed and main transpose for all channels.
It's not necessary to use this channel, but you can create some strange
tunes by changing the speed and transpose values here.
(The only problem here is when setting a too high transpose value, it could
make the editor crash. Keep the transpose between GAT and C-2. (needs to be 
confirmed int this version))
Starting the first sequence line here with -- GAT is a very good choice.
00 as tempo doesnt work. It will stop the music.

** Critical information **

Make sure channel 1-3 has inited a filter program before starting
playing around with filter effects here. Channel 4 filter control
works like a layer over Channel 1-3. But it is of vital importance that you
have inited a filter program with a intstrument in channel 1-3.
If you haven't the tune might not init properly, and/or channels will be muted.

What most likely happens when you get this muted bug is that band/resonance is set to 00.



SEQUENCE SIZES:
---------------
00 is min lenght of a sequence.
7F is max length of a sequence.

Normally you will be using these lengths:
00 01 03 07 0F 1F 3F 7F (00 02 04 08 10 20 40 80)

You may also try other lengths to get a different tempo:

If you set a sequence to 02 in size and then press 
SHIFT+D some times you get these lengths:
02 05 0B 17 2F 5F       (03 06 0C 18 30 60)

If you set a sequence to 04 in size and then press 
SHIFT+D some times you get these lengths:
04 09 13 27 4F          (05 0A 14 28 50)

If you set a sequence to 06 in size and then press 
SHIFT+D some times you get these lengths:
06 0D 1B 37 6F          (07 0E 1C 38 70)





TRACKER/SEQUENCER SCREEN:
-------------------------------------------------------------------------------
=TOP OF SCREEN==========================
 1a 1b 1c  2a 2b 2c  3a 3b 3c  4a 4b 4c 
000 03 7F 000 06 3F 000 07 3F OFF 03 7F 
                                        
1d1e      2d2e      3d3e      4d4e      
A00302 D#1A00606 D#2A00708 D#7A00302 D#1
A009-- ---A005-- ---A002-- ---J000-- ---
A009-- ---A005-- ---A002-- ---03  -- ---
9E09-- ---9E05-- ---9E02-- ---04  -- ---
9E09-- ---9E05-- ---9E02-- ---05  -- ---
A209-- ---A205-- ---A202-- ---06  -- ---
A209-- ---A205-- ---A202-- ---07  -- ---
STOP-- ---STOP-- ---STOP-- ---08  -- --- 


1a = Track 1 current Position        [000]
1b = Track 1 current sequence number [03]
1c = Track 1 current sequence length [7F]
1d = Track 1 current Transpose (A0) for..
1e = ..sequence number (03).

2a = Track 2 current Position        [000]
2b = Track 2 current sequence number [06]
2c = Track 2 current sequence length [3F]
2d = Track 2 current Transpose (A0) for..
2e = ..sequence number (06).

3a = Track 3 current Position        [000]
3b = Track 3 current sequence number [07]
3c = Track 3 current sequence length [3F]
3d = Track 3 current Transpose (A0) for..
3e = ..sequence number (07).

4a = Track 4 is turned OFF.  [OFF]
4b = Track 4 current sequence number [03]
4c = Track 4 current sequence length [7F]
4d = Track 4 current transpose (A0) for..
4e = ..sequence number (03).

=BOTTOM OF SCREEN=======================
 INSTRUMT WAVEFORM PULSELOW SEQUENCE 01 
 00 00 00 00 00 00 00 00 00 00 00 00 00 
 ARPEGGIO FILTE 3F PULSHIGH TRANSPOSE  
 FF FF FF 1 F1 567 0  0  0  00 00 00 00
 01:59 00 "FILENAME       " 00/02 1 2 5

Most of the information shown here is taken
from the player when it is in play mode (F1).

"FILTE 3F" is Band/Volume
The 3 numbers below "FILTE" are:
1   - Filter delay speed
F1  - Resonanse/Filter voices
567 - 56 = Filter cutoff high ($D416) and 7 = Filer cutoff low ($D415)
"SEQUENCE 01" is the cursor jump value (SH+A/CBM+A).
"01:59" is the Time of Day Cock.
Followed by "00" which tells the song number (CBM+/-)
Then you have the Filename.
Followed by 00/02 which is the tempo program pointer/current tempo data.
1 is the multispeed calls (SH+?).
2 is the quantize mode (CBM+Q).
5 is the transpose value while editing (F7/F8).
Channels has individual transpose values here.


TRICKS TO MAKE A TUNE USE LESS MEMORY:
-------------------------------------------------------------------------------
The music player itself is around $0900 bytes long +/- the
effects you want to use. 

Inside the Sequencer:

1) Instead of repeating the same notes inside a sequence you can
   make the tracker repeat the sequence. That will minimize the file
   size a lot, especially for the finalized tune.

2) Only set the instrument you want to use when it is necessary,
   you can save 1-2 bytes per note when finalizing the tune by doing this.
   The same goes for arpeggio and sustain/release values. Attack HAVE to
   be set each time.

3) Each tie note takes 2 byte in the finalized (dumped) tune.
   One byte for the duration and one for the note.
   While normal notes only needs a new duration when the
   duration value is different from the last.
   You will save a lot of memory by making a instrument that emulates
   tie notes. Make a instrument using gate time out E0 and set pulse prg 
   to infinite sweep. This will sound just a like a tie note. 
   We use this trick on solo leads quite a lot.
   Example:
   Fill up a $1f long sequence with normal notes.
   Dumped sequence size will be : 34 bytes.
   Fill up a $1f long sequence with only tie notes.
   Dumped sequence size will be : 65 bytes.

   03 TIE SOLO EMU      WAVES     PULSE
   13 WAVEFORM PRG   13:41 00  01:0b 5e 30 41
   00 ATTACK/DECAY   14:FF 13  
   86 SUST/RELEASE
   E0 GATE TIMEOUT
   00 VIBRATO  PRG
   41 PULSE    PRG
   00 FILTER   PRG   
   00 BAND/RESONANS
   00 DETUNE HI
   00 DETUNE LO
   

   You might have to set release before you use a instrument like this.
   (It has to do with sustain and decay value of previous sound played.)


4)  Here are some dump examples:
    Large letters = notes
    Small letters = tie notes


    Editor:    Dumped sequence:

    01 C-4     81,63,30,0
    -- ---
    -- ---
    -- ---


    01 C-4     81,61,30,32,34,35,0
    -- ---
    -- D-4
    -- ---
    -- E-4     Sound 01 and notes.
    -- ---
    -- F-4
    -- ---


    01 C-4     81,61,30,61,B2,61,B4,61,B5,0
    -- ---
    -- d-4
    -- ---
    -- e-4     Sound 01 and tie notes.
    -- ---
    -- f-4
    -- ---


    01 C-4     81,61,30,AE,B2,AE,34,AE,B5,0
    -- ---
    2E d-4
    -- ---
    2E E-4     Sound 01 and glide + tie glide.
    -- ---
    2e f-4
    -- ---


    40 C-4     C0,61,30,61,B2,61,B4,61,B5,0
    -- ---
    -- d-4
    -- ---
    -- e-4     Arpeggio 40 note + tie notes.
    -- ---
    -- f-4
    -- ---


    00 C-4     80,61,30,C1,32,81,34,C3,35,0
    -- ---
    41 D-4
    -- ---
    01 E-4     Notes and sound + arpeggio.
    -- ---
    43 F-4
    -- ---


    00 C-4     80,61,30,F2,30,81,30,F3,30,0
    -- ---
    72 C-4
    -- ---
    01 C-4    Sound and sustain effects.
    -- ---
    73 C-4
    -- ---


    01 C-4     81,61,30,F2,30,63,F4,0
    -- ---
    72 C-4
    -- ---
    74 ---     Sound, sustain and release effect.
    -- ---
    -- ---
    -- ---


    01 C-4     81,61,30,F9,B2,63,F4,0
    -- ---
    79 c-4
    -- ---
    74 ---     Sound, attack and release effect.
    -- ---
    -- ---
    -- ---


    01 D-4     81,61,32,A1,5F,86,63,B2,0
    -- ---
    21 ---
    -- ---
    06 d-4     Sound, vibrato and waveform add effect.
    -- ---
    -- ---
    -- ---


    A empty $1F long sequence will look like this dumped:

               7F,5F,0

    A empty $3F long sequence will look like this dumped:

               5F,FF,5F,0

    A empty $7F long sequence will look like this dumped:

               5F,E0,7F,5F,0 



Inside the sound setup:

5) Using the arpeggio routine, instead of the waveform table to
   create arpeggios.

6) This trick may be obsolete. Because you can now use the "20 on" command
   or choose what channels to start with filter in the init routine.
   Obsolete filter trick:
   By doing this your instruments will be played with filter in filter channels
   (without destroying the filter sweep) and the same instrument will play 
   with out filter in non-filter channels:
   
   You can trigger the player to set a channel as a filter channel and all 
   instruments played in that channel will use filter.
   What you need is to make a initial filter sound:

   00 F/INITIAL FILTER

   00 WAVEFORM PRG
   F0 ATTACK/DECAY    ;This.. 
   00 SUST/RELEASE
   22 GATE TIMEOUT    ;......will not create a sound output
   00 VIBRATO  PRG
   00 PULSE    PRG
   01 FILTER   PRG
   1F BAND/RESONANS
   00 DETUNE HI
   00 DETUNE LO
   

   FILTER PRG:
   01:C0 1C 01 41

   Now, for the rest of the instruments you will be creating
   write 80 as the "FILTER  PRG" and 00 as "BAND/RESONANS".
   Like this:

   01 BASS

   00 WAVEFORM PRG
   01 ATTACK/DECAY
   c8 SUST/RELEASE
   20 GATE TIMEOUT
   00 VIBRATO  PRG
   00 PULSE    PRG
   80 FILTER   PRG
   00 BAND/RESONANS
   00 DETUNE HI
   00 DETUNE LO
   
   This sound can be used on all channels, and is only played
   with filter on the channel triggered as filter channel with the
   instrument "F/INITAL FILTER".
   If you play a sound in the filter channel that doesn't
   have 80 as FILTER  PRG or is not a filter sound at all
   you will destroy the filter sweep, and on older sid chips
   you will get filter clicking. Which doesnt sound good at all.



FINALIZING A TUNE:
-------------------------------------------------------------------------------
That's all done in Turbo Assembler.
After you have dumped your song you can select between two Turboassembler
versions:

1) "BMTASS FAST/9000"
This assembler uses a fastload/fastsave that is only compatible
with 1541/1571 disk drives. But entering files with <- and E/W
is done using normal load routines.

2) "SDI TASS /9000" 
Is a modified version of Soci's TASS supporting all device numbers mod.
No fastload routines. But works well on ide64, sd2iec and all
other drives.

3) "PETSCII SOURCES"
The sources files is also available as sequence files on a seperat disk
you can easily convert them to be used with 64tass.exe
(You might have to convert some "" with "_" and some asl a, lsr a,  
etc. with asl, lsr. )




We also included

Load the player source you want to use, there are 2 available sources:
1) The normal version "s.sdi21-n49"
2) The speed version  "s.sdi21-spd49"

You can switch disk drives from TASS by pressing <- and shift+d
Enter your dumped file at the end of the player source.

( Take a quick look at the music data you loaded in to see if
  everything is alright. Move cursor to the "W" label and
  browse down to the "AD" label. Alot of zeros following each other might 
  indicate you have a program pointing into nowhere - head back to editor 
  and make sure all your filter, vibrato, pulse and arpeggio programs are ok. )

Now you can select the effects you want to remove at the top of the
source, almost all effects are set to ignored (1) as default.
Turning them back on will make the player take more rastertime
and memory.

Here's a brief explanation on each effect:

sid      = $d400 ;The sid chip have a few mirror banks try setting this
                 ;value to $d5C0 and you'll still hear music.
                 ;For a C128 only banks $d400-$d500 will work.

mzero    = $fe   ;The player is using $fe and $ff as zeropage.

rem_4ch  = 1     ;1 = Ignore 4th channel.
                 ;If you made a tune using 4 channels you have to set
                 ;this parameter to zero.
rem_det  = 0     ;ignore detuneing (data at z8 and z9 can be removed).

rem_gout = 0     ;ignore gate timeout.

rem_1wf  = 0     ;1 = Ignore 1st waveform byte.
                 ;If you want to save raster time and memory you can set this
                 ;parameter to 1. (warning! sound output might be differernt)

The E2-FE commands are used inside the waveform table.

rem_wfd  = 1     ;1 = Ignore waveform delay (FE command).
                 ;If you are using the waveform delay command you
                 ;have to set this parameter to zero.

rem_adsr = 1     ;1 = Ignore adsr command (FD command).
                 ;If you are using the adsr command you have
                 ;to set this parameter to zero.

rem_mp   = 1     ;1 = Ignore multipulse (FB command).
                 ;If you are using the multipulse command you have
                 ;to set this parameter to zero.

rem_wfr  = 1     ;1 = Ignore waveform repeat (FA command).
                 ;If you are using the waveform repeat command you
                 ;have to set this parameter to zero.
rem_wf0  = 1     ;ignore $d415. $f0-$f7 in waveform table.

rem_puw  = 1     ;1 = Ignore (EB-EE command) wf pulse.

rem_pu   = 1     ;1 = Ignore pulse routine

rem_we2  = 1     ;1 = Ignore e2-e7 wf noise

rem_arp  = 0     ;1 = Ignore arpeggio routine.

rek_fi   = 0	 ;1 = Ignore filter routine

rem_fspd = 0     ;1 = Ignore filter speed

rem_glid = 0     ;1 = gnore glide routine

rem_vib  = 0     ;1 = Ignore vibrato routine

rem_cc   = 1     ;1 = Ignore Crazy comet Vibrato effect.

rem_fad  = 1     ;1 = Ignore fadeout routine

rem_gat  = 1     ;1 = Ignore GAT/FLG command

rem_f20  = 1     ;1 = Ignore sequence command 20 XX

rem_wfo  = 1     ;1 = Ignore wf ora command in sequencer

rem_voff = 1     ;1 = Ignore voice on/off
                 ;Setting this parameter to 1 removes the code that makes it
                 ;possible to toggle voices on and off while listening.
                 
rem_trkl = 1     ;1 = Max $FF bytes per track.
                 ;It is possible for each track to be $07FF bytes long.
                 ;In most cases you won't exceed the $0100 limit.
                 ;You have to test or count track bytes.

rem_tp   = 0     ;1 = Ignore tempo program.
                 ;If only a single tempo is used you can save cycles by
                 ;ignoring the tempo program. Instead insert the tempo
                 ;value you want ot use in offset "s".

The following effects are for the frame player only:

rem_opt   = 0    ;1 = Optional speed channels.
                 ;If you have multispeed on all channels leave this parameter to 0.
                 ;If you made a speed tune that only made use of one or two
                 ;speed channels you can set this parameter to 1.
                 ;In addition you have to modify the parameter below:

spdchan   = %00000111
                 ;%00000001 = channel 1
                 ;%00000010 = channel 2
                 ;%00000100 = channel 3
                 ;%00000011 = channel 1 and 2
                 ;%00000101 = channel 1 and 3
                 ;%00000110 = channel 2 and 3
                 ;%00000111 = all channels (set rem_opt = 0)

speed    = 4     ;This is how many speeds you have made the tune in
                 ;you can enter a value between 2 and 15 here.
                 ;This value has nothing to do with the player. It's for
                 ;the music displayer which you can start with <- and 3 .


system    = 1    ;1 = pal
                 ;0 = ntsc
                 ;This has to do with the music displayer.
                 ;US machines have to select zero for ntsc mode.


The frequency table provided in these two sources are tuned to pal machines.
If you are on a ntsc system and want to change the frequency table there are 
two sequence files on disk to choose from:

1) "freq-pal"
2) "freq-ntsc"

Locate the text ";pal tuned freqtable" and remove it and also remove
the two data tables named freqlo and freqhi.
Now press <- + e and enter "freq-ntsc" as filename, then press return.


For both normal and frame versions:

When you have set the effects you want to use it is time to test the music.
<- and 3 assembles the music and you can start by pressing S.
Some text will be displayed on the screen and the music should be playing.
If there's something wrong with the tune you can enter Turbo Assembler
again by pressing CBM. 
Change the effects you want to use and test the music again.

When you are happy with you choices you can save the music,
from you monitor:

s"hello world",8,1000,last address + 1

Yes, you have to add 1 byte to the end address.




USING THE MUSIC IN A DEMO/GAME:
-------------------------------------------------------------------------------
You are allowed to use the music player in a game free of charge, but you will
have to credit us for writing the music player. Simply state that the music
was written in Sid Duzz'It, or you can credit us with our real names.
You are allowed to modify the player source.

Now let's say you assembled the tune to $1000:

ldx #00 - $1f
jmp $1000      ;Init call for the tune you want to play.
jmp $1003      ;Main play call for the tune.
lda #$00-$7f
jmp $1006      ;Fadeout call for the tune
jmp $1009      ;Speedplay call for the tune.


Correct raster setup for a speed tune on a PAL machine:
A pal machine has 312 scanlines.

raster =  312/speed   (speed = how many speeds the tune was made in)

Correct raster setup for a speed tune on a NTSC machine:
A ntsc machine has 262 scanlines.

raster =  262/speed   (speed = how many speeds the tune was made in)


You will need one Main call to the player,
and the reamaining calls must go to the speedplay call.

If speed = 4:

      IRQ: lda #0
           cmp $d012
           bne *-3
           JSR $1003        ;main call - updates tracks, sequences and sounds
           lda #raster
           cmp $d012
           bne *-3
           JSR $1009        ;sound update call
           lda #raster*2
           cmp $d012
           bne *-3
           JSR $1009        ;sound update call
           lda #raster*3
           cmp $d012
           bne *-3
           JSR $1009        ;sound update call
           RTI

Remember that the $d012-$d011 timing is critical to get the same
sound output as in the editor.




KNOWN BUG ISSUES:
-------------------------------------------------------------------------------
1) It's possible make the player bug by filling up a $7F sequence completely 
   tie notes. (that means a note on every line, including a instrument change
   or a glide). Doing this will make a dumped sequence be larger than 256 bytes
   which is the limit. We've seen 258 bytes.  Only solution is to split up
   the sequence.



DICTIONARY:
-------------------------------------------------------------------------------
Arpeggio       - A method to emulate chords on the c64.
Channels       - Tracks
Glide          - Glide from note X to note Y with a specified speed, there are
                 two different note possibilities one with hard restart glide 
                 and one with tie glide.
Instrument     - Sound
Line number    - All sound programs or sequences have a line number displayed 
                 on the left to make it easy understand where you are located.
Program line # - (In sound edit) The number displayed before ":" (ie. 01:).
Sequence       - Other editors call this a sector (ie. sync).
Sequencer      - FX columns and NOTE columns for all channels. Similar to a 
                 pattern in protracker on Amiga.
Sound          - Instrument
Tie note       - A note that doesnt restart the different sound setup programs.
Tie glide      - A tie note using the glide function.
Track line     - Each track line consists of 2 parameters the first is 
                 transpose and the second it's sequence number.
Tracker        - Sequence transpose and sequence variables for all 4 channels.
Tracks         - Channels



MEMORY OVERIEW:
-------------------------------------------------------------------------------
0100-017f      Stack
0180-0200      Sequence lengths
0200-0229      Dos command buffer
0229-          Filename
02a7-0300      Data tables
0340-0400      Sprites
0400-07e8      Screen
0800-2ee0      Editor part 1
2F00-3000      data buffer
3000-3800      Track 1
3800-4000      Track 2
4000-4800      Track 3
4800-5000      Track 4
5000-D000      Sequences
D000-D810      Directory memory
               Max 128 SDI files in a dir. The rest will be ignored.
D810-E000      Editor part 2
E000-E100      Waveform program table
E100-E200      Waveform program note table
E200-E300      Pulse program table
E300-E400      Arpeggio data
E400-E500      Arpeggio program table
E500-E600      Vibrato program table
E600-E700      Filter program table
E700-E8E0      Sound setup
E700-E730      Waveform program pointer
E730-E760      Attack/Decay
E760-E790      Sustain/Release
E790-E7C0      Gate timeout
E7C0-E7F0      Vibrato program pointer
E7F0-E820      Pulse program pointer
E820-E850      Filter program pointer
E850-E880      Filter band/resonance
E880-E8B0      Detune high
E8B0-E8E0      Detune low
E8E0-E970      Future expansion
E970-E980      File info (speed calls/speed channels)
E980-EA00      Tempo data
EA00-ED00      Sound names
ED00-ED20      Default tempo lookup table for each tune
ED20-ED40      Channels ON lookup table for each tune
ED40-ED70      Tempo program table
ED80-EDC0      Marked channel positions
EDC0-EDE0      Invol Volume setup
EDE0-EE00      Invol Filter setup
EE00-EEC0      Note frequence table
EEC0-FFE6      Player/Editor part 3


FILE OVERVIEW:
-------------------------------------------------------------------------------
32             Tunes
128            Sequences    
32             Instruments (but you get 48 through the arpeggio routine)
48             Arpeggios
85             Vibrato porgrams
64             Filter programs
64             Pulse programs
48             Tempo programs


PC/EMULATOR USERS:
-------------------------------------------------------------------------------
Here are some of the corresponding PC keyboard keys:

C64:            PC:
----            ---
Restore         Page Up
CTRL            Tab Key
RunStop         CapsLock / Escape
Return          Enter
CBM             CTRL
<-               (The key above the Tab key)
=               ' (They key above right shift and to the left of the enter key)
/               /_ (Can also be the underscore key)
?               ?_ (Can be the shift + underscore key)
CRSR            Arrow keys
*               ^}
ClrHome         Home
A#?             Insert
h-?             Delete
