Goat Tracker Tutorial
Goat Tracker Tutorial
67
---------------------------------------------------------------------------
-------------------------------------------------------------------------
| This guide is aimed at musicians that want to start creating .sid |
| chiptunes from scratch using the pc/mac application "goattracker". |
-------------------------------------------------------------------------
___________________________________________________________________________
__/Contents:
------------
_________________________________________________________________________
/ \
If you already know how to think in binary and hex, and know what a
signed hex value is, you can skip to chapter 1.
__________________________________________________________________________
Humans daily life is dealing with decimal numbers, which we all know. Since
computers work somewhat different from humans, and only know "charge" (1)
or "no charge" (0) the concept of binary values has been made up.
A bit set to "1" means, we need to add it's decimal value up to the sum to
know the final value of the nybble. Mind that the lowest bit is always
referred to as bit 0. People also use the orientation LSB (least significant
bit = bit 0) and MSB (most significant bit).
MSB LSB
bit number 3 2 1 0
dec value 8 4 2 1
: : : :
: : : :
example : : : :
bin value %1 0 1 0 = decimal 10 (adding up bit 1 and 3)
___________________________________________________________________________
__/HEX
------
As decimal system only has 10 numerics for numbers, the letters A-F were
incorporated into the system. After the value exceeds 9, it goes from
A to F.
___________________________________________________________________________
The MSB represents the value 128 in decimal. (or 80 in hex system) Largest
value of a byte is 255 in dec / $FF in hex / %11111111 in binary.
Buildup of a byte looks like this:
MSB LSB
bit number 7 6 5 4 3 2 1 0
dec value 128 64 32 16 8 4 2 1
hex value $80 $40 $20 $10 $8 $4 $2 $1
The trick with a byte value is, that it can be treated like two nybbles for
easy binary to hex (and vice versa) conversion.
%10110110
splits up to
%1011 %0110
furthermore
%1011 = $B
and
%0110 = $6
$E4
splits up to
$E = %1110
and
$4 = %0100
___________________________________________________________________________
$7F - Low nybble is already at highest value ($F). If this was decimal
system, the highest value would be 9. So if you add 79+1, result is
80. In hex just the same, we increase the high nybble ($7) and set
low nybble to $0 again. $7F + $01 = $80.
Mind: If you're lazy, you can also use the calculator that comes with your
operating system for hex/bin/dec conversion.
___________________________________________________________________________
__/Signed Values
----------------
Further, the bits are inverted (flipped) in case the represented value is
negative. Since %0000 0000 represents 0, a signed value of %1111 1111
represents -1. Also an offset of $01 has to be added after inverting the
bits.
And in case you really don't understand the need for the offset, here is
the proof:
$01=$+01
$02=$+02
$03=$+03
.
.
.
$7D=+$7D
$7E=+$7E
$7F=+$7F
Negative Range:
$FF=$-01
$FE=$-02
$FD=$-03
.
.
.
$82=$-7E
$81=$-7F
$80=$-80
\_________________________________________________________________________/
_________________________________________________________________________
/ \
Similar to a church organ, the soundchip also has 27 registers where we can
set values to influence, -synthesize- sound. One register contains one byte
of data.
Overall the chip has three oscillators, or for the musician: three voices.
___________________________________________________________________________
Pitch - Frequency. Every Sid voice has two registers for frequency,
allowing a 16 bit frequency value. This part/conversion will not be
described in deep, as goattracker converts entered notes etc. to frequency
values and writes the "pitch" registers by itself.
___________________________________________________________________________
stands for:
Attack time - The time until reaching full volume before decaying
Decay time - Time until reaching sustain level
Sustain level - Sound sustains (Sustain is a level, no time value)
Release time - And finally releases, fades out
Or in other words:
Attack - You press a key on the piano, the hammer hits the string, the
string resonates with it's peak value
Decay - The Peak value decays
Sustain - The string sustains at sustain level (Key still pressed)
Release - Release of the piano key and fade out / muting of the string
according to foot pedals
Diagram for an instrument with fast attack, fast decay and long release:
Diagram for an instrument with slow attack, fast decay and short release:
___________________________________________________________________________
__/Waveform - Wavetable
-----------------------
One frame = one screen update = one value read from table and written to
sid registers. When people speak of 2x or 4x tunes, they mean that the
music routine is called several times per screen update, and thus allows
more waveforms and parameters to be written, which results in more
abilities to create sound.
The "WAVE TBL" contains two columns, the left value is the waveform
register value, the right column is relative/absolute note offset which
we will discuss later.
MSB LSB
bit number 7 6 5 4 3 2 1 0
hex value $80 $40 $20 $10 $8 $4 $2 $1
dec value noise square saw tri test ring sync ADSR
Bit 7 selects the "noise" waveform, which is very useful for creating hihat
and snaredrum sounds. It's no "fixed" noise as for example white
noise, It's pitch dependent pseudo random noise defined by a note
value in a pattern or by offset/fixed pitch.
Bit 4 "triangle" waveform, looks like /\/\/. It has a very soft sound which
can be used for flute like sounds.
Bit 2 "ringmodulation" - When this bit is set to 1, the oscillator (it must
be triangle waveform!) is ringmodulated with the frequency of the
previous oscillator, no matter what waveform the previous osc. is set
to. Previous oscillator in goattracker terms means, the osc./pattern
left to the modulated voice (the three patterns in the editor
represent the three sid voices). In case ringmod bit on voice 1 is
selected, the previous voice would be voice 3.
The effect is better heard than described. It sounds metallic and can
be used to create bell like sounds.
Bit 1 "sync" - When this bit is set to 1, the fundamental frequency of the
oscillator is hardsynced with the frequency of the previous
oscillator. Technically, the waveform the oscillator plays is
restarted when the previous oscillator amplitude passes 50%.
Oscillator 1 playing a triangle wave syncs Osc 2 that plays a saw wave,
with higher pitch than Osc 1:
/\ /\
/ \ / \
/ \ / \
/ \ / \
/. .\ /. .\
/ . . \ / . . \
/ . . \ / . . \
/ . . \/ . . \
. . . .
. . . .
/| . /| /| /| /| /| /| /| /|
/ |/|/ |/ |// |/ |/ |/ |/ |// |
From the stuff we know so far, we will create our first sound:
Edit
[01:21 00] (Sets saw waveform and gatebit)
[02:20 00] (Saw waveform still set, gatebit off)
[03:FF 00] (FF is a jump command for wavetable programming.
FF 00 means - stop wavetable execution)
Since gatebit is on for just one frame, we cannot really hear the attack.
Edit
[01:11 00]
[02:21 00]
[03:51 00]
[04:FF 01]
Hint: you can use [insert] and [delete] to move wavetable values up/down.
If you move onto the 01 position and press [insert] you will see
goattracker even changes the "Wavetable Pos" according to where you
move the initial value.
___________________________________________________________________________
As mentioned earlier, the right column in WAVE TBL is used for pitch
offset. This can eighter be relative (=added/substracted from the note
value) or absolute (fixed, no matter what the note pitch is) values.
Arpeggios - Since the sidchip has a somewhat limited polyphony, the concept
of arpeggios (single notes that are played in fast order) is
often used.
[01:21 00]
[02:21 07] (+7 halftonesteps =a quint)
[03:21 0C] (+12 halftonesteps =an octave)
[04:FF 01]
Jump to Pattern editor with [F5] and hit space to change to [JAM MODE]
(see lower left of screen) to play the arpeggio with different notes.
Hint: Marking/Painting the "black" piano keys on your QWERTY keyboard makes
composition a lot easier. There are also two layouts to choose from:
the fasttracker and the DMC layout. This tutorial is based on the
(default) fasttracker one.
Hint2: Space (as you've already seen) switches JAM/EDIT mode, so you can
find out some melody without fuxx0ring the pattern up.
Hint3: If you use a Mac, you can also connect a MIDI keyboard and play
notes with that :)
If you want to create your own arpeggio scale, just take the base note and
count the keys.
Means: base note key for example [C] (E-3)
you want second note key [N] (A-3)
count the keys going up the scale from [C] to [N], not including [C]
(base note) but [N].
that would be [V] [G] [B] [H] [N] = $05 relative offset
___________________________________________________________________________
Values from $81 (C#0) to $DF (B-7) in the right WAVE TBL column play back
the sound at the given value, no matter what note value is entered in
pattern editor. So to speak: you can trigger these with any note value, it
will always be played back at fixed pitch.
Edit instrument:
[Attack/Decay 32]
[Sustain/Release F9]
[Wavetable Pos 01]
Now jump to pattern editor and enjoy drumsound always in same pitch.
Hint: see the ravenspiral .pdf that comes with goattracker for a nifty note
value table.
___________________________________________________________________________
Due to bugs (features) in the 6581, this is not completely possible with
all waveforms. Combining square and triangle ($50) gives a good audible
result, whilst triangle and saw ($30) are nearly inaudible.
Though interesting sounds can be achieved by adding a wide pulse wave.
On 8580 all three waveforms can be combined to give clear audible results.
Mind: Another difference between 6581 and 8580 is the filter. The 6581 is
out of specs and every chip's filter curve seems different.
-But- the 6581 filter can be used for really dirty filtering and
distortion and has a generally more lively sound. The 8580 filter is
linear to specs and just "does what it should do".
Decide for yourself which is more important to you.
Trivia: Oldschool musician Ben Daglish didn't use any filters in his songs,
as he knew every chip sounded different and he did not want that
his soundtracks would sound completely different on other machines.
\_________________________________________________________________________/
_________________________________________________________________________
/ \
Mind: The chip has actually two registers for setting pulsewidth for each
voice, though one of these two registers uses only a nybble value,
which gives us a total range from dec 0-4095, or more familiar:
$000 - $FFF.
Now if we change the pulse -width-, it would look like this for example:
Soundwise this changes the harmonics of the wave, so the sound is missing
certain harmonics whilst it emphasizes others, depending on high/low
relation. It's better heard than described, as it's one of the sid chip's
well known distinct sounds.
Edit ADSR values in instrument editor to whatever you like, and set
[Wavetable Pos 01]
[Pulsetable Pos 01] (just like with the wavetable,
this points to the PULSETBL position)
As mentioned earlier, we cannot hear anything as we have not set the pulse
high/low relation. So go right to PULSETBL (the pulsetable is executed just
like the wavetable, frame by frame)
Edit
[01:98 00]
[02:FF 00]
The second nybble ($8) is the high nybble (MSB) for setting
the pulsewidth, so it influences the pulsewidth the most.
The most right two nybbles are the low byte of the
pulsewidth which allow for finetuning.
edit PULSETBL
[01:9X 00] - try different values for X, hit space to retrigger the sound.
You might have discovered that the sound thins out, the closer you get to
$000 and $FFF. That is because a pulse with width $000 or $FFF is so wide
that it's constant high or low, thus it does not oscillate and it cannot
be heard.
pulsewidth $000
high
low ----------------------------
pulsewidth $FFF
high ----------------------------
low
Thats why our initial value $800 gives us a symmetrical square wave, as
it's the middle between $000 and $FFF. Going towards $000 from $800 sounds
the same as going towards $FFF from $800, though it's not the same seen
from the physical side.
___________________________________________________________________________
__/Automation/Modulation - Pulsetable
-------------------------------------
Hit space to hear a pulsewidth fade going from $800 towards $FFF and stop.
[02:6C 13] Values in the pulsetable left side that range from $01 to $7F
are used for pulsewidth modulation (=automation).
In our case, $6C $13 means, ADD a value of $13 to the pulsewidth
register for the duration of $6C frames. The right byte ($13) is
a signed value!
If we change $6C to $1F [02:1F 13] we can hear that the pulse
only slightly changes, as $13 is only added for a duration of
$1F frames.
You will notice, the sound passes $FFF (the "constant high" pulsewidth
where it cannot be heard) and wraps around .
This is because -registers wrap around-; when the value exceeds $FFF and
the Pulsetable execution adds another $20, it will start over from $000 and
increase again from there until all $7F frames are executed, then it stops
again somewhere near $800.
Remind: $7F is the maximum duration for modulation, as a value of $8x and
higher is reserved for setting the pulsewidth.
Try: The jump command [FF] in Pulsetable. If you change [03:FF 02] the
sound will wrap forever. You can also set the width to different
values directly in series using the $8x - $Fx left nybble. And you
can even execute a fast fade, then a slow fade (several automation
commands in series). In that case the starting pulsewidth for a
following commands is always the one where the previous command
stopped changing the register.
And: The right byte (the value that will be added/substracted) is, as told
before, a signed value. So if you want to stop at a certain pulsewidth
and go back reverse, you need to add a negative value (signed) again.
You should really consider reading -chapter 0 - signed values- if you
don't know what this means.
Last words for this chapter: Of course the pulsewidth register will also
wrap around in opposite direction (like every
register). So substracting from $000 will
start over from $FFF.
\_________________________________________________________________________/
_________________________________________________________________________
/ \
__/Usage of Filter
------------------
As there are different types of filters, they are differed by the frequency
range they work in. Sid has three different filters, which can be combined
in any way.
Also there is ability to set the cutoff frequency register, which defines
at which frequency the selected filter -cuts off-.
So if you select lowpass and set $cutoffvalue, it will let all frequencies
pass that are below $cutoffvalue; so the sound will be somewhat dull.
Bandpass lets frequencies pass that are around $cutoffvalue, so low and
high stuff will not be heard.
Furthermore, we have the ability to set a resonance value, which means that
the frequencies in $cutoffvalue range will be emphasized.
___________________________________________________________________________
__/Filtertable
--------------
edit
[01:90 F7] (left nybble $9x - set lowpass, right unused, $Fx set resonance,
$x7 set channel/=oscillator)
[02:00 10] (Set cutoff to $10)
[03:FF 00] (end of line)
Bytes that are written in the left column define either filtertype or
!-modulation steps-! (we know them from pulsetable already).
Mind: When you try the modulation examples from [chapter 2 - pulse
waveform] here, the value will wrap around as it always does, but the
filter sound will not. So finally understanding signed values should
be essential for letting filter cutoff going up and down again too.
___________________________________________________________________________
In case the left byte in a filtertable row is above $7F ($80 and up), the
whole two bytes in this table step are used for defining the following:
H M L
I I O
: D W
: : :
% 1 0 0 0 $8 - All off, no filter (MSB=always on, since above $7F)
% 1 0 0 1 $9 - LowPass - LP
% 1 0 1 0 $A - MidPass - often abbreviated BP since Mid=Band
% 1 0 1 1 $B - BP & LP
% 1 1 0 0 $C - HighPass - HP
% 1 1 0 1 $D - HP & LP
% 1 1 1 0 $E - HP & BP
% 1 1 1 1 $F - HP & BP & LP
Right nybble value has no effect, $80 or $81, even $8F - does the same.
___________________________________________________________________________
Right byte left nybble defines resonance ($0x - $Fx), rightmost nybble
lowest three bits select which chan/voices are to be filtered ($x0 -$x7).
[ voice ]
3 2 1
: : :
: : :
: : :
% 0 0 0 0 $0 - Filter not active on channels.
% 0 0 0 1 $1 - Voice one filtered.
% 0 0 1 0 $2 – Voice two filtered.
% 0 0 1 1 $3 - 1 & 2 filtered.
% 0 1 0 0 $4 - 3 filtered.
% 0 1 0 1 $5 - 1 & 3 filtered.
% 0 1 1 0 $6 - 2 & 3 filtered.
% 0 1 1 1 $7 - all voices filtered.
Now we can totally figure out our filter table example step 01:
[01 90 F7] (left nybble $9x - set LP, right nybble unused,
$Fx set resonance, $x7 set channel/=oscillator)
___________________________________________________________________________
[02:00 10] (Set cutoff to $10) - $00 tells the editor to set filter cutoff
to the right byte value ($10).
___________________________________________________________________________
A simple Filtersweep:
[very] Mind: In the above examples, filter is always selected for all three
channels. That was done deliberate, because the sound you edit
in instrument editor is always played back on the cannel you
have last edited in pattern editor.
Means: when you entered notes on pattern/channel 1 at last and
jump to instrument editor, you will hear the [space] preview
note also played that channel.
Verdict: When you edit a filter and can't hear it, the channel
you are on in pattern editor and the one you set with the
filter voice bits are not the same.
\_________________________________________________________________________/
_________________________________________________________________________
/ \
[Vibrato Delay] defines how many frames the sound will play before vibrato.
It's a small (or big if you set it to that) up and down vibrating change
in pitch. It gives the sound more live - makes it sound less static.
Violin and guitar players often play vibratos on their instruments by
moving the string a little up an down on the fretboard.
edit [Vibrato Param 01] (As said, points to the speed table)
edit [Vibrato Delay 01] (Adds the vibrato instantly with no delay.
00 here turns vibrato off!)
jump to speedtable
edit [01:0E 0F] and hit [space] to hear a wide (more useless) vibrato.
Speedtable is somewhat different than the other tables. When we use it for
vibrato (other uses will be discussed in Chapter 5) the left byte ($04 in
the second example) indicates how many frames pitch will be changed before
going into the other direction. The right byte ($05 in second example)
tells the value that is added/substracted from pitch value.
So the smaller the left value is, the faster the vibrato will be. The
bigger the right value is, the wider the pitch change will be. Due to the
concept of counting frames before changing pitch into the other direction,
a change of the left value also changes pitch.
Maximum value for left byte is $F7 (127 frames before direction change),
right byte can go up to $FF. There are no signed values used of course.
/ \ /\
/ \ / \
/ \ / \
/ \ / \
/ \/ \
/\ /\ /\ /\ /\
/ \/ \/ \/ \/ \/
Mind: The speed table is the only table that doesnt work "like a program"
it does not contain commands that are executed in series. Every linie
in it is a single entry with no follow up. Therefore we also don't
need the $FF command here.
\_________________________________________________________________________/
_________________________________________________________________________
/ \
Chapter 5 - Pattern editing, Pattern commands, Orderlist
__/Pattern editing
------------------
Now that we know how to make an instrument, we can start making a tune.
00 A-2 01000
|/| |/\ |
| | | \|
| | | Pattern Command (Nothing yet)
| | Instrument number
| Octave
Note value
You can use cursor keys to scroll up and down and note keys like on piano
to enter note values.
Further, INS and DEL can be used to move notes up/down from the position
where you are editing. ENTER inserts a keyoff, which can be used to cut off
notes are played by an instrument with gatebit never off. With shift+ENTER
a keyon is inserted, so you can even "reincarnate" the wave after a keyoff.
Shift+) or ( changes the pattern on the channel you are currently editing.
Hit INS/DEL on the bottom line of the pattern defines pattern length.
There are much more editing keys and shortcuts you can use, but this would
be too much to explain in every tiny detail, and also, every musician tends
to have his own way of editing a tune.
Hit [F12] for help screen and try for yourself what you need for editing.
___________________________________________________________________________
__/Pattern Commands
-------------------
The last three values in a pattern column are used for pattern commands.
0XY - do nothing
Mind: Portamento will only be executed as long as you write the 1/2/3 XY
command in command column.
4XY - Adds Vibrato to the voice, XY points to speedtable. same use as with
instrument vibrato.
CXY - Set filter cutoff to XY. Does not work when Filtertable is also
changing cutoff at the same time.
FXY - Set tempo. $03-7F sets tempo on all channels/patterns. $83-FF sets
tempo for current pattern (substract $80 for the actual value).
$03 is fastest. Tempo $00 and $01 recall the funktempos set by
EXY command.
___________________________________________________________________________
__/Orderlist
------------
By default it shows:
1 00 RST00
2 01 RST00
3 02 RST00
If we move the cursor onto [00] and hit INS, we can add our edited patterns
into the playlist. DEL removes patterns from the list.
So if you hit
[F1] the song will be played back from the start of the orderlist.
Mind: The steps in pattern editor are decimal (00-63), but pattern numbers
are hex. RST00 indicates to ReSTart the song at orderlist position 00.
\_________________________________________________________________________/
_________________________________________________________________________
/ \
[F4] Normally stops playback, but also stops all sound in instrument editor
\_________________________________________________________________________/
_________________________________________________________________________
/ \
* When compiling a song to a .sid file [F9], be sure that all data in the
tables end with an FF command, else table execution overflow will occur
and the song cannot be created.
* It's always a good idea to check your song on a real C64 or using a
hardsid card, some bits might sound complete different on the real thing
(especially filter).
\_________________________________________________________________________/
/ \
mailto: [email protected]