Athlor wrote:A question for him is what's the sampling rate for the samples? Is there any easy tool around to make 4-bit samples from 8-bit ones or even combine them?
It's been a while, so I forget what the original sampling rate was!

8Khz maybe? But I re-processed them quite a bit. Here is a technical article I wrote for our club newsletter back then that fills in some of the details.
The World's Smallest "DIGI"!
By Leif Bloomquist
About Digis on the Commodore 64
As a Commodore owner, you're aware of how innovative the SID chip was for its time, with its three voices and different waveforms. But the
SID has another way to produce sound - a "fourth voice", if you will,
in the form of digitized sound samples. These are usually referred to
as "digis".
Digis work by manipulating the volume register (54296 or $D418 hex) at
high speed. You can hear this effect yourself. Turn on your C64,
turn the volume on your monitor or speakers up a bit, and then type:
POKE 54296,15
You will hear a slight "pop" from the speaker. The effect is even
more pronounced on older C64s, due to a slight design flaw in the SID
circuit. But this flaw was used by programmers to great effect for
digitized speech or drums in game music.
By changing this register very quickly, you can play back digitized
samples on the C64. With 4 bits dedicated to the volume register, you
even get 16 levels of sampling resolution which makes them sound even
better.
The TinySID Contest
The TinySID contest, organized by Stefano Tognon in Italy, is an
"online C64 music-programming competition made in love of SID music."
It challenges people to write songs for the C64 and SID chip, that are
either 256 bytes (yes, *bytes*), 512 bytes, or 1,024 bytes (1KB) in
length.
The website for the contest is here. This is the second year it has been held.
http://digilander.libero.it/ice00/tsid/ ... index.html
I decided to enter the contest this year. I had been playing around
with digis on the C64 and thought - what is the smallest digi
possible?
With some experimentation, I found that 256 byes was about the
smallest digi that still sounded good. Any less than that and the
sample became too rough and crackly.
However, I still needed room for the code to play back the digi, and
to store the notes for a short "song". So I would not be able to
enter the 256 byte category, I had to move up to the 512 byte
category.
Creating the Mini Digi
To start, I needed samples to work with. Note that a digi has 4-bit
resolution, but a byte has 8 bits. So I was actually able to cram
*two* digis together, one in the upper four bits, and one in the lower
four bits.
Also, it is possible to change the pitch or frequency of a digi, by
playing it back faster or slower. So I decided to make my entry a
drum solo, with two different instruments. By changing the pitch, I
could simulate more instruments.
To create the drum sound digis, I used a Windows program called
'FruityLoops'. Fruityloops (
http://www.fruityloops.com) is a PC-based music and "looping" software for creating electronic music. I created a
bass drum sample, and a snare drum sample.
From there, I manipulated the sample in another Windows program called
GoldWave (
http://www.goldwave.com) to be only four bits per sample. Finally, I wrote my own software in Microsoft Visual Basic (the modern version of BASIC on the C64!) to change the samples so they contained only positive numbers.
Now that I had my samples, I needed to write software in Machine
Language on the C64 to play them back. Machine Language is necessary
to get the playback speeds, BASIC is too slow!
Each note in the "song" has three elements:
-Which sample to play (1 or 2)
-Playback frequency
-Duration (time before the next note)
I came up with a scheme where I could pack all this information into a
single byte. The highest bit determined the sample. Three bits were
used for the playback frequency. Four bits were used for the
duration. This way, I had 16 choices for the duration, which could be
evenly divided into whole, quarter, half, and sixteenth notes. I used
the C64's Jiffy clock to determine the elapsed time.
By changing the frequency, I could simulate other instruments: When
sped up, a bass drum sounds like a tom-tom drum. A snare when played
faster sounds like a hi-hat.
Pulling it all Together
The last thing to do was to actually write the drum solo. Using Excel
on the PC, I generated a spreadsheet that would allow me to easily
write the song as a series of notes. Excel would then "pack" the song
into the bytes using the format described above.
I assembled the song, software, and digis together using the DASM
Assembler (
http://www.atari2600.org/DASM/) on my PC and transferred it
to my C64. From there, I tweaked the solo a little bit and went
through a few iterations until I was happy with how it sounded.
Here's the breakdown of the final program:
Samples: 256 bytes
Playback code: 143 bytes
The song: 109 bytes
TOTAL: 508 bytes
Then two bytes are needed for the load address ($0801) and I was done,
with two bytes to spare!
If you want to learn more, the source code to the program is available
at the contest website (given above), along with all the other
entries.