Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Sample playback methods
2010-05-02 22:14
linde

Registered: Jul 2006
Posts: 47
Sample playback methods

I know about simple $d418 modulation, and I think I've got a good understanding of the 8-bit playback in Vicious Sid (and the brilliant monitor interference trick).

What I'm looking for in particular is 1-bit sample playback. I've experimented with a couple of methods:

- Setting a voice at frequency 0 and modulating the pulse width. This approach interestingly worked well in VICE, but failed to produce sound at all on a real setup.

- Setting the pulse width on a voice to 0, and alternating between $29 and $49 in the voice control register, which worked well both in the emulator and on a real setup.

The benefits of doing it on an oscillator level in my case is that the output can be filtered, and it's very easy to do it.

I'm interested in other techniques (for any bit-ness), or if anyone knows an example of the latter technique in particular, I'd like to know that, too.

Good night!
2010-05-02 23:58
algorithm

Registered: May 2002
Posts: 705
One Bit sample output would sound horrible (with the exception of speech that is normalised and amplified in such a

way which generates more transitions of off/on

PWM (which would read data (eg 4 bits) and then feed a pattern of 0/1 values (to simulate the amplitude) may work

but this would require a sample rate many times higher and defeats the whole objective.

However onebit data decompressed to 4/8 bit would sound quite decent in comparison

Delta modulation is the easiest method of using one bit data and then transforming this to 8bit (eg bit 0 would

subtract and bit 1 would add) to the current value.

Another method would be the cvsd approach which would increase/decrease the step value based on how many

consecutive 0's or 1's in the data

Another alternative which works better than the above is to dynamically change the step amount for a given chunk

that would generate the least error. This would require an additional 4 bits (16 step values) for every 32

bytes/64 bytes etc
2010-05-02 23:59
algorithm

Registered: May 2002
Posts: 705
One Bit sample output would sound horrible (with the exception of speech that is normalised and amplified in such a

way which generates more transitions of off/on

PWM (which would read data (eg 4 bits) and then feed a pattern of 0/1 values (to simulate the amplitude) may work

but this would require a sample rate many times higher and defeats the whole objective.

However onebit data decompressed to 4/8 bit would sound quite decent in comparison

Delta modulation is the easiest method of using one bit data and then transforming this to 8bit (eg bit 0 would

subtract and bit 1 would add) to the current value.

Another method would be the cvsd approach which would increase/decrease the step value based on how many

consecutive 0's or 1's in the data

Another alternative which works better than the above is to dynamically change the step amount for a given chunk

that would generate the least error. This would require an additional 4 bits (16 step values) for every 32

bytes/64 bytes etc
2010-05-03 09:10
Frantic

Registered: Mar 2003
Posts: 1648
I updated the following sections on Codebase a little:

http://codebase64.org/doku.php?id=base:sid_programming#samples_..

No new material, but I added links to some of the articles in C=Hacking on the topic of digis.

In addition, there was also some sort of method used by Ninja in Darwin which I don't think is covered there. Can't remember exactly now, but I think it was some sort of Pulse Width Modulation in that case too.

I am not aware of any other fundamentally different methods of sample playing on the SID than PWM, $d418 and the Vicious SID trick of "seeking" oscillator values. I mean, methods that are actually sensible. Of course one could come up with all sorts of weird settings of the registers in order to get some digi-like playing capabilities, a bit like you seem to be experimenting with. :)
2010-05-03 14:46
linde

Registered: Jul 2006
Posts: 47
Thanks! Those ideas and resources will keep me busy for a while.
2010-05-03 15:10
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Linde, what exactly do you want to do ?

a recognizable speech at least needs 2 bit, and will sound like space taxi, or chimera, suicide express.

just hack space taxi, its so simple, you dont need all this bs talk :D
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
ΛΛdZ
Bieno/Commodore Plus
algorithm
E$G/HF ⭐ 7
zscs
MWR/Visdom
Visage/Lethargy
Jazzcat/Onslaught
Guests online: 135
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.048 sec.