| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
SID voice differences
Is there any documentation anywhere about differences between the three voices, beyond the 3-off bit in $d418?
I'm playing ~2KHz truncated* triangle waves on all three voices, precisely 1/3 of a phase apart. This should get me something with harmonics that are all a multiple of 6KHz, yet ReSID-fp is still giving me a faint 2KHz whine, for every SID model I've tried.
I do have the ReSID source, but it's a tad opaque.
*truncated by setting frequency to zero for a bit at the top and bottom of each wave. Long story.. |
|
| |
Mixer
Registered: Apr 2008 Posts: 452 |
To my knowledge, and the available sources:
the oscillator part of each voice is same,
except for the msb of the triangle and
osc=0 routed to the next voice
for sync and ring modulation.
also the third voice oscillator and adsr values are readable from d41b and d41c.
each or all voices or ext-in can be routed via filter by selecting bits from filterctrl register and 3rd voice can be silenced.
What you should get is the avg of the three voices. Unless you have some differences between voices in ADSR settings, or filter routing or sync/ring/testbit set or the 3rd voice muted.
Have you checked that the wave you get of each oscillator is what you wish? jsidplay graphics or by recording? |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Interesting. I'm wondering whether I'm a cycle or two out with some of my writes, in that case - I'll check my code again.
Currently I'm just using Audio Hijack to capture output from VICE, so it's been resampled down to 44.1KHz before I get a chance to look at it.
The three voices all look approximately like I'd expect if I play them individually, but without 985KHz output it's hard to be sure.
Thank you! |
| |
Mixer
Registered: Apr 2008 Posts: 452 |
Just out of curiosity.
Shouldn't three signals 1/3 apart cancel each other out?
Add sin(0+t)+sin(2pi/3+t)+sin(4pi/3+t), you get 0 or very close to it all the time. t being sampling interval or time. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Just out of curiosity.
Shouldn't three signals 1/3 apart cancel each other out?
Add sin(0+t)+sin(2pi/3+t)+sin(4pi/3+t), you get 0 or very close to it all the time. t being sampling interval or time.
That assumes the waveform generator's output is signed, is it? Is triangle really from [-1..1] or is it some 0..x value? I don't know anything about SID internals though... :) |
| |
Mixer
Registered: Apr 2008 Posts: 452 |
Quote: That assumes the waveform generator's output is signed, is it? Is triangle really from [-1..1] or is it some 0..x value? I don't know anything about SID internals though... :)
Oscillator gets values from most significant byte of 24 bit internal register, and it has values from 0 to 255.
2 signals of full amplitude and opposite phases would cancel out but generate a constant "dc" offset of 128. Since it is constant, we cannot hear any sound.
To my understanding this should be true to 3 equal signals of 1/3 phase offset and their "dc" offset should be constant in the same fashion, and we cannot hear any or if we hear any, it is due to rounding and timing.
I am often wrong though. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: Just out of curiosity.
Shouldn't three signals 1/3 apart cancel each other out?
Add sin(0+t)+sin(2pi/3+t)+sin(4pi/3+t), you get 0 or very close to it all the time. t being sampling interval or time.
yes: https://www.wolframalpha.com/input/?i=plot+sin%280%2Bx%29%2Bsin..
question is if christopherjam wants to test resid fp or real sid ? another question is how summing happens. I'd place my bet that its analogue. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
I am indeed aiming for compete silence.. for now..
I would expect a slight noise at three times the base frequency due to nonlinearities in the ADC, but nothing at all at 2KHz. |