Oh, I see. I'm trying to use signals from microphones so that's why I hadn't defined them.
I'll see what I can do. Thanks again, Dario <http://dariosanfilippo.tumblr.com> On Sun, 23 Dec 2018 at 23:57, Julius Smith <j...@ccrma.stanford.edu> wrote: > I thought you had those defined :-). > > This should compile: > > import("stdfaust.lib"); > > x0 = 1; > x1 = 2; > x2 = 3; > x3 = 4; > > xs = (x0, x1, x2, x3); > x(i) = ba.take(i+1,xs); > d(i) = i; // delay amount > process = par(i, 4, de.delay(16, d(i), x(i))); > // or just leave four inputs: > // process = par(i, 4, de.delay(16, d(i))); > > On Sun, Dec 23, 2018 at 11:53 PM Dario Sanfilippo > <sanfilippo.da...@gmail.com> wrote: > > > > Hi, Julius. > > > > I'm trying your code with the online editor and if I try to plot the > diagram I get an error: undefined symbol : x0. Was I supposed to change > something in the code or should it run like that? > > > > I also tried adding passing the inputs as arguments in the main process > like this > > > > ins = (x0, x1, x2, x3); > > x(i) = ba.take(i+1, ins); > > process(x0, x1, x2, x3) = par(i, 4, de.delay(16, ba.take(i+1, ins))); > > > > but I get the same error. > > > > Thanks for your help, > > Dario > > > > > > On Sun, 23 Dec 2018 at 23:04, Julius Smith <j...@ccrma.stanford.edu> > wrote: > >> > >> Hi Dario, > >> > >> My usual approach is to use pattern matching: > >> > >> xs = (x0, x1, x2, x3); // bank of input signals > >> x(i) = ba.take(i+1,xs); // i'th signal > >> d(i) = i; // delay amount in branch i > >> process = par(i, 4, de.delay(16, d(i), x(i))); > >> > >> or simply "process = par(i, 4, de.delay(16, d(i));", leaving the input > >> signals unnamed. > >> > >> - Julius > >> > >> On Sun, Dec 23, 2018 at 10:16 PM Dario Sanfilippo > >> <sanfilippo.da...@gmail.com> wrote: > >> > > >> > Hello, list. First days into programming with Faust. > >> > > >> > For example, I would like to have a process with four inputs piloting > the delay lengths of four delay lines in parallel. > >> > > >> > My first guess was to write the following: > >> > > >> > process(x0, x1, x2, x3) = par(i, 4, de.delay(16, xi)); > >> > > >> > but Faust is looking for the xi symbol before i is processed, thus > resulting undefined. > >> > > >> > Is there a way to process i before the matching parameters are looked > for so that inside par there are the corresponding x0, x1, x2, x3? > >> > > >> > Thanks, > >> > Dario > >> > _______________________________________________ > >> > Faudiostream-users mailing list > >> > Faudiostream-users@lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/faudiostream-users > >> > >> > >> > >> -- > >> > >> Julius O. Smith III <j...@ccrma.stanford.edu> > >> Professor of Music and, by courtesy, Electrical Engineering > >> CCRMA, Stanford University > >> http://ccrma.stanford.edu/~jos/ > > > > -- > > Julius O. Smith III <j...@ccrma.stanford.edu> > Professor of Music and, by courtesy, Electrical Engineering > CCRMA, Stanford University > http://ccrma.stanford.edu/~jos/ >
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users