Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: A-B selector plugin #2

Open
jpcima opened this issue Aug 20, 2021 · 27 comments
Open

Request: A-B selector plugin #2

jpcima opened this issue Aug 20, 2021 · 27 comments

Comments

@jpcima
Copy link
Contributor

jpcima commented Aug 20, 2021

Idea: plugins for selecting between a pair of stereo signals

If it should be a knob, then the value can permit to crossfade the pair of signals.
with value=0 being full A, value=1 being full B

  • input selector (2x2-in, 1x2-out)
  • output selector (1x2-in, 2x2-out)
@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

There is already an x42 plugin for this, no? I think either the stereo balance or DJ EQ one

But this is something that fits the OK series.
For this you meant to have 4 ins and 2 outs, correct?

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

There is already an x42 plugin for this, no?

That doesn't seem like it. Unless I miss something.

This picture is one case of interest.
It's to have an intermediate client (here "jest"), that I make route its signal into either effect A or B, for comparison purposes.

(also, there often comes up the opposite case where to select among 2 inputs to go into 1 fx, which is why I mention 2 plugins)
Capture d’écran_2021-08-20_11-20-22

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

"Stereo DJ X-Fade" plugin does exactly this.

Screenshot_20210820_102141

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

URI is http://gareus.org/oss/lv2/xfade

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Well not really, compared to the picture above. It has 4-in 2-out, vs 2-out and 4-in.

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

Ah I get it now! A/B for output, not for input.

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Here's the faust equivalent code

import("stdfaust.lib");

process(Al, Ar) =
  As*Al,
  As*Ar,
  Bs*Al,
  Bs*Ar
with {
  As = hslider("[1] A-B select", 0.0, 0.0, 1.0, 0.001);
  Bs = 1.0-As;
};

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

can you post the generated c++?
or how does one convert that in CLI, maybe I can setup that in the repo.

the cross-fade mode that the x42 plugin has is very handy, would be nice as an option.

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

I'd likely tweak it a bit at first.
The linear xfade is possibly not the best choice, and a little smoothing will be desired.
I'll have a look what x42 used.

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

I can setup some stub for the xfade plugin.
Any suggestions for the full plugin name?

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Any suggestions for the full plugin name?

AB output selector?

Faust code and C++
ABselect.tar.gz

(note the "LGPL with exception" mention on the smoothing function, I can work around in case it's a problem)

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

A-B or AB ?

Any license is fine, this project doesnt need to be restrictive on that.

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

From a quick search, it seems as if it's most often written as A/B.

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

ok, A/B it is.

btw, I think an input version like the xfade plugin would be great here. so we have a matching set.
is this easy to setup? can you do that?
thanks

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Done (I've given both a quick test)
ABselectInput.tar.gz

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

thanks again. looking at the code I do not really like the generated output style...
so I will make it integrated into the plugin class in a better way, but can leave the original faust as a comment.

how should this be credited in the sources?
copyright goes to GRAME? to you?

I was thinking basically just credit in-source like this:

/* This DSP is based on the following faust code by Jean Pierre Cimalando
import("stdfaust.lib");

process(l, r) =
  As*l, As*r,
  Bs*l, Bs*r
with {
  sel = hslider("[1] A-B select", 0.5, 0.0, 1.0, 0.001) : si.smoo;
  As = sqrt(1.0-sel);
  Bs = sqrt(sel);
};
*/

would this be ok and enough?

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

This creates a mixed-license source file, whose parts will be assigned to either me or GRAME.
I rewrite it in c++ if that makes things easier, no big deal.

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

I added the skeleton/stub code at 0e9856e
How do you want to proceed?

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

A C++ version, just written.
I'm moderately confident that it should work but not tried.
ABSelectInput.h.txt

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Update because of forgetting to set the T60's
ABSelectInput.h.txt

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

Cool. I will add this in myself later today if you are lacking on time.
I have a few things that need a bit more priority.

btw, do line graphs make any sense for these? I was thinking 3 lines. one for each pair.

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

I'm away a moment, but I can integrate this into your stub shortly, no problem.

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

We can perhaps close this one.

Compared to x42's version, the extra mode option it has is regarding crossfade (overlapping vs non-overlapping)
There is an extra mode where -75% negative means 100% signal 1 + 25% signal 2.

Right now the version as you made only has non-overlapping mode.
Is this overlapping mode something you can add?

@jpcima
Copy link
Contributor Author

jpcima commented Aug 20, 2021

Is this overlapping mode something you can add?

Most likely. I asked around and received another answer:

  • a gain normalizing mode, which adjusts the pair of signals at equal level, which seems indeed useful for A to B comparisons

Other:

  • can we label the input audio with actual A/B related names, instead of 1,2,3,4? (DPF can do this if I recall right)

@falkTX
Copy link
Contributor

falkTX commented Aug 20, 2021

can we label the input audio with actual A/B related names, instead of 1,2,3,4? (DPF can do this if I recall right)

You can yes, there is an optional function to set details of audio ports.

@mxmilkiib
Copy link

How about having a graphics of a bee on the plugin skin?

@falkTX
Copy link
Contributor

falkTX commented Aug 22, 2021

well, no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants