;  #############################################################
;  soundfile ex4-3   :  gbuzz : variable kr  Csound Tutorial
;  #############################################################
instr 1
  a1 expseg 1,.2,8000,p3-.4,5000,.2,1
  ipitch = cpspch(p4)
  k1 expon p6,p3,p7
  iharmonics = int((.5*SR)/ipitch)  
  ; "iharmonics" returns the maximum number of harmonics below Nyquist
    print ipitch, iharmonics
  a1 gbuzz a1,ipitch,iharmonics,p5,k1,1 
  out a1
endin

