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

Delay Line in FAUST


import("stdfaust.lib");
maxDelay = 16;
currentDelay = 5;
process = de.delay(maxDelay, currentDelay);
Generated C++ Code (Optimized!):
class mydsp : public dsp {
  ...
  float fVec0[6];
  ...
  virtual void compute(int count,
       FAUSTFLOAT** inputs, 
       FAUSTFLOAT** outputs)
  {
    FAUSTFLOAT* input0 = inputs[0];
    FAUSTFLOAT* output0 = outputs[0];
    for (int i = 0; (i < count); i = (i + 1)) {
      fVec0[0] = float(input0[i]);
      output0[i] = FAUSTFLOAT(fVec0[5]);
      for (int j0 = 5; (j0 > 0); j0 = (j0 - 1)) {
              fVec0[j0] = fVec0[(j0 - 1)];
      }
    }}};

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

Download Delay.pdf
Download Delay_2up.pdf
Download Delay_4up.pdf

``Computational Acoustic Modeling with Digital Delay'', by Julius O. Smith III, (From Lecture Overheads, Music 420).
Copyright © 2020-02-11 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]