noGUI manual entry question

Dear all (and @olilarkin in particular)

iPlug2 is awesome! I was stuck with a simple plug that I did in SonicBirth, nothing complicated (quad to quad filtered feedbacking delays) but still very useful for mutlichannel composition… and now Catalina killed my jam so I bit the bucket and managed to code it back thanks to you!!!

(ok just basic no-gui but still)

regarding the latter: I am compiling only AUv2 for now, and I wonder how to manually enter the values for each fader in the host-generated-interface. I seem to remember that Reaper allowed that, but I cannot make it happen. Will have I to learn how to use the gui for that? If that’s the case I might create 2 presets in the C++ but that would be quite a detour to avoid doing a gui :slight_smile:

Anyway, any pointers welcome, and thanks again

p

I think reaper’s default GUI is quite limited for typing real param values (i think you can only do normalized values)

so , if you don’t care how it looks, just put back a simple igraphics UI with two ICaptionControls…

  mMakeGraphicsFunc = [&]() {
    return MakeGraphics(*this, PLUG_WIDTH, PLUG_HEIGHT, PLUG_FPS, GetScaleForScreen(PLUG_WIDTH, PLUG_HEIGHT));
  };
  
  mLayoutFunc = [&](IGraphics* pGraphics) {
    pGraphics->AttachCornerResizer(EUIResizerMode::Scale, false);
    pGraphics->AttachPanelBackground(COLOR_GRAY);
    pGraphics->LoadFont("Roboto-Regular", ROBOTO_FN);
    const IRECT b = pGraphics->GetBounds().GetCentredInside(300,300);
    pGraphics->AttachControl(new ICaptionControl(b.FracRectVertical(0.5f), kParam1, DEFAULT_TEXT.WithSize(24.f)));
    pGraphics->AttachControl(new ICaptionControl(b.FracRectVertical(0.5f, true), kParam2, DEFAULT_TEXT.WithSize(24.f)));
  };

you mean that these lines with autogenerate all my parameters? that would be awesome. I’m trying it now :slight_smile:

edit sorry I seem to have to do one per parameter. I have a lot of parameters but I think it is worth the time…

ok for the fellow beginners: if can programatically (ugly) do them like this:

    for (int i = 0;i<kNumParams;i++){
  pGraphics->AttachControl(new ICaptionControl(IRECT(0,i*15,80,(i+1)*15), i, DEFAULT_TEXT.WithSize(14.f)));
}

it is ugly and has no fader but it has text entry and works :wink:

1 Like

You can use IRECT::GetGridCell() to layout your captions in a grid. Try an IVSliderControl instead of ICaptionControl if you want a fader e.g. https://github.com/iPlug2/iPlug2/blob/b314b8cce909875c7c2b4ed99dfa1dad27ab0093/Examples/IPlugInstrument/IPlugInstrument.cpp#L50

Set the valueIsEditable = true in the CTOR for text input with the slider: https://iplug2.github.io/iPlug2/class_i_v_slider_control.html

1 Like