I don't really have time to help you today, so I'll make this quick.

Am Montag, 17. Juli 2017, 16:08:40 CEST schrieb Yassin Philip:
> See, I thought that
> 
> Inverted(b, x) = if(b, 1 - x, x);
>
> Defined x...

"Inverted" is a function of b and x that passes x through untouched (if b is 
false) or inverts it 
(if b is true).  Note that it can be used without explicitly passing x, i.e.:

process = Inverted(b); // same as _ : Inverted(b)

which hopefully answers one of your previous questions with regards to 
functions acting as 
input to other functions (just chain them).

> And about that "if", where are Faust's control structures
> syntax documented? Is it a standard C++ if?

if() is a library function that uses select2(), which is documented in the 
quick-reference.  
select2() is basically a switch in a signal flow graph (as used in graphical 
signal processing 
models).

> As far as I know, there are two pieces of documentation for Faust : The
> Quick Reference <http://faust.grame.fr/docs/faust-quick-reference.pdf>
> PDF and the "Libraries" doc <http://faust.grame.fr/library.html>. I
> think I'm missing something, am I not?

Since it's a library function, "if()" is documented in the in the library (in 
the PDF on page 38).

> Please, if anybody reading this know of a working example of an
> amplitude following function, please let me know!
> 
> Phil

I'm not an expert on the topic, but an "amplitude follower" to me sounds like 
an envelope 
detector, which can be implemented as a half-wave rectifier followed by a 
low-pass filter (see 
https://en.wikipedia.org/wiki/Envelope_detector, does that look like what you 
mean?).  But 
you'll have to dig for that yourself at the moment, I think.

Looking at your later email, the various amp_detector() functions do exactly 
what I explained 
above (except they use the magnitude instead of half-wave rectification).

HTH
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to