ssj71 / rkrlv2

Rakarrack Effects Ported to LV2 Plugins
GNU General Public License v2.0
53 stars 10 forks source link

Distband Crashes Ardour4 when Plugin Analysis is opened. #3

Closed rcspam closed 8 years ago

rcspam commented 8 years ago

Hi, It doesn't load in carla2 (Ubuntu 14.04 + KxStufio repo)

ssj71 commented 8 years ago

which effect? I've tested it a fair bit with carla2 but perhaps I missed something?

rcspam commented 8 years ago

It's ok now i have delete all carla conf files and reinstal itl from scratch, issue surely due to too old home config which we hang out versions after versions. Sorry for this issue

ssj71 commented 8 years ago

no problem. Thanks for the report!

rcspam commented 8 years ago

Bw, if i test rkr from ardour 4 (without jack session) , gui lv2 doen't works as expected... image and if i unroll plugin analyse it crash ardour4...

ssj71 commented 8 years ago

I'll look into this. There is no custom GUI, only the host-generated one. So the screenshot looks exactly how I would expect it. The crash shouldn't happen though. I'll check it out.

rcspam commented 8 years ago

Must use right or left button mouse to increase/decrease ?

ssj71 commented 8 years ago

you'll have to take that up with ardour. Thats how they handle integers. I think if you hold shift and click it jumps 5 or 10 at a time.

rcspam commented 8 years ago

Ok, I have just download ardour4 to test it ... I thought there was sliders. Thanks

ssj71 commented 8 years ago

I understand. I don't love that design decision ardour made myself. Thanks for testing it with other hosts!

rcspam commented 8 years ago

It's really not usefull ! Perhaps a temporary desingn, i hope ! But is Rakarrak developpment down ? The effects are really cool, if it is the case i hope someone(s) take up it with a better Gui...

ssj71 commented 8 years ago

No, but I just talked to the ardour developers, next ardour release will at least allow you to use scrollwheel to change the values. Rakarrack hasn't had much development for a few years. The original devs are too busy now. I'm confident nobody's working on a new GUI for it. Feel free to contribute one though :)

rcspam commented 8 years ago

I just write some bash scripts for my own usage, i don't know real devel language and i have no time to learn and to do that... But i think to something... why not integrate your rkr plugins to guitarix, i want to say without lv2 but native guitarix...

rcspam commented 8 years ago

I want to say you.. not me !! ;)

ssj71 commented 8 years ago

Guitarix loads lv2 plugins. Thats the beauty of plugins (and the whole point of my effort): you can now use rakarrack effects almost anywhere. There's little point to porting them to some format that only works with 1 application.

rcspam commented 8 years ago

I discover many things today... guitarix lv2 are native gui.... I m happy to be on vacation ;)

rcspam commented 8 years ago

Some doen't works, i'll test them and will come back later in the week. cu

rcspam commented 8 years ago

Have test some rkr on guitarix and ardour4

Little enhancements if possible: Same setup as rakarrak by default Wet/Dry with -/+ button L/R Cross +/- with -/+ button

[1] = tested ok [0]=doesn't work []= no tested

[1] Lineal EQ [1] Compressor [1] Distortion [1] Echo [1] Chorus / Flanger [1] Analog Phaser [1] Reverb [1] Parametric EQ [1] Cabinet Emulation [1] AutoPan/Stereo Expander [1] Harmonizer - Interval must be -12 to 12 [1] Musical Delay - Delays beside each other [1] WahWah [1] AlienWah [0] Derelict - high cpu (100% 1 core ), output 'blinking'- Analisis crash Ardour 4.1 [1] Valve - Stereo Negate Prefilter beside each other [1] Dual Flange [1] Ring [1] Exciter [0] DistBand - high cpu (100% 1 core ), output 'blinking'- Analisis crash Ardour 4.1 [1] Arpie [1] Expander [1] Shuffle [0] Synthfilter - No Sound out [1] VaryBand [1] MuTroMojo [1] Echoverse [1] CoilCrafter [1] ShelfBoost [] Vocoder [1] Sustainer [1] Sequence [1] Shifter [0] StompBox - high cpu (100% 1 core ), output 'blinking'- Analisis crash Ardour 4.1 [] Reverbtron [] Echotron [] StereoHarm - no midi [] CompBand [] Opticaltrem [] Vibe [] Infinity

brummer10 commented 8 years ago

To Analysis crash Ardour 4.1

This happen because the analyse tool in ardour use a fixed buffer size of 2048 samples ( if I remember right, could be 1024) However, this crashed all plugs which relay on fixed buffer sizes. Ardour does that even when a plug request fixed buffer sizes, so your only chance is, to check the buffersize in each run cycle and react on changes. I do that in my plugs which use oversampling and use there dynamic buffersizes for the resampler(see GxFuzz for example) and do it in my convolver wrapper, where I stream the data as long as the buffer is empty, when the given buffersize isn't equal to the one I've setup.

regards hermann

ssj71 commented 8 years ago

@brummer10 Thanks, that helps a lot!

@rcspam awesome report! Thank you!

Your request for +/- do you mean like a polarity switch (so that 127 is all wet, 0 is all dry?) I'll have to think about that because it would break backward compatibility, making the merge to rakarrack harder.

rcspam commented 8 years ago

yes, but i think wet/dry are polarity switches in rakarrak (-64/+63)

rcspam commented 8 years ago

@brummer10 I don't know if it's a guitarix enhancement to do in the lv2 gui stack, but when i have tested some rkrlv2 plugins, simple switch (false/true) (e.g: Bypass) are knob 0.00 to 1.00. Am i right ?

ssj71 commented 8 years ago

@rcspam, No, It may appear that way, but it actually just is that -64 is 100% wet, 63 is 100% dry. I just changed the range to try to make it more intuitive. Same with L/R cross. The behavior is exactly the same as the original rakarrack. I would prefer it to be 0 is all dry 127 is all wet myself.

I submitted a bug report to ardour about this issue. For now, either don't open the analysis window, or use carla as a plugin in ardour to open the ones that crash. Hopefully we can get a fix soon.

ssj71 commented 8 years ago

@rcspam When you report on harmonizer that the interval must be -12 to 12 what do you mean? That is already the range.

rcspam commented 8 years ago

It works only with interval set btw -0.9 and +0.9 in guitarix and same with ardour but impossible to see the setting... Should it be an integer like in rakarrack ? screenshot3 screenshot2 screenshot1

ssj71 commented 8 years ago

@rcspam I've submitted another bug to ardour. The first one (crashing on plugin analysis) is already fixed in the latest ardour git. You're helping several projects today. :)

the guitarix thing seems like a bug as well. But I can't reproduce it using guitarix 0.32.3. What version are you using? Actually I think I misunderstood what you meant. Let me test it some more.

brummer10 commented 8 years ago

Well, in guitarix we haven't take care for port hints other then enumerations. I've fixed that now in git. We take care now for integer and toggle hints as well. So the default view will be more suitable. However, in guitarix you could change the kind of port to use, the range to use, the step size, the order, enumeration entry's, or what ever you wont, in the detailed view. Any entry there is editable.

By the way, great work on this port to LV2. Nice to have the (most) rakarrack plugs available in guitarix now. Only drawback here is that they are all stereo versions, are there any plans to do mono versions as well?

rcspam commented 8 years ago

Guitarix version 0.33.0

rcspam commented 8 years ago

@brummer10 Thanks for , i just understood that we can change some gui thing in lv2 guitarix from 'show details'. Really cool, is it possible to had choice btw switches, knobs, integer... in it ? Or perhaps is it too code dependent to have this kind of enhancement ? @ssj71 precision: guitarix 0.33 git from falktx repo

rcspam commented 8 years ago

Tested missing above:

[i don't no] Vocoder [0] Reverbtron [0] Echotron [0] StereoHarm - no midi - like 'harmonizer' doesn't work, but a little btw interval r/l -0.9 and 0.9 [1] CompBand [1] Opticaltrem [1] Vibe [1] Infinity [0] StompBox-fuzz - high cpu (100% 1 core ), output 'blinking'- Analisis crash Ardour 4.1

Regards

ssj71 commented 8 years ago

@brummer10 Thats great news. Thanks for adding that support! I haven't really thought about mono versions. They could be made somewhat easily, but then its 2x the code maintenance. So I don't have plans but I'd like to hear how many people are interested. Could guitarix just place duplicate, chained mono plugins on L and R channels if someone puts a mono after a stereo?

@rcspam sounds like the parameter not fitting in the box is also resolved in the latest ardour. So 4.2 should have both problems resolved! I still haven't had a chance to look into why these others aren't working. Hopefully I'll have some time tonight.

trebmuh commented 8 years ago

@ssj71 : could it be a place where the Calf mono-input plugin would help ? http://calf-studio-gear.org/ Cheers BTW for this work, that's great to see.

ssj71 commented 8 years ago

@trebmuh possibly, but I think this case is more a limitation of guitarix as an lv2 host. They currently only support stereo plugins at the end of the chain IIRC. There are several ways it could be changed to handle arbitrary ordering of mono and stereo plugins (i.e. ardour does this automatically) but it requires somebody writing the code for guitarix.

brummer10 commented 8 years ago

For us, it isn't a limitation, it's a design decision. For production one can use our LV2 plugs in the host of choice, but guitarix is focused on live usage. We give the CPU usage a high priory in our work. That allow us to go with real low latency. Doubling channels in the host, would negate that. Often enough, you didn't need stereo FX at all for your guitar. Mono versions would be welcome here for all plugs, but special for the: [1] Linear EQ [1] Compressor [1] Distortion [1] Parametric EQ [1] WahWah [1] AlienWah [1] Exciter [1] Expander [1] Shuffle [1] Sustainer

@rcspam Currently the kind of controller is bounded to the kind of parameter to control. So change the kind of parameter will change the controller in the interface. we do also support interfaces for LV2 plugs build with glade, this way one could indeed select any aspect of the native UI representation in the guitarix rack. But it require a bit more inside knowledge.

rcspam commented 8 years ago

Btw, Echotron & Reverbtron don't appear in guitarix list...

ssj71 commented 8 years ago

@brummer10 thanks for the clarification. It makes sense why then you'd want mono versions. With the short list I'll consider it. I didn't really want to go refactor 40 effects.

@rcspam those two effects have more feature requirements of the host, which I don't think guitarix supports.

ssj71 commented 8 years ago

@rcspam ok, I just pushed a change that adds optimizations and uses a faster algorithm for the waveshaping effects (stompbox, distband, derelict). If you can, please test and verify that it works on your system too.

rcspam commented 8 years ago

Ok they work well now... I wait for Synthfilter and [Stereo]Harmonizer and then... wake up in the morning with a zomby woof behind my eyes ;)

ssj71 commented 8 years ago

well i figured out harmonizer. synth and stereoharm will have to wait until tomorrow (or next week maybe).

ssj71 commented 8 years ago

synth and stereo harm were fixed Saturday morning. I'm going to close this issue and make a few new ones for what issues remain. Thanks to all who participated.

rcspam commented 8 years ago

harmonizer works but not stereoharm ...

ssj71 commented 8 years ago

hmm. It was working for me. :( Do you get any sound out? What settings?

rcspam commented 8 years ago

Here a audio file: First rec: normal sound Second rec: Rackarrack SereoHarmo with this setting screenshot1 Third rec: Guitarix rkrlv2 with same setting: screenshot3

brummer10 commented 8 years ago

to fix this, add in rkrlv2.c, after RKRLV2* plug = (RKRLV2*)handle; in line 3402

plug->sharm->adjust(5,nframes);

brummer10 commented 8 years ago

@ssj71 Also, you may wont to fix the wetdry_mix line 190 - plug->output_l_p[i] = plug->input_r_p[i] * v2 + plug->output_l_p[i] * v1; + plug->output_l_p[i] = plug->input_l_p[i] * v2 + plug->output_l_p[i] * v1;

ssj71 commented 8 years ago

@brummer10 thank you very much! You make it a pleasure to write open source software.

@rcspam I've made the change in master, please test and let me know if it still has any problems. Right now the "select chord" mode still isn't working right, but at least the basic shifting should.

rcspam commented 8 years ago

Ok it works ! Does L/R Crossover work ?! My feeling is it doesn't work in rakarrack neither in rkrlv2 , but i'm perhaps wrong ! Thank you both @brummer10 @ssj71 (and other "libre software" devel) to ensure that playing music is so cool on Linux !!!

brummer10 commented 8 years ago

No, it doesn't. It could be fixed by move the crossover logic behind the upsampling in the output.
from for (i = 0; i < nPERIOD; i++) { outil[i] = templ[i]; outir[i] = tempr[i]; } to for (i = 0; i < period; i++) { efxoutl[i] = templ[i] * gainl * (1.0f - lrcross) + tempr[i] * gainr * lrcross; efxoutr[i] = tempr[i] * gainr * (1.0f - lrcross) + templ[i] * gainl * lrcross; }

rcspam commented 8 years ago

I want to test your fix but where is:

for (i = 0; i < nPERIOD; i++) {
outil[i] = templ[i];
outir[i] = tempr[i];
}

if i search in StereoHarm.C just find line 125:

    for (i = 0; i < nPERIOD; i++) {

        outil[i] = templ[i] * (1.0f - lrcross) + tempr[i] * lrcross;
        if (outil[i] > 1.0)
            outil[i] = 1.0f;
        if (outil[i] < -1.0)
            outil[i] = -1.0f;

        outir[i] = tempr[i] * (1.0f - lrcross) + templ[i] * lrcross;
        if (outir[i] > 1.0)
            outir[i] = 1.0f;
        if (outir[i] < -1.0)
            outir[i] = -1.0f;

    }
brummer10 commented 8 years ago

I guess it's better to let @ssj71 have a look at it, and test it if he checked it in the right way. My fix works, but could properly be better implemented.

rcspam commented 8 years ago

I have replace line 168

 for (i = 0; i < period; i++) {
        efxoutl[i] = templ[i] * gainl;
        efxoutr[i] = tempr[i] * gainr; 
    }

by your code

for (i = 0; i < period; i++) {
       efxoutl[i] = templ[i] * gainl * (1.0f - lrcross) + tempr[i] * gainr * lrcross;
       efxoutr[i] = tempr[i] * gainr * (1.0f - lrcross) + templ[i] * gainl * lrcross;
}

... and it works ;)