muellmusik / EQui

SuperCollider quark for a 5 band parametric EQ Gui
5 stars 3 forks source link

return EQui objects for Ndefs? #3

Open LFSaw opened 5 months ago

LFSaw commented 5 months ago

I was thinking that one wants to return the EQui object when calling Ndef:equi, instead of the Ndef itself.

Also, why not implementing this on NodeProxy rather than Ndef?

This'd require to update the way the window title is generated (see https://github.com/supercollider-quarks/JITLibExtensions/pull/33#issuecomment-2151828643 for a solution on this):

+ NodeProxy {

    equi { |params, lag = 0.1, index = 1000|
        var window, equi;
        this[index] = \filter -> {|in| in.equi(params, nil, lag) };
        window = Window.new("% EQui".format(this.accessString), EQui.sizeHint).front;
        ^EQui(window, target:this).resize_(5);
    }
}

note that this breaks my solution for resizing (https://github.com/muellmusik/EQui/issues/2), so it needs to be done manually.

I'm happy to provide a PR, once the accessString discussion is settled.

muellmusik commented 5 months ago

I was thinking that one wants to return the EQui object when calling Ndef:equi, instead of the Ndef itself.

Yeah, I thought about this myself yesterday. Not sure why I did it the other way tbh, but it seems sensible to have a way to get the EQui object.

Also, why not implementing this on NodeProxy rather than Ndef?

Also reasonable.

I'm happy to provide a PR, once the accessString discussion is settled.

Sure, happy to see one for both this and the resize.

Another thing that would be nice, would be if the EQui could be embedded in an NdefGui, though that would require a general solution for custom guis there. I think that's not possible at the moment.