Login / Register  0 items | $0.00 New What is KVR? Submit News Advertise
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Tue Mar 16, 2010 11:57 am Waveshaping/Overdrive/Harmonics Cookbook for the N00b?

I guess what I'm asking for, is equations and functions; playing with rs-met's awesome FuncShaper whetted my appetite for something even deeper. I'm interested in anything from subtle warming to distortion to bizarre toneshaping, and don't feel any need to model any particular gear. I guess I'll have to get serious about learning C++, though.
"Wait... loot then burn? D'oh!"
robrokken
KVRist
 
286 posts since 21 Jul, 2009

Postby robrokken; Wed Mar 17, 2010 12:46 am

Download Cockos WDL/Iplug, Take out the sample gain algo and start throwing in some Waveshapers, polynomial shapers etc:

Look up polynomial waveshaping, tanh

You can have a plugin up and running in a day :) Just a matter of replacing the algos then :)

The easiest cross platform ur gonna find.

http://forum.cockos.com/showthread.php?t=9524

~Rob.
Music Engineer
KVRAF
 
3716 posts since 8 Mar, 2004, from Berlin, Germany

Postby Music Engineer; Wed Mar 17, 2010 6:48 am

Jafo wrote:I guess what I'm asking for, is equations and functions;

as has been said, polynomials are interesting for doing bandlimited waveshaping, or waveshaping that is mainly thought of in the frequency domain, as in adding harmonics - but it is also important (and probably even more so), to consider the various sum- and difference-tones. i elaborate this stuff a bit in my waveshaping tutorial. tanh, clip (and saturating functions in general) are more interesting from an analog-modeling point of view.

playing with rs-met's awesome FuncShaper whetted my appetite for something even deeper.

thanks for the appreciation. FuncShaper should actually cover all waveshaping needs as you can create every conceivable transfer-curve. if you want something deeper, then you may probably want to go beyond waveshaping and look into dynamic distortion.
Image
User avatar
antto
KVRAF
 
2400 posts since 4 Sep, 2006, from 127.0.0.1

Postby antto; Wed Mar 17, 2010 8:01 am

robrokken wrote:Download Cockos WDL/Iplug, Take out the sample gain algo and start throwing in some Waveshapers, polynomial shapers etc:

Look up polynomial waveshaping, tanh

You can have a plugin up and running in a day :) Just a matter of replacing the algos then :)

The easiest cross platform ur gonna find.

http://forum.cockos.com/showthread.php?t=9524

~Rob.


wtf? i can make a VST with GUI without messing with the GDI or bmp/png decoding???
why didn't i know about this, and what's the catch?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.freenode.net >>> #kvr
robrokken
KVRist
 
286 posts since 21 Jul, 2009

Postby robrokken; Wed Mar 17, 2010 9:59 am

lol :) its sooo simple :) A lot of people don't know about it, imo one of the best kept secrets :) Like antto, when u see my code, umm thats IT lol, theres nothing more, Iplug does A lot for you already.

Here is the support forum,

http://forum.cockos.com/forumdisplay.php?f=32

:)

~Rob.
User avatar
antto
KVRAF
 
2400 posts since 4 Sep, 2006, from 127.0.0.1

Postby antto; Wed Mar 17, 2010 11:22 am

:dog:
so, i only need the VST SDK, the IPlug "framework" and what? the "LICE" thing (to have GUI)?
and i can legaly make commercial closed-source VST plugins with all of that?
grr.. ;]
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.freenode.net >>> #kvr
robrokken
KVRist
 
286 posts since 21 Jul, 2009

Postby robrokken; Wed Mar 17, 2010 11:59 am

U just download it all in one package :) its called WDL, You only end up using 2 files from the SDK :) and yes, its free and opensource, Do as you want with it :)

http://www.cockos.com/wdl/ I can't say who, but I know of several MAJOR plugins that are done with this framework ;)

~Rob.
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Wed Mar 17, 2010 6:27 pm

robrokken wrote:Download Cockos WDL/Iplug, Take out the sample gain algo and start throwing in some Waveshapers, polynomial shapers etc:

Look up polynomial waveshaping, tanh

You can have a plugin up and running in a day :) Just a matter of replacing the algos then :)

The easiest cross platform ur gonna find.

http://forum.cockos.com/showthread.php?t=9524

~Rob.


Hehe, I was groveling through the mda src, doing all sorts of unnatural acts with VC++ (can you do anything which isn't unnatural with VC++?), and then this comes along. Thanks for the link!
"Wait... loot then burn? D'oh!"
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Wed Mar 17, 2010 6:38 pm

Robin from www.rs-met.com wrote:as has been said, polynomials are interesting for doing bandlimited waveshaping, or waveshaping that is mainly thought of in the frequency domain, as in adding harmonics - but it is also important (and probably even more so), to consider the various sum- and difference-tones. i elaborate this stuff a bit in my waveshaping tutorial. tanh, clip (and saturating functions in general) are more interesting from an analog-modeling point of view.


Yep, working my way through it all right now; makes me regret having changed my major from Mathematics to English Lit last century...

Robin wrote:
I wrote: playing with rs-met's awesome FuncShaper whetted my appetite for something even deeper.

thanks for the appreciation. FuncShaper should actually cover all waveshaping needs as you can create every conceivable transfer-curve. if you want something deeper, then you may probably want to go beyond waveshaping and look into dynamic distortion.


Indeed, indeed, but first must learn walk before fly. I'm not entirely certain what dynamic distortion is, but I keep thinking of transients modifying DC biases... we guitarists think of everything in terms of tubes and diodes. lol

Again, thanks for the great gifts!
"Wait... loot then burn? D'oh!"
Music Engineer
KVRAF
 
3716 posts since 8 Mar, 2004, from Berlin, Germany

Postby Music Engineer; Thu Mar 18, 2010 3:57 am

Jafo wrote:I'm not entirely certain what dynamic distortion is, but I keep thinking of transients modifying DC biases... we guitarists think of everything in terms of tubes and diodes. lol


as an audio-dsp guy without EE background, i tend to think about everything in terms of signals, systems, spectra and perceptual attributes without referring to analog/physical entities. however, it looks like guitar amplifiers impose a time-varying DC (yeah, i know that is a kind of oxymoron) on a signal that depends on the signal level. this, in turn leads to production of more harmonics on transients which is said to be perceived as punch. that stuff is quite nicely explained here:

http://www.simulanalog.org/clip.pdf

...and that's what i would consider as the essence of dynamic distortion: producing more or less distortion depending on whether or not a transient is present. by simulating tube circuits, you would get that implicitely as a kind of side effect. personally, i would probably try to do it directly by splitting off the transient and distorting it separately.


Again, thanks for the great gifts!

you're welcome
Image
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Wed Mar 24, 2010 4:12 am

Gah, I've most of the last week comparing waveshaping algorithms and existing saturation plugs, figuring out ways to dynamically add dc offset, studying the sdk, and researching ways to speed up trig functions... and loving it. How do devs do this stuff without becoming raving lunatics? :hihi:
"Wait... loot then burn? D'oh!"
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Wed Mar 24, 2010 4:22 am

Braindoc wrote:however, it looks like guitar amplifiers impose a time-varying DC (yeah, i know that is a kind of oxymoron) on a signal that depends on the signal level. this, in turn leads to production of more harmonics on transients which is said to be perceived as punch. that stuff is quite nicely explained here:

http://www.simulanalog.org/clip.pdf


Oddly enough, one of the things I discovered in my (unsystematic, non-exhaustive) research is that the Simulanalog ampsims only add odd-order harmonic distortion, unless there's a lot of gain. I fed sinewaves of various frequency and volume first, then tried it with single-note guitar pluckings. Surprised the hell out of me, since these are the people who wrote that paper, and there's no evidence of DC offset adding even-order harmonics. However, my other favorite ampsims, BTW Juicy77 and AmplifikationLite, added plenty of even-order distortion.
"Wait... loot then burn? D'oh!"
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Wed Mar 24, 2010 4:47 am

Does anybody have any suggestions on dynamically adding dc offset? It's a great way to make simple polynomials (x^y, where y is odd) become dynamic and interesting thereby. (And is quicker to calculate than trig functions!)

I'm still trying to figure out how to detect a transient -- how do you differentiate a transient from a swell? -- but I have some other ideas.

I've been playing with a feed-back method of taking a percentage of the previous sample's output and applying it to the current/next; in many cases, a range of 0.125 or 0.250 work well, which lets me use a simple (and fast!) bitshift. This is more dynamic than detecting a transient, but maybe too dynamic?

I could always use a wavering function, basically AC power (or kinda like a chorus effect), but I wouldn't want to use that as the only dc offset method; it'd be as boring as no dynamic offset.

Ah well, just kinda raving here.
"Wait... loot then burn? D'oh!"
Music Engineer
KVRAF
 
3716 posts since 8 Mar, 2004, from Berlin, Germany

Postby Music Engineer; Thu Mar 25, 2010 1:04 am

Jafo wrote:I'm still trying to figure out how to detect a transient -- how do you differentiate a transient from a swell? -- but I have some other ideas.

as you have been quoting me above with my former pseudonym, you are probably also aware of my old website [LINK REMOVED]. there, i have the plugin EnvelopeDesigner which uses a simple difference between two envelope followers. look here:

http://www.spl.info/fileadmin/user_uplo ... 6_OM_E.pdf

pages 6-8, are the interesting part. of course, you could do much more sophisticated stuff on the computer - like going to frequency domain and checking whether the difference between two frames inside some bin exceeds some threshold and interpret that as transient ...and then resynthesize only those ... or something
Image
Jafo
KVRAF
 
1670 posts since 20 Dec, 2002, from State of Denial

Postby Jafo; Mon Mar 29, 2010 4:20 am

re: the SimulAnalog "Clipping" model. Yes, the transient is where the magic happens (I think it was Bootsy who wrote that, but my bookmarks and quotes file are on my home rig), but the effect in question -- harmonics but not volume increasing -- is also a function of the transfer curve, innit? "Saturation" means the device can't push any more electrons through it, after all.

Also, I'm finding that either some sort of asymmetric clipping, or the production of individual harmonics, is giving me much better results than a simple overall waveshaping.
"Wait... loot then burn? D'oh!"
Next

Moderator: Moderators (Main)

Return to DSP and Plug-in Development