| |
hevosenliha
Registered: Sep 2008 Posts: 48 |
Problems with vicious_sid_demo_routine_explained
From the page at http://codebase64.org/doku.php?id=base:vicious_sid_demo_routine..
"I thought this would add a high pitched carrier noise to the sound. However, this doesn't happen. The reason will be explained later. The beauty of this implementation is indeed that a stable raster isn't required."
However, I get exactly this problem. Some replay frequencies works ok, some times.
Is the code/comments correct? What am I doing wrong? I get a feeling that I really do need a stable raster for this. |
|
| |
Mixer
Registered: Apr 2008 Posts: 452 |
Theory is: When one is using 2 sid voices interleaved to play samples with 8-bit method, the sum of the samples at the sid output is the average of the two oscillators being sampled. This averaging is in effect a low pass filter that filters out the high pitch carrier and small jitter effects, and stable replay may not be necessary.
But, when one uses single sid voice for 8-bit play, then all the manipulations are heard in the sound and timing needs to be stable and in generally register manipulations very short.
Might the replay frequency be an issue? Yes.
The optimal replay frequency is that 7819hz, or about 2 rasterlines per sample per voice. This is due to the maximum frequency that oscillator can reach max value with triangle.
One can of course use other replay frequencies - higher frequency leads to lower overall amplitude as the triangle wont reach its peak ever. At lower frequency the triangle starts to go down already before sampling and sound gets distorted.
|
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Saw wave can be used if lower frequencies (about four raster lines, 63*4 = 252 cycles < 256 cycles wrap-around) are desired for some reason. At least if I remember correctly. :) |
| |
algorithm
Registered: May 2002 Posts: 705 |
Saw wave works rather well at one sample update per 4 raster lines (anything more than this and distortion occurs however) Furthermore using the dual cascading method at 1 update per 4 lines even without stable NMI does not emit that much jitter noise.
If it is absolutely necessary to update each sample over 4 raster lines (eg one sample per 8) then just ensure that the sample(or interpolated etc) is updated every inbetween line.
The 'jitter' noise is very much apparant however when updating 1 sample per 2 lines via non-stable nmi and cascading two channel method (triangle) (hear the vq-mania and amadeus demo's for this noise example :-))
|
| |
hevosenliha
Registered: Sep 2008 Posts: 48 |
Thanks for the replies!
I'll investigate further, and perhaps change my approach a little... |