I'm at git 682bf11188e5486610c284900943c5519b2acd87. With this simple test code:
import("music.lib"); gain = hslider("gain",0,0,1,0.1) : bsmooth; process = *(gain); 'faust test.dsp' gives a compute function like this: virtual void compute (int count, FAUSTFLOAT** input, FAUSTFLOAT** output) { int iSlow0 = min(4096, max(1, count)); float fSlow1 = (1.0f / float(iSlow0)); float fSlow2 = float(fslider0); int iSlow3 = int(iSlow0); FAUSTFLOAT* input0 = input[0]; FAUSTFLOAT* output0 = output[0]; for (int i=0; i<count; i++) { fVec0[IOTA&8191] = fSlow2; fRec0[0] = (fRec0[1] + (fSlow1 * (fSlow2 - fVec0[(IOTA-iSlow3)&8191]))); output0[i] = (FAUSTFLOAT)((float)input0[i] * fRec0[0]); // post processing fRec0[1] = fRec0[0]; IOTA = IOTA+1; } } while 'faust -vec test.dsp' gives the following, see my comment on the third line: virtual void compute (int fullcount, FAUSTFLOAT** input, FAUSTFLOAT** output) { float fRec0_tmp[32+4]; int iSlow0 = min(4096, max(1, count)); /// <--- count is not an existing variable here float fSlow1 = (1.0f / float(iSlow0)); float fSlow2 = float(fslider0); int iSlow3 = int(iSlow0); float* fRec0 = &fRec0_tmp[4]; int index; for (index = 0; index <= fullcount - 32; index += 32) { // compute by blocks of 32 samples const int count = 32; FAUSTFLOAT* input0 = &input[0][index]; FAUSTFLOAT* output0 = &output[0][index]; // SECTION : 1 // LOOP 0x7ffdb347e880 // pre processing fVec0_idx = (fVec0_idx+fVec0_idx_save)&8191; // exec code for (int i=0; i<count; i++) { fVec0[(fVec0_idx+i)&8191] = fSlow2; } // post processing fVec0_idx_save = count; // SECTION : 2 // LOOP 0x7ffdb347ddf0 // pre processing for (int i=0; i<4; i++) fRec0_tmp[i]=fRec0_perm[i]; // exec code for (int i=0; i<count; i++) { fRec0[i] = (fRec0[i-1] + (fSlow1 * (fSlow2 - fVec0[(fVec0_idx+i-iSlow3)&8191]))); } // post processing for (int i=0; i<4; i++) fRec0_perm[i]=fRec0_tmp[count+i]; // SECTION : 3 // LOOP 0x7ffdb347dd10 // exec code for (int i=0; i<count; i++) { output0[i] = (FAUSTFLOAT)((float)input0[i] * fRec0[i]); } } if (index < fullcount) { // compute the remaining samples if any int count = fullcount-index; FAUSTFLOAT* input0 = &input[0][index]; FAUSTFLOAT* output0 = &output[0][index]; // SECTION : 1 // LOOP 0x7ffdb347e880 // pre processing fVec0_idx = (fVec0_idx+fVec0_idx_save)&8191; // exec code for (int i=0; i<count; i++) { fVec0[(fVec0_idx+i)&8191] = fSlow2; } // post processing fVec0_idx_save = count; // SECTION : 2 // LOOP 0x7ffdb347ddf0 // pre processing for (int i=0; i<4; i++) fRec0_tmp[i]=fRec0_perm[i]; // exec code for (int i=0; i<count; i++) { fRec0[i] = (fRec0[i-1] + (fSlow1 * (fSlow2 - fVec0[(fVec0_idx+i-iSlow3)&8191]))); } // post processing for (int i=0; i<4; i++) fRec0_perm[i]=fRec0_tmp[count+i]; // SECTION : 3 // LOOP 0x7ffdb347dd10 // exec code for (int i=0; i<count; i++) { output0[i] = (FAUSTFLOAT)((float)input0[i] * fRec0[i]); } } } On Mon, Jan 12, 2015 at 4:33 PM, Stéphane Letz <l...@grame.fr> wrote: > > 1) which Faust compiler version? > > 2) can you send the exact dsp code you're compiling? > > Thanks. > > Stéphane > > Le 12 janv. 2015 à 16:29, Jonatan Liljedahl <li...@kymatica.com> a écrit : > >> Hi, >> >> I'm trying to use bsmooth from music.lib, but get compilation failure: >> >> Use of undeclared identifier 'count'. >> >> Looking at the generated c++ code, the variable is called 'fullcount'. >> >> On the other hand, with -vec we have several small loops where the >> variable is called 'count'. >> >> Maybe bsmooth doesn't work when combined with -vec? >> >> -- >> /Jonatan >> http://kymatica.com >> >> ------------------------------------------------------------------------------ >> New Year. New Location. New Benefits. New Data Center in Ashburn, VA. >> GigeNET is offering a free month of service with a new server in Ashburn. >> Choose from 2 high performing configs, both with 100TB of bandwidth. >> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >> vanity: www.gigenet.com >> _______________________________________________ >> Faudiostream-devel mailing list >> Faudiostream-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/faudiostream-devel > -- /Jonatan http://kymatica.com ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. vanity: www.gigenet.com _______________________________________________ Faudiostream-devel mailing list Faudiostream-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-devel