Problem when using pow~ with oversampling

Oct 31, 2012 at 1:17pm

Problem when using pow~ with oversampling

Hello

I programmed a few wave shaper and wave folder modules for my digital modular synthesizer. Because these modules can add lots of harmonics, they all use oversampling (implemented with poly~). They all work, except the most simple one.

See the attached ZIP file:
1. download the ZIP file
2. extract the ZIP file
3. open “test_power_shaper~.maxpat” in Max
4. see the instructions in the patch

What’s the problem?

Surprisingly, some other shapers I programmed use several pow~ objects and work normally (when tested one by one)

Tested with Max 6.0.7 on Windows 7 64-bit

Cheers

#65022
Oct 31, 2012 at 2:51pm

It does work if you set poly~‘s resampling attribute to 0.

This reminds me this old topic:
http://cycling74.com/forums/topic.php?id=36397#post-176724
and after one year, it doesn’t sound to have been corrected…

p

#234459
Oct 31, 2012 at 3:17pm

Thanks for your answer Patrick

But when the resampling attribute is set to zero, there are no more resampling filters. As far as I understand, these filters are anti-aliasing filters, though this is not clearly stated in the manual. I am using oversampling ONLY for reducing the aliasing when the synthesis introduces some frequencies that are higher than sample_rate/2, so turning these filters off is not really possible. Or do I have to program my own anti-aliasing filter, as you do in Pure Data? In this case, which kind of filter is recommended?

About the problem you mentioned with groove~, I confirm it still does not work either :(

To complicate things, I had some other problems with oversampling in Max (still when using poly~), but I don’t really want to post them immediately because it may confuse things a lot.

Seriously, removing aliasing can improve the sound a lot, and in some cases, I don’t know how to reduce aliasing besides “hardcore” oversampling and anti-aliasing filters.

#234460
Oct 31, 2012 at 3:28pm

Just a precision

From a musical result’s point of view, something is missing in the shaper I posted: the input signal (from -1 to 1) should be scaled between 0 and 1 before the shaper processing, and re-scaled between -1 and 1 after the shaper.

But this does not correct the problem

#234461
Feb 11, 2013 at 10:39am

still no serious answer about this

and as I said I found other problems related to oversampling

makes me think it’s actually not possible to use oversampling in Max :(

#234462
Feb 11, 2013 at 12:18pm

did you report this to cycling74 bug reporting?

because to me it seems like a weird pow~ bug. all my other up/down antialiasing sampling works perfectly, but i cannot get your examples to work at all, just as you say.

no idea what it could be.

#234463
Mar 13, 2014 at 3:17pm

Today I tested it again (I check this regularly). It still does not work at all. In the attachment:

* “main2.maxpat” contains an FM oscillator processed into a ring modulator, both 16x oversampled; this patch works

* “main.maxpat” contains an FM oscillator processed into a power function waveshaper, both 16x oversampled; this patch does not work

Sorry for messy patches, I don’t have much time for making them look nice. But if there is a programming error, please tell me

I’m going to report the bug, good idea PID

————-

By the way, what are these “high-quality resampling filters” mentioned in the reference manual? Are they used on the inputs or the outputs of the poly~ container?

#283810
Apr 7, 2014 at 1:08pm

AFAICT, it would appear to be an issue with vb.cheby~ If I add an extra outlet to this poly patcher it works again. So likely, the way vb.cheby~ makes use of input and output signals doesn’t take into account that the input may be reused as the output or something like that.

Please let us know if you can reproduce with a separate patcher that does not use vb.cheby~

– Pasted Max Patch, click to expand. –
#285965
Apr 8, 2014 at 11:08am

The latest on this is that we have found a bug with NANs in pow~ and will have a fix in Max 6.1.7 for it

Thanks for your perseverance, and sorry for the inconvenience

Cheers

-A

#286072
Apr 8, 2014 at 11:11am

Actually, upon further investigation, it turns out that it is from pow~ generating a nan with certain values and blowing up the recursive filters. Sorry for shifting the blame. We can squash nans in pow~ In a future update, but for now you might be able to solve by filtering input to pow and/or using bitsafe~

#286073

You must be logged in to reply to this topic.