Here is  example for how you could use lookup table distortion in faust:

https://github.com/brummer10/LittleFly.lv2/blob/master/LittleFly/dsp/LittleFly.dsp

Am 06.12.20 um 14:44 schrieb michel buffa:
Well, I've been working on tube guitar amp simulations for a while +
we ported several overdrive/distortion/fuzz pedals from Faust to
WebAudio.

You can of course follow the advises that have been posted previously
+ also :

  * Look at the faustlib + guitarix.lib as said,
  * Look at Oleg Kapitonov's overdrive + amp sim in faust
    (https://github.com/olegkapitonov/Kapitonov-Plugins-Pack
    faust .dsp source code in LV2 dir)
  * Look at Nick Thomson Temper distorsion (includes a negative
    feedback loop), we used it as a starting point for the faust
    implementation of the power amp stage of a guitar amp simulation
    (kemper : https://github.com/creativeintent/temper) + look for the
    video and paper we wrote for IFC 2020
    (https://ifc20.sciencesconf.org/321481)
  * Look at these following examples :
      o Big Muff fuzz at OWL pedal patch page :
        https://www.rebeltech.org/patch-library/patch/Big_Muff_Fuzz
      o Overdrive pedal from guitariw project :
        https://www.rebeltech.org/patch-library/patch/Guitarix_Overdrive
      o OSC tube distorsion from OWL pedal patch page :
        https://www.rebeltech.org/patch-library/patch/OscTube
      o Ibanez TS9 Overdrive re-creation, example from FAUST
        distribution :
        
https://raw.githubusercontent.com/grame-cncm/faust/master-dev/examples/misc/guitarix.dsp

For tube emulation, there are different approaches. Tubes have a
temporal behavior that produces the sag and squish effect (current
load during attack, unload during release) that is difficult to reproduce.
In our power amp we used filters + waveshaper + bandpass filter driven
by the input signal enveloppe. In a JavaScript implementation we
altered in real time the transfer function of the waveshapers (not
possible in faust), but some people managed to implement a more
accurate model (at the price of high cpu usage) such as what is done
in the Swanky Amp plugin (whose DSP code is written in Faust), see
https://github.com/resonantdsp and their web site
(https://www.resonantdsp.com/#posts read all blog posts)

Only few implementations address the sag/squish reproduction.

BTW if someone has good links with explanation about faust
implementation of tubes with sag/squish, please share :-)

Michel

Le dim. 6 déc. 2020 à 14:07, Till Bovermann <lf...@lfsaw.de
<mailto:lf...@lfsaw.de>> a écrit :

    thanks for the mention, dario!

    a very nice distortion heavily used by me in my SuperCollider
    writings (adopted form Josh Parmenter and Julian Rohrhuber) is to
    amplify the signal and run it through a `tanh` sinusoid function.
    the overtone resulting spectrum is quite nice to the ear.

    Also interesting in in this regard are the various distortion
    plugins you can find in this repo:

    
https://github.com/supercollider/sc3-plugins/blob/master/source/DistortionUGens/DistortionUGens.cpp

    for the algorithms, look for functions with `_next` in their name...

    cheers
            Till


    --
    Till Bovermann

    https://tai-studio.org | http://lfsaw.de |
    https://www.instagram.com/_lfsaw/










    > On 5. Dec 2020, at 15:56, Dario Sanfilippo
    <sanfilippo.da...@gmail.com <mailto:sanfilippo.da...@gmail.com>>
    wrote:
    >
    > You may also want to check the saturators in Zavalishin's book;
    Google "the art of va filter design". I have implemented some of
    those here:
    https://github.com/dariosanfilippo/edgeofchaos/blob/master/stabilityEOC.lib.
    >
    > For the folding functions, you can see what Till has ported from
    Supercollider:
    
https://github.com/tai-studio/faust-sc/blob/116f80e38ea1ca5c95053f4360804f45dd7494b9/lib/scUGens.lib#L470.
    >
    > These wavefolding techniques also seem interesting and could be
    implemented in Faust:
    https://ccrma.stanford.edu/~jatin/ComplexNonlinearities/Wavefolder.html.
    I'll give it a try later.
    >
    > I've been doing some experiments with time-variant transfer
    functions being written by the input signal itself and I've had
    promising results, although this algorithm, ideally, should be
    implemented using tables where each point in the TF smoothly
    transitions from the current value to the new one. As it is now,
    you often hear a click when the TF value is overwritten in the
    delay line as it most likely jumps.
    >
    > You can have a look here:
    
https://github.com/dariosanfilippo/edgeofchaos/blob/a010b0ca6c5d8b850ecbf954b4e4aff4ad60a752/outformationEOC.lib#L571.
    >
    > Cheers,
    > Dario
    >
    > On Fri, 4 Dec 2020 at 16:52, da <d...@randomstyles.net
    <mailto:d...@randomstyles.net>> wrote:
    > hello,
    >
    > i am trying to figure out how to create different distortion
    effects. is
    > there a site where you can look at some algorithms and how to
    implement
    > them into faust?
    >
    > i am very much interested in these kind of distortion-types:
    >
    >
    > Tube/Valve Distortion
    >
    > Clipping
    >
    > Foldback
    >
    > Overdrive
    >
    > Bitcrushing
    >
    > Sample Rate Reduction / Decimate
    >
    > Wavetable Distortion
    >
    >
    > thanks a lot :-)
    >
    >
    >
    > _______________________________________________
    > Faudiostream-users mailing list
    > Faudiostream-users@lists.sourceforge.net
    <mailto:Faudiostream-users@lists.sourceforge.net>
    > https://lists.sourceforge.net/lists/listinfo/faudiostream-users
    > _______________________________________________
    > Faudiostream-users mailing list
    > Faudiostream-users@lists.sourceforge.net
    <mailto:Faudiostream-users@lists.sourceforge.net>
    > https://lists.sourceforge.net/lists/listinfo/faudiostream-users



    _______________________________________________
    Faudiostream-users mailing list
    Faudiostream-users@lists.sourceforge.net
    <mailto:Faudiostream-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/faudiostream-users



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to