[LAU] Re: Adding 4 chans in Faust
Brandon Hale <[email protected]>
| Newsgroups | gmane.linux.audio.users |
|---|---|
| Message-ID | <[email protected]> |
On 8/16/25 22:30, Brandon Hale wrote: > On 8/15/25 19:14, Jeanette C. wrote: >> Hi Brandon, >> in your example code put a >> : si.bus(4) >> at the end of your creation of a and b, i.e. send them to a bus of >> width 4: >> a = no.noise, no.noise, no.noise, no.noise : si.bus(4); >> Then I find you can add them and get an output of four channels. I >> haven't checked though if that also yields the expected result. I do >> hope so. >> >> Best wishes, >> >> Jeanette >> > > Thanks Jeanette, unfortunately this didn't fix it though. Is it because > + is only in mono? Faust is still complaining: > > ERROR : sequential composition A:B > The number of outputs [8] of A must be equal to the number of inputs [2] > of B > > Here A = (((_,12345 : +)~(_,1103515245 : *),2.1474836e+09f : /), > ((_,12345 : +)~(_,1103515245 : *),2.1474836e+09f : /),((_,12345 : > +)~(_,1103515245 : *),2.1474836e+09f : /),((_,12345 : > +)~(_,1103515245 ...; > has 8 outputs > > while B = +; > has 2 inputs. > > I just realized there is a faust email list, so I think I'll go ask on > that. If I find a good answer, I will post back here. > > Brandon Hale > I got some help on the faust mailing list (I'm very glad that exists), and the solution is more surprising than I would have thought: a = no.noise,no.noise,no.noise,no.noise; b = no.noise,no.noise,no.noise,no.noise; process = a,b:>si.bus(4); You need route the buses you want summed in parallel, and use the :> operator to route to a bus (with enough channels) and the :> will route all of the channels for you properly. The diagram it generates will also show you how it routes if you have any doubt. Faust definitely makes you have to think a bit differently when it comes to multichannel summing. I'll have to remember this trick, but it's here for anyone who needs it! Brandon Hale _______________________________________________ Linux-audio-user mailing list -- [email protected] To unsubscribe send an email to [email protected]