From faust to mod plugin


#22

With version 0.9.73 I get the same error as with version 0.9.46. I see make_lv2_bundle.sh doesn’t finish correctly. The last output is:

copy gx_sceleton.lv2 to gx_colorsoundoverdriver.lv2 and rename/replace strings to colorsoundoverdriver

That’s in the gx_colorsoundoverdriver.lv2 directory:
colorsoundoverdriver.cc gx_sceleton.cpp gx_sceleton.ttl manifest.ttl gx_pluginlv2.h gx_sceleton.h Makefile manifest.ttl.in

Am I right that it quits before the last line of copy_sceleton()?


#23

Yes, the output from make_lv2_bundle.sh should be:

Please select a Plugin type from the list
 1) DelayPlugin	      14) BandpassPlugin    27) FlangerPlugin
 2) ReverbPlugin      15) CombPlugin	    28) PhaserPlugin
 3) DistortionPlugin  16) EQPlugin	    29) ReverbPlugin
 4) WaveshaperPlugin  17) MultiEQPlugin	    30) SimulatorPlugin
 5) DynamicsPlugin    18) ParaEQPlugin	    31) ReverbPlugin
 6) AmplifierPlugin   19) HighpassPlugin    32) SpatialPlugin
 7) CompressorPlugin  20) LowpassPlugin	    33) SpectralPlugin
 8) EnvelopePlugin    21) GeneratorPlugin   34) PitchPlugin
 9) ExpanderPlugin    22) ConstantPlugin    35) UtilityPlugin
10) GatePlugin	      23) InstrumentPlugin  36) AnalyserPlugin
11) LimiterPlugin     24) OscillatorPlugin  37) ConverterPlugin
12) FilterPlugin      25) ModulatorPlugin   38) FunctionPlugin
13) AllpassPlugin     26) ChorusPlugin	    39) MixerPlugin
#? 3
Plugin type DistortionPlugin
generate colorsoundoverdriver.cc and copy to gx_colorsoundoverdriver.lv2
copy gx_sceleton.lv2 to gx_colorsoundoverdriver.lv2 and rename/replace strings to colorsoundoverdriver
grep ports and copy them to  gx_colorsoundoverdriver.h
grep ports values and enums and copy them to gx_colorsoundoverdriver.ttl
generate GUI
set plugin name to Gxcolorsoundoverdriver
set plugin class to DistortionPlugin
Okay, gx_colorsoundoverdriver.lv2 is done
Now you can enter ./gx_colorsoundoverdriver.lv2 
  and run make && make install

while generate GUI is new, I’ve just added a new GUI generator to the suite, but the rest is what is supposed to get.


#24

I found the bug. There is a different rename program in fedora than in debian. The syntax in fedora would be:
rename sceleton ${bname} *

After I changed this the script worked as expected.

  cd ./gx_${bname}.lv2
  rename -V | grep -q util-linux
  if [ $? -eq 0 ] ; then
    rename sceleton ${bname} * && sed -i 's/sceleton/'${bname}'/g' *
  else 
    rename 's/sceleton'${bname}'/g' * && sed -i 's/sceleton/'${bname}'/g' *
  fi

That works for me. But maybe something would break it under debian. Or there’s a more beatiful way to fix this.


#25

I pulled git today because you made change to all that fancy stuff. I had to regenerate my dsp files because they looked different to yours. And yours worked. Mine didn’t. Now everything works. The files are a lot smaller. The sound is different to your dsp file. But it sounds really good. I want this on my mod duo. I never thought I get this bluesy, singing sound out of my guitar.


#26

Hi @nils

I’m glade to hear you’ve got it running. Nice.
I guess the difference in sound comes from the hand added clipping function in my dsp file.
Now, to get it into the MOD, you need the mod-sdk and plugin-builder up and running, that’s a other challenge. :slight_smile:


#27

I tried to bootstrap mod-plugin-builder yesterday. But it doesn’t work with gcc6. :disappointed: There isn’t another version in Fedora.

Maybe it’s just the drive poti that behaves different to your version. I also used atan(x)/PI. The first part of the schedule produced a much smaller dsp. The parameters are just b = f*Drive + g. Looks like you optimized a lot?!

There are two things that I want to fix. First, the drive poti isn’t fine grained enough. Maybe I should remove the lowest quarter? Second, high gain doesn’t sound good. I don’t know what I could do here. Maybe another clipping function?

If I want to add it to guitarix, what do I have to do? Could you add my change to make_lv2_bundle.sh or try if it works with debian first? I read that there are both versions under debian too. If you install util-linux the rename alternative changes to this version.


#28

But, you could install for example 4.9.2 in parallel:
https://nmilosev.svbtle.com/fedora-24-bumblebee-nvidia-cuda-theano#gcc-is-too-new_1

Yes, maybe, or you could try to make it logarithmic

Drive = vslider(“Drive[name:Drive]”, 0.5, 0, 1, 0.01) : Inverted(1) : LogPot(5) : smooth(s);

were 5 is the logarithmic level, lower value means lower logarithmic.

Yes, the clipping function I mention is a basic one, it suites only for levels between 1.0 to -1.0
so, when in high gain, you need a preclip to this level like

preclip = min(1.0) : max(-1.0);

transmogrifox (rakkarrack) posted lately a nice sounding asymmetric clipping function in the guitarix forum which do hard limiting and soft clipping ( this one is in C but could easy adopted to faust):

float sqr(float x)
{
    return x*x;
}

float clip1(float x)
{

    float thrs = 0.8;
    float nthrs = -0.72;
    float f=1.25;

    //Hard limiting
    if(x >= 1.2) x = 1.2;
    if(x <= -1.12) x = -1.12;
    
    //Soft clipping
    if(x > thrs){
        x -= f*sqr(x - thrs);
    }
    if(x < nthrs){
        x += f*sqr(x - nthrs);
    }

    
    return x;
}

I’m myself prefer the use of a interpolated clipping table. Check out my plugs on github to see how I do it.

Oh, lately, I ain’t wone add more plugs to guitarix, that’s one of the reasons why I’ve started the github GxPlugs project. Guitarix already contain to much plugs, it becomes a pain to maintain the source, I plan to outsource a couple of them to GxPlugs.
But, maybe you wont to join the GxPlugs project on github? If so, I’ll give you write access there.

I’ll try that, if it works, I’ll add it.


#29
[INFO ]  Performing some trivial sanity checks
[DEBUG]  Testing '! ( -n /opt/rh/devtoolset-3/root/usr/lib64:/opt/rh/devtoolset-3/root/usr/lib )'
[ERROR]  Don't set LD_LIBRARY_PATH. It screws up the build.
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@331]
[ERROR]  >>        called from: CT_TestAndAbort[scripts/functions@351]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@55]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      'docs/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 24856732:11.38)

There are a lot of things that screw up that build. I will try later.

I will look into both clipping functions. Why do you prefer the clipping table? Because of the interpolation? It will be fun to make faust code out of transmogrifox’s function.

I would like to join the GxPlugs project. My name is ntonnaett on github.


#30

Okay, I’ve added you as collaborator to GxPlugins.lv2 and GxModBuildScripts.

It use less CPU when you use pre-calculated values., and I could calculate the clipping curve to my needs. Also it works without hard-limiting before. Interpolation is just done to calculate the fractal part.


#31

I want to generate a clipping table. What script do you use? If it is gentables.py I can’t get it building because nvector_serial.h is missing.


#32

Oh, there is no easy way implemented right now.
What I do is using the models from circ.py, doing a test-run on them and write the output to stdout.
usage is

python simu.py

you’ll see a output like this:

0: Choke
1: Diode_clipper
2: Diode
3: InvOpAmp
4: LinOpAmp
5: Pot
6: Preamp
7: PushPullTransformer
8: Resonator
9: Tonestack
10: Transformer_GC
11: Transistor
12: Triode1
13: Triode2
14: WahWah_ss
15: WahWah

now you could select the model you’re interested in eg. 1 for Diode_clipper.
simu.py will generate a plot for the response from the model.
I add a output to stdout in the plot sequence and get the values for my table.

@nils feel free to use one of the tables from the plugs I’ve pushed to github,


#34

@falkTX
Look, the first spam-bot in this forum, the post is just a copy of the 3. post in this thread.


#35

Nice catch, thank you.