Tabs break lv2s

Issue #10 resolved
magnetophon created an issue

When you make a plugin with a tgroup, the knobs inside the tabs control the wrong parameters.

This is with faust2jaqt from faust1 git on June 3rd '16, used in ardour 4.7

Comments (13)

  1. Albert Graef repo owner

    Ok, please provide a minimal example showing the issue, and explain what exactly goes wrong in the example.

  2. magnetophon reporter
    import("oscillator.lib");
    
    process =
    oscrs(frequency)*volume;
    
    group(x) = tgroup("tabs", x);
      frequency = group(hslider("frequency", 55, -55, 440, 1));
      volume = group(hslider("volume", 0.1, 0, 1, 0.001));
    

    When you make an lv2 with gui, the frequency slider controls the volume parameter and vice versa. When you change the tgroup for a hgroup or a vgroup, all is well.

    faust2jack and faust2jaqt are not affected, neither is the lv2 with generic controls.

  3. magnetophon reporter

    Hi, it seems you don't have much time available to look into this.

    As a temporary workaround, would it be possible to put a simple 'sed' based hack in the script, that just takes out [scale:log] and replaces tabs with hgroups? (after making a backup, of course) Something like this before the compile: find . -name '*.lib' -or -name '*.dsp' | xargs -n 1 -P 10 -I {} bash -c ' sed -i.bak "s|\[ *scale *: *log *\]||g ; s|\btgroup\b|hgroup|g" "{}" ' And in the cleanup: find . -name "*.bak" -exec sh -c 'mv -f $0 ${0%.bak}' {} \;

  4. Albert Graef repo owner

    Yeah, it seems that either Faust or Qt for some reason enumerates the children of the tabs widget in reverse order. It's the same with faust-vst. I'll need to look into the Faust Qt support to find out why that happens.

    Unfortunately, there's no easy way to fix this directly in faust-lv2, since the Qt GUI code there assumes that the control elements and the child widgets are in the same order. An easy workaround would be to just map tgroups to hgroups in lv2ui.cpp, as you suggested. I'll look at that tomorrow.

  5. Albert Graef repo owner

    I'm still not sure why the tab child widgets are reversed, but rev. 69862bbf2335 works around that. Widgets in tabs like in the given test witness should now work properly.

  6. Log in to comment