Allas, on Fri Dec 2, 2005 9:33 PM, said:
Your music examples always have interesting effects, maybe if you post some source code for study purposes. I remember a time ago a example with violin waves.

Hm... I'm not sure how a source code will help here.
Only a small show of physics may help further more.
Let's say "a" is a placeholder and "*" is a part of a waveform
POKEY produces a sound similar to this:
aa***aaa
**aaa***
it could have been produced with simple squarewave programming or while voice 1 played a part of a wave:
********
aaaaaaaa
and filter voice plays a higher note:
**aaa***
aa***aaa
let's have a different offset between the voices:
we would get a
aaa***aaa (A)
or
a***aaa** (B)
The result is a new harmonic.
Harmonic A has only 2 swtiching points, which results as a lower noise to the ear.
Harmonic B) has 3 switching points which sounds higher than A.
Using 15kHz is making the "new harmonics" more "hearable". At 64kHz the sound distorts in a full wrong way.
So all we have to do now, is to handle the offset between the filter-voices.
The best way I found, was to use the highest playable note on both channels, for a short time. Then the "final" offset can be programmed by short filter changes for programming tones, between the 8-bit resolution. But the programming time in every tracker takes too long. Which means one change every vbi. But the programming would be necessary during one VBI Cycle. Then the filter sound can be played while a G2F kernal is running... from one VBI to the other, letting pokey the necessary work do.
Handling the different notes with correct filter effects, means to handle the filteroffset, different for almost every note.
The higher the note, the shorter the offset time has to be.
The Offset time in trackers is almost VBI speed. And inside th VBI we always have the same time (cycle count) between the generator programming.
In theory the programmed resolution can be much higher than 16bit, depending on the precision of "offset" programming.
In RMT I'm handling the "offset" by switching the filter one step down and one up, or vice versa, every VBI step. It makes short notes impossible, because up to 5 or 6 vbi steps are necessary to have the wanted tone & variation.
The timing dependency you can see if you try it yourself in rmt and move the filter down/up on different positions.
Simple one:
Command: 16666
value****: 0f000
value****: 1f000
Or changing it to
Command: 16666
value****: 0f000
********: 1f000
Or
Command: 16666
value****: 0f000
********: 1e100
a.s.o.