Hey Yann,

thanks for the fast reply!  Now that you say it, this totally makes 
sense and is in line with the way Faust works.  As I said, I'm pretty 
new to Faust, so I don't know much about its quirks yet... :)

However, I think that this should be added to the Faust Quick Reference 
(at the end of section 3.5.3, "C-equivalent primitives") as this is 
something you're bound to fall over when you expect Faust to behave like 
your average math professor.  Maybe something like this:

   Please be aware that -(a * b) is syntactic sugar for _ , (a * b) : -.
   If you want to negate a term, you'll have to use the term 0 - (a * b).

Have a nice week-end,

Martin

 > Hi Martin.
 >
 > Welcome to the mailing list! Your example is not a bug, but a design
 > choice. Let me explain it. Let say you want to express a signal
 > processor that divides an incoming signal by 2. Using Faust core syntax
 > you write:
 > process =_,2:/;
 > But it can be also convenient to have infix notation. Therefore you can
 > also write:
 > process = _/2;
 > which is just syntactic sugar for the first form.
 > There is also a third "partial application" form which is:
 > process = /(2);
 > Which is also syntactic sugar for the first form.
 >
 > Similarly you have:
 > *(2) syntactic sugar for _,2:*
 > +(2) syntactic sugar for _,2:+
 > And guess what ?
 > -(2) syntactic sugar for _,2:-
 >
 > Therefore in Faust -2 and -(2) are not equivalent contrary to most
 > programming languages. In your case you have to write
 > a2 = 0-(0.5 - beta);
 > To get the expected result.
 >
 > Cheers
 >
 > Yann

-- 
www.mzuther.de
www.radix-musik.de

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to