Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Wavetable Osc fail

DSP related issues, mathematics, processing and techniques

Wavetable Osc fail

Postby MyCo » Sun Dec 28, 2014 5:35 pm

Hi,

I'm getting a weird problem when using the wavetable oscillator and playing back a saw wave (any wave with many harmonics, would do it too). When I play it very low, so that I get all of the frequencies in the wavetable into the audio band, I get this:
spec.jpg
spec.jpg (64.82 KiB) Viewed 29042 times


The wavetable I'm using is 2048 samples long, and the osc is playing at 8.1758 Hz. The weird peak you see there is exactly at the nyquist frequency of the wavetable wave (ignore the cursor tooltip in the image):

(2048 / 2) * 8.1758Hz = 8372.0192Hz

Any idea, why this happens? And how do I get rid of that. When you compare it with other synths you can clearly hear a difference...
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Wavetable Osc fail

Postby martinvicanek » Sun Dec 28, 2014 7:35 pm

Hard to tell without the schematic. ;) I assume you are using a custom wavetable as the FS WTs are shorter? How is it organized? How do you interpolate? If you don't want to disclose your algo, perhaps you could PM?
User avatar
martinvicanek
 
Posts: 1318
Joined: Sat Jun 22, 2013 8:28 pm

Re: Wavetable Osc fail

Postby MyCo » Sun Dec 28, 2014 8:13 pm

There is nothing special to it. It's just a normal create wavetable / read wavetable schematic.

Haven't found any FFT inside FlowStone that can meassure the problem. But it's there and with FFT Plugins you can see it pretty well. I use for example MAnalyzer: http://www.meldaproduction.com/plugins/ ... =MAnalyzer

I found a workaround but I'm not sure why this fixes the problem (And it's not a good solution): I remove the top frequencies of the orignal wavetable input array (2048 samples FFT -> zero 200 samples in the middle to remove high frequencies (with a smooth slope) -> iFFT -> wave table)
Attachments
Just a wavetable.fsm
(18.56 KiB) Downloaded 1153 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Wavetable Osc fail

Postby MyCo » Sun Dec 28, 2014 8:21 pm

Here is the workaround, that I described above. It looks like that:
workaround.jpg
workaround.jpg (61.36 KiB) Viewed 29032 times
Attachments
Just a wavetable (Workaround).fsm
(45.29 KiB) Downloaded 1114 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Wavetable Osc fail

Postby RJHollins » Sun Dec 28, 2014 8:34 pm

I don't know the answer nor solution ... but a speculation ...

Is there some aliasing folding back into the audible range ??

I'm sure you are knowledgeable about all this ... but this is maybe a possibility :roll:

i don't know.
RJHollins
 
Posts: 1568
Joined: Thu Mar 08, 2012 7:58 pm

Re: Wavetable Osc fail

Postby KG_is_back » Sun Dec 28, 2014 9:06 pm

I see it too, with meters in FS. The wavetable osc in FS works in a way, that it creates a list of wavetables. Each wavetable has one less higher harmonic then previous one, second to last has only the base frequency and the last one is silence (used when you input frequency above Nyquist into the oscillator). The osc simply picks the wavetable which will not cause aliasing but still contains the most frequencies.
Only aliasing can be caused by linear interpolation in the osc module, but why it would specifically lie at nyquist frequency is a mystery to me. However, it is not hard to imagine, that lower the frequency the more pronounced will the distortions of linear interpolation will be...


EDIT: it is the linear interpolation causing havoc. When it interpolates it creates harmonics that are multiples of Nyquist. I have found another harmonic exactly at 2*nyqist of the wavetable and 3*N as well.
Last edited by KG_is_back on Sun Dec 28, 2014 9:09 pm, edited 1 time in total.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Wavetable Osc fail

Postby tester » Sun Dec 28, 2014 9:07 pm

Can this be related to interpolation? If you have 2048 samples long cycle, it means that 1:1 at 44.1kHz is played at 21.5Hz (f=44100/2048) if I understand this correctly. Which means that at lower frequencies - content may be (may be?) added or changed, depending on interpolation method and rescaled shape.

//edit: we wrote at the same time. :mrgreen:
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Wavetable Osc fail

Postby tester » Sun Dec 28, 2014 9:13 pm

In other words - waveread with different interpolation within it - could solve it? (+ phase and resync nodes somewhere).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Wavetable Osc fail

Postby MyCo » Sun Dec 28, 2014 9:15 pm

It's not related to interpolation, I've decoded the wavetable primitive's code and changed interpolation to B-Spline, Hermite, Lagrange... doesn't matter. It affects only the smaller distortions around that peak but not the peak itself. I'll make a cleaner schematic of my tests.
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Wavetable Osc fail

Postby MyCo » Sun Dec 28, 2014 9:21 pm

Ok, here my tests with different interpolations. The problem is the same. The first spectrum image that I posted was infact from the b-spline interpolation, as this cleans out the surrounding interpolation noise.

This is how it looks like with standard linear interpolation
linear.jpg
linear.jpg (58.66 KiB) Viewed 29019 times
Attachments
Just a wavetable (different interpolations).fsm
(24.03 KiB) Downloaded 1124 times
Last edited by MyCo on Sun Dec 28, 2014 9:26 pm, edited 1 time in total.
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Next

Return to DSP

Who is online

Users browsing this forum: No registered users and 5 guests

cron