René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

nlfilt (Csound opcode)

asig_filtered nlfilt asig, ka, kb, kd, kC, kL
/csound/opcodes/nlfilt_formula.gif
nlfilt is a non linear filter. It can be made to behave as a recirculating comb filter, with or without the non-linear part.
The following demonstrates a low pass resonant filter:
nlfilt.orc
sr     = 44100
kr     = 4410
ksmps  = 10
nchnls = 2

instr 1
  ilen = p3

  asig oscili 1, 440, 1

  ; cut off requency moves down from 880 to 220
  kfco expseg 880, ilen, 220


  ifqcadj  =      .149659863*sr
  kc     =        ifqcadj/kfco
  krez   =        1000/(1+exp(kfco/11000))
  ka     =        kc/krez - 1
  kasq    =       kc*kc
  kb     =        1+ka+kasq
  
  asig_filt    nlfilt   asig/kb, (ka+2*kasq)/kb, -kasq/kb, 0, 0, 1

  outs asig*30000, asig_filt*300
endin
nlfilt.sco
f1 0   2048 10 1
i1 0 1
This opcode is used for the following instruments: