[sdiy] [synth-diy] integer sample period oscillator

cheater00 . cheater00 at gmail.com
Fri Feb 14 16:07:14 CET 2014


On Wed, Feb 12, 2014 at 2:03 AM, Scott Nordlund <gsn10 at hotmail.com> wrote:
> On Tue, Feb 11, 2014 at 8:40 AM, cheater00 . <cheater00 at gmail.com> wrote:
>> On 11 Feb 2014 06:01, "Scott Nordlund" wrote:
>>> Continuous pitch modulation is problematic because the nature of the
>>> spectral distortion depends on pitch. A static waveform
>>> is exactly periodic, but a continuous sweep actually resembles ordinary
>>> aliasing. Other forms of modulation essentially only happen
>>> discontinuously.
>>
>> What if you dithered the period length? Maybe noise-shaping it would
>> make the transitions less niticeable?
>>
>> D.
>
> That's exactly what I did. Think about it this way: for a phase accumulator
> oscillator making a trivial sawtooth waveform with a period of 2.33... samples,
> the length of each period in samples will be 3, 2, 2, 3, 2, 2...

On Fri, Feb 14, 2014 at 3:56 AM, Scott Nordlund <gsn10 at hotmail.com> wrote:
> I need to record some better examples and write something a that's little more
> clear, but I've been too involved in other stuff lately. Writing is the tedious part
> that comes after I've already had all the fun, so it's easy to put off indefinitely.
> The only other info I have on this for now is in a gearslutz thread, which includes
> some samples:
> http://www.gearslutz.com/board/electronic-music-instruments-electronic-music-production/826280-taxonomy-early-digital-synthesizers.html
> I don't think it's really satisfactory, but it's all I have at the moment. It covers the
> math and everything, at least.

The demos 8-10 and associated descriptions explained the approach
wonderfully. However I notice that you seem to limit yourself by
keeping the pitch constant during a whole period. Instead, you could
dither on sample level. This is not possible with wave tables but is
possible with synthesized waveforms.

Another path of optimization is to optimize the bit depth. You can do
this with synthesized waveforms.

You can also shape the noise, giving it a different distribution. The
distribution could cover frequencies other than just the two nearest
to the desired frequency. So you don't have to rapidly switch between
the two nearest frequencies, you could switch to the two next-nearest
as well. And then even less frequently to the next two, etc. The
probability of switching to a specific frequency for a sample could be
a function of distance of that frequency to the frequency that is
desired. This would give you a persistent noise figure whether the
desired frequency falls on an allowed frequency or not.

And then you can also change how much the loop adds to the
accumulator. So instead of adding 1, it could add 2, 3, etc. Or maybe
you want it to always add 2^10=1024 (and your accumulator is 64 bits
in total), but to noise shape things you'd sometimes add a bit more
and sometimes a bit less.

If you showed demos of sine waves derived from triangles using those
same synthesis techniques as in demos 1-10, you would have much more
freedom in optimizing the synthesis methods. Do a simple
accumulator-based triangle wave, do demos 1-10, and use a "perfect"
sine shaper on the triangle. You might get much further and judging by
your demos you might get to inaudible artifacts without oversampling
(given a perfect sine shaper).

D.



More information about the Synth-diy mailing list