Wave folding implementation


#1

does anyone have any experience with implementing wave folding?

I've done this so far... which seems to work but I'm not sure... and not happy with overdriving the input.

as far as I understand folding is done but passing thru a cos function, and you then offset this by the folding amount.
yes, i know you can do it manually by reflecting, but the cos function seems to be the accepted away.
( note : I want to do keep the fold ration at audio rate, so i get modulate it at audio rate)

what also usually seems to be done is to overdrive (i.e. saturate) the input and output stages with a soft clipping function.
and its this last but I'm not sure about... I'm putting it thru a soft clip, but really I think I should be multiplying it by 1.x but if i do that it seems to hard clip immediately to 1/-1.
how do i overdrive the input, such that i get soft clipping. (like overdrive~)

any other thoughts on wave folding on axoloti?


#2

I'm not following completely here, I need a reference to a definition of "wave folding".

I suggest, to create a sine-function waveshaper, use math/sine, to add extra gain precede math/sine with math/wrap set to perhaps 3 bits, add a math/*c before to add gain control. And +c for offset/bias.
A sine wave (or cosine) is a good function to do repeated folding with a minimum of aliasing artifacts.

If you want to reflect the wave when outside a certain range - like harder than hard clipping, and end up with good quality, I suggest to build it with the dist/rectifier object, that is an alias-reduced version of a halfwave rectifier (y=x>0?x:0).


#3

this is kind of what i was thinking :

https://www.muffwiggler.com/forum/viewtopic.php?p=1763829#1763829


#4

Ohhh, I like this and so my Continuum :wink: (did manage something with oscillot) looking for time…

Some more info for @johannes
http://www.keithmcmillen.com/blog/simple-synthesis-part-8-wavefolding/


#5

ive been interested in this subject and found this topic via Googling, not much happening in Axoloti wavefolding??

i created a subpatch from @thetechnobear and @johannes tips / discussion on wavefolding -

i dont think its perfect, but its working for me at the moment. id like to put this in the community library - what folder would it be filed under??

wavefolder.axs (2.9 KB)


#6

Hi everyone!

I just bought the axoloti for this kind of wave shaping possibility.

Do you think there is a way to morph the cosin function of the folder like in the Make Noise DPO (from sine to spike and then glitched triangle)?

also, is there a possibility to add a "horizontal bias" on the folding instead of a vertical one as in the patch above ? I think the µfold II has something called symmetry. Not sure of understanding everything btw.

At least what is exactly the wrap object and why there is "bits" entry. Why dial 3 ?

thanks everyone and especially Johannes for this wonderful gift.

Knutt


#7

sure, if you want, please take that object apart and edit/add as you see fit, i would like this to more closely mirror something like the ufold

keep in mind that my understanding of dsp is limited, and one of the goals for me (personally) is to better understand dsp through building objects like this and making a hilarious number of mis steps. i cant really explain the math behind what is going on, but read the first few posts and maybe youll understand why the subpatch is the way it is

in regards to your question, however, i built this object from @thetechnobear and @johannes suggestions/conversations on the topic


#8

Thanks for yours anwsers. I just tried some stuff with some feedback on the sine function.
I also added a gross/fine tuning knobs for the folding process.

The Bias is not really useful at the end, i think.

Sorry it's a messy patch, im going to work on it later :smile:

Folder V2.axp (7.4 KB)


#9

this sounds really nice!

the bias is subtle but i hear a difference on my speakers, not sure its 100% necessary or anything

if you dont mind, can you explain what the Feedback Fold is exactly? when I turn the FF dial up. it seems to add a great deal of white noise but not much else


#10

Only tweak the first knob in signal order, the second attenuate to limit digital noise for better musical range. The less you fold the more you can feedback. what it does? I dunno but nice waveshaping

Edit

I made a V3. Start with a sine at low rate to see on the graph how it's working

Folder V3.axp (8.6 KB)