| |
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! |
|
| |
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 |
| |
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 |
| |
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. :) |
| |
linde
Registered: Jul 2006 Posts: 47 |
Thanks! Those ideas and resources will keep me busy for a while. |
| |
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 |