Hi,

Strings are not first-class citizens in Faust. For this reason you can't
write: `"test", -1, 1, x : vbargraph`. Therefore `vbargraph` alone, is not
a valid signal processor and only the form `vbargraph("test",-1,1)` is a
valid one (compiler/parser/faustparser.y:700). It's the same for all UI
elements.

But you can still write:

process(x) = vbargraph("test", -1, 1)(x);


Cheers

Yann

Le dim. 2 mai 2021 à 01:19, Julius Smith <julius.sm...@gmail.com> a écrit :

> I am no expert on the compiler, but it looks to me like there is a missing
> signature for vbargraph defining the four-argument case.  There is a
> similar restriction with button, checkbox, etc., but vgroup and hgroup have
> explicit block-diagram arguments that cannot be "curried out", so to speak.
>
> Maybe the right way to think about it is that "User Interface Elements"
> are not Faust functions in the usual sense,  but something else?  It seems
> like it shouldn't be hard to integrate them more completely, but again,
> I've not looked at the details. Maybe they're parsed separately somehow...
>
> - Julius
>
> On Sat, May 1, 2021 at 9:56 AM Dario Sanfilippo <
> sanfilippo.da...@gmail.com> wrote:
>
>> Thank you for your answers, Oleg and Stéphane.
>>
>> I was wrong assuming that, at least for run-time cases, inputs could
>> always be provided as arguments. If I'm not wrong, that is always possible
>> with Faust-implemented functions (non-primitives).
>>
>> Ciao,
>> Dario
>>
>> On Sat, 1 May 2021 at 18:41, Stéphane Letz <l...@grame.fr> wrote:
>>
>>>
>>>
>>> > Le 1 mai 2021 à 18:37, Oleg Nesterov <o...@redhat.com> a écrit :
>>> >
>>> > Hi Dario,
>>> >
>>> > I can't answer authoritatively, but nobody else bothered to reply and
>>> > I hate the fact this list has a lot of unanswered technical questions.
>>> >
>>> > Add Stephane.
>>> >
>>> > On 04/25, Dario Sanfilippo wrote:
>>> >>
>>> >> Hello, list.
>>> >>
>>> >> I may be missing something obvious but would you know why
>>> >>
>>> >> process(x) = x : vbargraph("test", -1, 1);compiles
>>> >>
>>> >> while
>>> >>
>>> >> process(x) = vbargraph("test", -1, 1, x);
>>> >>
>>> >> doesn't?
>>> >
>>> > Because I think this is literally syntax error.
>>> >
>>> > See compiler/parser/faustparser.y:701
>>> >
>>> >       vbargraph               : VBARGRAPH LPAR uqstring PAR argument
>>> PAR argument RPAR
>>> >
>>> > This means that faust simply can't parse, for example,
>>> >
>>> >       process = 0;
>>> >       unused = vbargraph("test", 0,0,0);
>>> >
>>> > Oleg.
>>>
>>> Yes it it a syntax error, bargraph expects 3 arguments.
>>>
>>> Stéphane
>>>
>>> >
>>>
>>> _______________________________________________
>> Faudiostream-users mailing list
>> Faudiostream-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>>
>
>
> --
> "Anybody who knows all about nothing knows everything" -- Leonard Susskind
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to