[music-dsp] Wavetables - real life noise levels.

Wilfried Welti wwelti at vme.de
Tue Aug 1 08:10:29 EDT 2000


> If Andy as achieved a -140dB noise floor from his wavetable oscillator then
> he deserves a medal, I reckon!

I want one too :) It should not be difficult to get even better results,
if you use 64 bit float for example. Of course the output audio format
is a quite limiting factor, so -140 db indeed sounds like a pretty good
result when using a 24 bit format.

> (1) aliased spectral components below the fundamental frequency on a
> freq/mag plot
> This is when the harmonic content of the wavetable contains a strong
> frequency greater than nyquist after pitchshifting, and it "wraps" around
> just as we all know and hate. Usually happens when, for example, a wave is
> bandlimited to nyquist/4 and then pitch shifted up to above nyquist/2, or
> when the wave is decently bandlimited at all. If you manage to get a really
> well bandlimited wave, and never pitch shift up more than an octave you
> won't get too much of this problem.

You can get rid of this with wavetables. Obtaining well bandlimited
looped waves is no problem at all, since they can be converted "lossless" 
between spectral and time domain. So, for the special case of looped waveforms,
you can use a "perfect" brickwall filter this way, which would not be possible 
for not looped signals.

Usually i switch between the different waveforms "on the fly", when doing slides
with the oscillator. As long only frequencies near the nyquist appear or dis-
appear, this should be no problem. Since i use waveforms of equal size, there
are no "interpolation caused" problems, when doing this.

> (2) aliased spectral components visible in between the harmonic peaks of the
> wave on a freq/mag plot
> Not sure how this could creep in if someone was using the described additive
> wave of creating the wave tables. However, my experiments with using
> filtered samples for the wavetable have tended to have this problem, and
> I've seen it in almost every commercial softsynth too. I guess it's a result
> of ineffective bandlimiting, maybe? If enough of the signal above nyquist/4
> escapes the bandlimited filter whilst you're making the wavetable, when you
> pitch shift up that long tail of spectral components will wrap around and
> mix in with the harmonics that are supposed to be there.

As said above: If you use looped waveforms, you can use a "perfect" filter by
transforming it 1:1 into frequency domain, zeroing away all frequencies above
nyquist, and transforming back. So, no tail to wrap around.

> (3) digital artifacts resulting from poor interpolation
> I've played with a number of interpolation algorithmns and they all
> contribute a certain amount of their own noise. Here's what I found:

> - Nearest neighbour is gritty and nasty. 

Sure it is :)

> - Linear interpolation is less gritty, but very noticeable on pitching down.

Not as long your wavetables are big enough. After all, it's just interpolating
added up sines. The only problem here: The waves have to be quite big for low
frequencies. Depending on the application, this could be affordable though.

> - 3-point cubic spline (Hermite?) - Very nice results when shifting up and
> down, some artifacts still present though.
> - 5-point cubic spline (I got this, and the above from a contributor on
> comp.dsp - I might repost it here if people want it) - top quality results,
> almost perfect. Performance issue, though.

just a the usual trading between memory and speed. But it should be no problem
to find a good deal for really high quality at acceptable speed and mediocre
memory needs.

> - Sinc interpolation - almost perfect, but very slow
> Windowed-Sinc interpolation - perfect. Could make a cup of tea before the
> sound comes out though :-) I found this was good to use if you wanted to
> make a sample fit a particular wavetable size, though. Take a G from a synth
> and then resample it to exactly 2048 samples or whatever for the wavetable.
> Got code to do this if people need it.

Yes, that's quite good for this purpose :)

> I wouldn't want to stick my neck out too far, but I reckon the current
> version of the Atom has got a pretty clean sound from a wavetable synth, but
> the noise floor is still pretty high. It uses filtered samples from a Juno
> 60 and Juno 2, one per octave (4096,2048,1024 etc samples in size) and
> linear interpolation. I'd like to hear Andy's, though!!

Hm, i must admit i have not measured it yet at a really precise level. But
when loading a sample generated with my synth into cooledit, and doing
a frequency analysis, i see only peaks at the harmonics. In between, the
plot goes straight down below -99 db(which is the end of the scale). Anyway,
this is a 16bit output, so it's limited by that anyway. 
BTW, this version of the synth uses only linear interpolation , only 32bit
float, and only 512 samples per waveform.

I'd have to do some real measuring to tell more, i guess.


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links

More information about the music-dsp mailing list