!*********
! SuperSaw
!*********

Declareer f; r; N; duur; Amp; c; noot; AantalNoten

Wis buffers
  Wis buffer (F1...F32, S1, S2, S3)    S1  |  S2  |  S3

f    = 32
N    = 50       ! aantal oscillatoren
duur = 1*Fs     ! 10 seconden
Amp  = 800
c    = 1        ! Max frequentie-afwijking in Hz
AantalNoten = 72
!--------------------------------------------
FOR noot = 0 TO AantalNoten
  FOR k = 1 TO N
    r = c * random(1;1000)/1000 - c/2
    Feedback generator
      Frequentie (Hz of TOETS)     f + r
      Amplitude                    Amp
      Golfvorm                     zaag
      Spoor: S?[?]                 S1[noot*Fs + k*(Fs/f)/N]
      Duur                         duur
      Fijnstemmer ('j' of 'n')     j
      Attack  (msec)               150
      Decay   (msec)               0
      Sustain (0...1)              1
      Release (msec)               2000
      ADSR type ('lin' of 'exp')   exp
      Filtercoefficient a          0,9
      Filtercoefficient b          0,1
    r = c * random(1;1000)/1000 - c/2
    Feedback generator
      Frequentie (Hz of TOETS)     f + r
      Amplitude                    Amp
      Golfvorm                     zaag
      Spoor: S?[?]                 S2[noot*Fs + k*(Fs/f)/N]
      Duur                         duur
      Fijnstemmer ('j' of 'n')     j
      Attack  (msec)               100
      Decay   (msec)               0
      Sustain (0...1)              1
      Release (msec)               2000
      ADSR type ('lin' of 'exp')   exp
      Filtercoefficient a          0,9
      Filtercoefficient b          0,1
  NEXT k
  Print f
  f = f*(2^(1/12))
NEXT noot

Butterworth Laagdoorlaat
  Input                         S1[0]
  Output                        S1[0]
  Afsnijfrequentie (Hz)         1000
  Flanksteilheid (1,2,3...50)   1
  Duur (ook 'sec')              AantalNoten*duur + 4*Fs
  Volume (0...100)              1
  Additief ('j' of 'n')         n

Butterworth Laagdoorlaat
  Input                         S2[0]
  Output                        S2[0]
  Afsnijfrequentie (Hz)         1000
  Flanksteilheid (1,2,3...50)   1
  Duur (ook 'sec')              AantalNoten*duur + 4*Fs
  Volume (0...100)              1
  Additief ('j' of 'n')         n

Print (2^(1/12))