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: 702
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: 702
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: 1627
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
Honcho
t0m3000/ibex-crew
MCM/ONSLAUGHT
Colt45RPM
Steel/SCS&TRC/G★P
Guests online: 122
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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