delay-buffer

delay buffer

** A Delay is a basic component. It can be used for reverb, echo, flanging, etc. This delay does not provide feedback. Look out for the feedback module! **

var Delay = require('delay');
  , d = 4000 // in samples not seconds
  , g = .75 // gain of the delay
  , bytes = 4 // 32 bit samples
  , delay = Delay(d, g, bytes);
  
function(t){
  var sample = funhkySample(t);
  return delay(sample) // also accepts option gain param
}