How to wavefold without wavefolder module?

Cwejman, Livewire, TipTop Audio, Doepfer etc... Get your euro on!

Moderators: Kent, Joe., analogdigital, infradead, lisa, parasitk, plord

Post Reply
User avatar
Devilwidget
Wiggling with Experience
Posts: 372
Joined: Thu Oct 17, 2013 3:27 am

How to wavefold without wavefolder module?

Post by Devilwidget » Sat Jan 19, 2019 6:13 am

I think I understand in principal how to wavefold a signal, using a rectifier, adding gain, and mixing it back in with the original signal. This certainly give me somewhere in the region of a single 'fold', but is it possible to create the multiple folds that a dedicated wavefolder module will create? What are wavefolder doing that a rectifer is not to add multiple folds?

User avatar
luketeaford
Super Deluxe Wiggler
Posts: 1478
Joined: Wed Jan 08, 2014 9:54 pm
Location: Columbus, Ohio
Contact:

Post by luketeaford » Sat Jan 19, 2019 10:35 am

I am curious to know more about this electronically-- I have some observations based on how I've managed to patch it and things I've learned (or at least partially understood) from Rob Hordijk.

If I am not mistaken, he gives a few clues in this talk: waveshaping is always dependent on amplitude and it works somehow by FM of 0 pitch which goes way beyond my understanding of how or what that means. Rob Hordijk on Waveshaping

I think this kind of sound is 100% different from the kinds of sounds you get from the kinds of harmonic waveshaping between even/odd harmonics, but I'm not certain.

Here are a few threads with workable waveshaping patching strategies:
Waveshaping with Optomix V2

Waveshaping with Maths

Waveshaping with Moddemix

User avatar
Navs
Super Deluxe Wiggler
Posts: 4052
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Post by Navs » Sat Jan 19, 2019 10:36 am

It is usually using multiple stages, one folder or rectifier followed by another.

Footkerchief
Super Deluxe Wiggler
Posts: 1044
Joined: Thu Jan 22, 2015 10:43 am
Location: you can't tell me I'm not in space

Post by Footkerchief » Sat Jan 19, 2019 12:29 pm


User avatar
mskala
Super Deluxe Wiggler
Posts: 2466
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto

Post by mskala » Sat Jan 19, 2019 10:29 pm

Try running your signal through a quantizer and subtracting the original signal from the quantized version.

User avatar
sko87pro
Wiggling with Experience
Posts: 339
Joined: Sun Oct 22, 2017 6:38 am

Post by sko87pro » Mon Jan 21, 2019 2:56 am

Try running your signal through a quantizer and subtracting the original signal from the quantized version.
This is great - never thought of this. Must try!

Instead of a quantiser, why not a S&H?

Now I’m wondering how to insert a Comparator controlling a S&H so that above a certain level the fold (subtraction) happens, but otherwise it doesn’t?

User avatar
rjungemann
Ultra Wiggler
Posts: 828
Joined: Sat Mar 03, 2012 2:18 pm
Location: San Francisco, CA, USA

Post by rjungemann » Mon Jan 21, 2019 5:05 am

Running a signal through a quantizer is similar to bit rate reduction on a bitcrusher.

Running a signal through a S&H is similar to sample rate reduction on a bitcrusher, with the sample rate determined by the clock signal.

Wavefolding is just one form of waveshaper. You can accomplish it by running a signal through an amplifier so the amplitude goes past some sort of minimum and maximum (such as +/-1.0), then running the result through a cosine function.

If, instead of running the signal through a cosine function, you run it through a hyperbolic tangent function, you get a soft clipping waveshaper, which is a pretty good approximation of overdrive.

You can see the cosine and hyperbolic tangent examples in the screenshot.

Image

You can use many mathematical functions to create various interesting waveshapers. Hard clipping can be done with a mathematical function with a condititional, like "If n is greater than 1.0, then return 1.0. If n is less than -1.0, then return -1.0. Otherwise return n".

Wavetables can be used as waveshapers, by using the wavetable as a lookup table by amplitude. This is how the WMD Geiger counter waveshaper works (although it also has a bitcrusher, filter, and distortion circuit). The Wiard Waveform City can be used as a wavetable oscillator or waveshaper.

I wrote a wavetable-based waveshaper that runs on a Maple, which is like an Arduino. It should run with little or no modification on any Arduino-compatible device which has a DAC and is fast enough.
My modular (ModularGrid). Check out my new synth-pop album, Umbram.

Pille64
Learning to Wiggle
Posts: 24
Joined: Sat Nov 18, 2017 5:46 am
Location: Germany / Sweden

Post by Pille64 » Mon Jan 21, 2019 5:30 am

very Interesting. Highly aprreciate your explanations. Kind regards !

User avatar
sko87pro
Wiggling with Experience
Posts: 339
Joined: Sun Oct 22, 2017 6:38 am

Post by sko87pro » Mon Jan 21, 2019 7:53 am

Great stuff on this thread! Must try some of the above with a ‘scope hooked up so I can see. Will start with the “S&H subtraction” formula. So cool!

User avatar
Rex Coil 7
Super Deluxe Wiggler
Posts: 6271
Joined: Thu Nov 29, 2012 11:29 am
Location: Captain Of Outer Space

Re: How to wavefold without wavefolder module?

Post by Rex Coil 7 » Mon Jan 21, 2019 8:40 am

Devilwidget wrote:...What are wavefolder doing that a rectifer is not to add multiple folds?
The wavefolder adds gain to the output. The diodes suck a lot of gain from the input signals. Most wavefolders also provide convenient inputs for voltage control of various functions.

But reduced to the salt, the powered wave folder is providing "make up gain" to the output. Pretty much like the powered ring modulators ... there are gain stages added to boost the output since the diode ring sucks so much voltage out of the signal.

Unless you build either the wavefolder or the ring modulator using LEDs as diodes. With LEDs there is FAR less gain reduction.

Image
Never Quit, Die Falling Forward
5U PROJECT - (skip pages 4 through 6, boring junk) ... https://www.muffwiggler.com/forum/viewt ... highlight=

User avatar
rjungemann
Ultra Wiggler
Posts: 828
Joined: Sat Mar 03, 2012 2:18 pm
Location: San Francisco, CA, USA

Post by rjungemann » Mon Jan 21, 2019 1:35 pm

My suspicion is that it will be difficult or impossible to simulate wavefolding with other modules, but certainly there are dozens of ways of waveshaping which will yield interesting results.

The ufold demo video on this page is how I understood what wavefolding does.

I did forget to mention that there are other wavefolding techniques. IIRC the Topobrillo Triple Wave Folder can do more of a "hard reflection" style vs. the ufold's softer approach where the wave seems to curl in on itself.
My modular (ModularGrid). Check out my new synth-pop album, Umbram.

User avatar
defalut
Common Wiggler
Posts: 222
Joined: Tue Oct 23, 2018 8:26 am
Location: Sweden

Post by defalut » Tue Jan 22, 2019 9:38 am

Maybe not folding but you get the idea hopefully, in this he morphs waveforms without wavetable synths..

User avatar
mskala
Super Deluxe Wiggler
Posts: 2466
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto

Post by mskala » Tue Jan 22, 2019 10:35 am

Interpolating scanner; input audio into the control input, positive offset into the even-numbered inputs, negative into the odd-numbered.

Alex January
Learning to Wiggle
Posts: 2
Joined: Tue Mar 05, 2019 9:30 pm
Location: Paris

Post by Alex January » Sun Mar 31, 2019 12:06 pm

You can make a primitive kind of wavefolder with two "east coast" oscs by phase-syncing and frequency-modulating the 1st osc with the square output of the 2nd osc, while sending the same 1v/o signal to both. Listen to the sine from the 1st osc (and check it on an oscilloscope): it'll be wavefolded! You'll then be able to set the harmonics symmetry (ie. which overtone frequencies are highlighted) by changing the pitch of that osc and you'll control the harmonics order (ie. multiply your overtones) by setting the fm ratio (at least until 12 o'clock, past that you are in pure FM territory), and also a little bit by modulating the pulse width of the 2nd osc. Send the sine waves from both oscs into a mixer and you'll have a timbre control, going from pure sine to wavefolded sine. Patch your fm modulation through a vca and you'll be able to automate your wavefolding modulation.

User avatar
starthief
Super Deluxe Wiggler
Posts: 3774
Joined: Tue Oct 04, 2016 10:39 am
Location: St Louis, MO
Contact:

Post by starthief » Sun Mar 31, 2019 2:11 pm

luketeaford wrote:If I am not mistaken, he gives a few clues in this talk: waveshaping is always dependent on amplitude and it works somehow by FM of 0 pitch which goes way beyond my understanding of how or what that means.
That's on the right track. I've been playing with both wavefolding and phase modulation on the ER-301 thanks to a couple of helpful things I found online:

http://wiki.openmusiclabs.com/wiki/Sinulator

https://www.researchgate.net/figure/Tra ... _321985944

For basic wavefolding: map the input onto a sine function. Amplify the input to increase the amount it gets folded.

(For subjectively nicer wavefolding, the transfer function in that second link is what a single stage of the middle section of the Serge Triple Waveshaper does. Run the output of that stage into another stage, as many times as necessary... but honestly, one or two already sounds pretty good.)

For phase modulation, you mix two signals and map the result onto a sine function, just don't crank the gain as you do in wavefolding.

This is pretty much how FM Aid works as well as the Sinulator, and the Yamaha DX series (digital sawtooth oscillators mixed and fed into sine lookup tables).

You should be able to use a triangle-to-sine shaper, Geiger Counter or Megawave, Piston Honda external input, etc. Or a VCO that can drop to LFO rate but does thru-zeru linear FM -- like the E370 for instance. It's not perfect but it gives kind of a cool character.
"The faint whisper of rain and running water was still there and it had the same tender note of solitude and perfection. But what did the rain mean to him as long as he couldn’t write a song about it?"

starthief.bandcamp.comstarthief.netModularGrid

User avatar
starthief
Super Deluxe Wiggler
Posts: 3774
Joined: Tue Oct 04, 2016 10:39 am
Location: St Louis, MO
Contact:

Post by starthief » Sun Mar 31, 2019 2:34 pm

Here's an example of doing this with the E370. It's intensely FMing a slow LFO-rate sine. You could also phase modulate rather than using FM, but the phase modulation range is more limited than TZFM on the E370.

http://soundcloud.com/starthief/e370-ex ... avefolding
"The faint whisper of rain and running water was still there and it had the same tender note of solitude and perfection. But what did the rain mean to him as long as he couldn’t write a song about it?"

starthief.bandcamp.comstarthief.netModularGrid

Post Reply

Return to “Eurorack Modules”