On 5 Apr 2014, at 17:55, Aaron Heller wrote: > Hi Geoffrey, > > I found recursive composition the most difficult part of Faust to master. > One think to keep in mind is that the ~ operator has the highest precedence > of all the operators, so when you write A ~ B, the output of B is split into > two signals, one will be connected to the first input of A, the other is an > output. In your case, where you want to send it to an earlier operator, you > need to add parentheses to override the precedence. I think this does what > you want: > > process = ((*(1),*(2) :+) ~ *(3)) ~ *(4) ; > or > process = (*(1),*(2) :>_) ~ (_<: *(3), *(4)) ; > > I did it as a number of small steps, using faust2firefox at each step to > confirm > > process = *(1),*(2); // two wires with gain > > process = *(1),*(2) :+ ; // sum them > > process = (*(1),*(2) :+) ; // group to override ~ precidence > > process = (*(1),*(2) :+) ~ *(3) ; // first recursive loop, uses first input > of + > > process = ((*(1),*(2) :+) ~ *(3)) ; // group again > > process = ((*(1),*(2) :+) ~ *(3)) ~ *(4) ; // second recursive loop, uses > second input of + > > // reduce to one recursive composition, the A ~ B structure is clearer > > process = (*(1),*(2) :+) ~ (_<: *(3), *(4)) ; > > // for complete symmetry, replace + with merge > > process = (*(1),*(2) :>_) ~ (_<: *(3), *(4)) ;
Thanks for the blow-by-blow. It nearly gets there, its a great help. I was also wanting to use a 'butterfly' in the feedback (which I omitted for simplicity in my post), so needed the separate feeds to the feedback loop. I think I see how to get there now! thanks and regards, Geoffrey > > I hope that helps, > > Aaron Heller ([email protected]) > Menlo Park, CA US > > > > > On Sat, Apr 5, 2014 at 4:01 AM, Geoffrey Barton <[email protected]> wrote: > Firstly, not having posted before, I should like to express my admiration for > the creators of Faust. It has a way to go but already shows a better way of > writing signal processing code! > > > Is there any way of getting a feedback structure such as:- > > process=_,_: (*(x1),*(x2)): + ~ (*(y1),*(y2)); > > > so that the input gain x1 sums with the feedback gain path y1 and the input > gain x2 to the feedback path y2? > > I have tried all kinds of re-arrangement but, being a beginner at Faust, it > either does not compile or ends up with the same block diagram as before! > > Geoffrey > > ------------------------------------------------------------------------------ > > _______________________________________________ > Faudiostream-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/faudiostream-users > >
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------
_______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users
