Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Faust-Generated C++ Code


Inner-loop function generated by Faust:

virtual void 
  compute (int count, float** input, float** output) 
{
  float* output0 = output[0];
  for (int i=0; i<count; i++) {
    iVec0[0] = 1;
    iRec0[0] = ((1 + iRec0[1]) & 15);
    ftbl0[iRec0[0]] = (1 - iVec0[1]);
    output0[i] = 
         ((((0.468750f * ftbl0[((iRec0[0] - 1) & 15)]) 
      + (2.343750e-02f * ftbl0[((iRec0[0] - 4) & 15)])) 
      + (0.703125f * ftbl0[((iRec0[0] - 2) & 15)])) 
      - ((0.156250f * ftbl0[((iRec0[0] - 3) & 15)]) 
      + (3.906250e-02f * ftbl0[(iRec0[0] & 15)])));
    // post processing
    iRec0[1] = iRec0[0];
    iVec0[1] = iVec0[0];
  }
}
Test Program (Faust 0.9.9.3 or later):
import("filter.lib");
N = 16;
impulse = 1-1';
process  = impulse : fdelay4(N,1.5);


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download Interpolation.pdf
Download Interpolation_2up.pdf
Download Interpolation_4up.pdf
Visit the online book containing this material.

``Bandlimited Interpolation, Fractional Delay Filtering, and Optimal FIR Filter Design'', by Julius O. Smith III, (From Lecture Overheads, Music 420).
Copyright © 2014-03-24 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]