I agree the current way to deal with inputs and outputs is too simple
and restricted for many use cases, e.g. CV (control voltage) plugins
often have parameters at frame rate that can also be controlled via CV
at sample rate; LV2 and JACK allow CV as a special port type (i.e. you
can't connect an audio port to a CV port), mark an input as a
sidechain input and, of course, naming ports.

I'd propose introducing two optional primitives,
input("Name[key=val]") and output("Name[key=val]") that can be
annotated with metadata just like the UI primitives and basically work
the same way, but at sample rate. Example:

lin = input("[0]Left In[symbol:in_l]"); // S⁰ → S¹
rin = input("[1]Right In[symbol:in_r]");

declare lout group_channel "l";
lout = output("Left Out"); // S¹ → S⁰
declare rout group_channel "r";
rout = output("Right Out");

process = lin, rin : re.stereo_freeverb(0.1, 0.2, 0.2, input("Spread
cv[type:cv][unit:percent]")) : lout, rout;

For most build targets this metadata would probably only be relevant
in the UI code (which can simply ignore it) while in DSP code it's
equivalent to using _, _ for ports.
I believe this would also make it easier to write sidechain inputs
later in the processing chain, provided the input() function is S⁰→S¹
just like for example vslider().

Flo



Am Sa., 15. Aug. 2020 um 15:13 Uhr schrieb Christopher Arndt
<ch...@chrisarndt.de>:
>
> Hi all,
>
> is it possible to name or annotate the inputs and outputs of the final
> processing chain?
>
> I suppose I could stick the information in the meta data with declare, e.g.:
>
> declare inputs__0__name "Audio In L";
> declare inputs__0__symbol "in_l";
> declare inputs__1__name "Audio In R";
> declare inputs__1__symbol "in_r";
> declare outputs__0__name "Audio Out L";
> declare outputs__0__symbol "out_l";
> ... etc
>
> but if there is already an established way, I'd be glad to use it, so I
> wouldn't need to mess with parsing/splitting the meta data keys into
> keys and sub-keys. It seems that meta keys must be valid identifiers,
> i.e. only [a-zA-Z0-9_] but the manual isn't very clear about that. Is
> there a formal description of the "declare" syntax I could look up?
>
>
> Chris
>
>
>
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users



--
Florian Hülsmann
<f...@cbix.de>
http://cbix.de


_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to