QUICK-REF - CsoundManual - Previous section - Next Section - Contents - Index - Next 

REFERENCE

Constants and variables  
Arithmetic operations  
Conditional values  
Expressions
Assignment statements  
Program control statements  
Duration control statements 
Orchestra Macros
Value converters  
Pitch converters  
MIDI converters
Signal generators  
Signal modifiers 

GEN Functions

Spectral data types  
Sensing and control
Signal input and output  
Signal Display  
Zak Patch System
 

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 
 

CONDITIONAL VALUES

    (a > b      ?  v1 : v2)
    (a < b      ?  v1 : v2)
    (a  > = b   ?  v1 : v2)
    (a  < = b   ?  v1 : v2)
    (a  = = b   ?  v1 : v2)
    (a  ! = b   ?  v1 : v2)
 

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

ASSIGNMENT STATEMENTS

     ir   =        iarg
     kr   =        karg
     ar   =        xarg
     kr   init     iarg
     ar   init     iarg
     ir   tival
     ir   divz     ia, ib, isubst   (these not yet implemented)
     kr   divz     ka, kb, ksubst
     ar   divz     xa, xb, ksubst

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

PROGRAM CONTROL STATEMENTS


QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

VALUE CONVERTERS

          ftlen(x)       (init-rate args only)
          int(x)         (init- or control-rate args only)
          frac(x)        (init- or control-rate args only)
          dbamp(x)       (init- or control-rate args only)
          i(x)           (control-rate args only)
          abs(x)         (no rate restriction)
          exp(x)         (no rate restriction)
          log(x)         (no rate restriction)
          atan(x)        (no rate restriction)
          tanh(x)         (no rate restriction)
          sqrt(x)        (no rate restriction)
          sin(x)         (no rate restriction)
          cos(x)         (no rate restriction)
          ampdb(x)       (no rate restriction)
          rnd(x)         (init- or control-rate args only)
          birnd(x)       (init- or control-rate args only)
          ftlptim(x)     (init-rate args only)

  ir      ipow            iarg, kpow
  kr      kpow            karg, kpow, [inorm]
  ar      apow            aarg, kpow, [inorm]

          rnd(x)         (init- or control-rate args only)
          birnd(x)       (init- or control-rate args only)
          ftlen(x)       (init-rate args only)
          ftlptim(x)     (init-rate args only)

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

PITCH CONVERTERS

          octpch(pch)         (init- or control-rate args only) 
          pchoct(oct)         (init- or control-rate args only) 
          cpspch(pch)         (init- or control-rate args only) 
          octcps(cps)         (init- or control-rate args only) 
          cpsoct(oct)         (no rate restriction)  
icps      cps2pch             ipch, iequal
icps      cpsxpch             ipch, iequal, irepeat, ibase

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

MIDI CONVERTERS

   
   ival    notnum  
   ival    veloc   
   icps    cpsmidi 
   icps    cpsmidib
   kcps    cpsmidib     [irange] 
   ioct    octmidi 
   ioct    octmidib
   koct    octmidib     [irange]
   ipch    pchmidi 
   ipch    pchmidib
   kpch    pchmidib     [irange] 
   iamp    ampmidi      iscal[, ifn]
   kaft    aftouch      iscal 
   kchpr   chpress      iscal
   kbend   pchbend      iscal 
   ival    midictrl     inum[, initial]
   kval    midictrl     inum[, initial] 
   kval    midictrlsc   inum[, iscal][, ioffset][, initial]
   ival    chanctrl     ichnl, ictlno[,ilow,ihigh]
   kval    chanctrl     ichnl, ictlno[,ilow,ihigh]
           ctrlinit     ichnkm, ictlno1, ival1[, ictlno2, ival2[, ictlno3, ival3[,..ival32]]

           moscil       kchn, knum, kvel, kdur, kpause
           kon          kchn, knum, kvel

   idest   imidic7      ictlno, imin, imax [, ifn]
   kdest   midic7       ictlno, kmin, kmax [, ifn] 
   idest   imidic14     ictlno1, ictlno2, imin, imax [, ifn]
   kdest   midic14      ictlno1, ictlno2, kmin, kmax [, ifn]   
   idest   imidic21     ictlno1, ictlno2, ictlno3, imin, imax [, ifn]
   kdest   midic21      ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]

   idest   ictrl7       ichan, ictlno, imin, imax [,ifn]
   kdest   ctrl7        ichan, ictlno, kmin, kmax [,ifn]
   idest   ictrl14      ichan, ictlno1, ictlno2, imin, imax [,ifn]
   kdest   ctrl14       ichan, ictlno1, ictlno2, kmin, kmax [,ifn]
   idest   ictrl21      ichan, ictlno1, ictlno2, ictlno3, imin, imax [,ifn]
   kdest   ctrl21       ichan, ictlno1, ictlno2, ictlno3, kmin, kmax [,ifn]

           ioutc        ichn, inum, ivalue, imin, imax
           koutc        kchn, knum, kvalue, kmin, kmax
           ioutc14      ichn, imsb, ilsb, ivalue, imin, imax
           koutc14      kchn, kmsb, klsb, kvalue, kmin, kmax
           ioutpb       ichn, ivalue, imin, imax
           koutpb       kchn, kvalue, kmin, kmax
           ioutat       ichn, ivalue, imin, imax
           koutat       kchn, kvalue, kmin, kmax
           ioutpc       ichn, iprog, imin, imax
           koutpc       kchn, kprog, kmin, kmax
           ioutpat      ichn, inotenum, ivalue, imin, imax
           koutpat      kchn, knotenum, kvalue, kmin, kmax

           mclock       ifreq
           mrtmsg       imsgtype

           xtratim      iextradur
   kflag   release

           ion          ichn, inum, ivel
           ioff         ichn, inum, ivel
           iondur       ichn, inum, ivel, idur
           iondur2      ichn, inum, ivel, idur

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

SIGNAL GENERATORS

     kr   line          ia, idur1, ib
     ar   line          ia, idur1, ib
     kr   expon         ia, idur1, ib 
     ar   expon         ia, idur1, ib 
     kr   linseg        ia, idur1, ib[, idur2, ic[...]] 
     ar   linseg        ia, idur1, ib[, idur2, ic[...]] 
     kr   linsegr   ia, idur1, ib[, idur2, ic[...]], irel, iz
     ar   linsegr   ia, idur1, ib[, idur2, ic[...]], irel, iz

     kr   expseg        ia, idur1, ib[, idur2, ic[...]] 
     ar   expseg        ia, idur1, ib[, idur2, ic[...]] 
     kr   expsegr   ia, idur1, ib[, idur2, ic[...]], irel, iz
     ar   expsegr   ia, idur1, ib[, idur2, ic[...]], irel, iz

     kr   phasor        kcps[, iphs]
     ar   phasor        xcps[, iphs]

     ir   table         indx, ifn[, ixmode][, ixoff][, iwrap]
     ir   tablei        indx, ifn[, ixmode][, ixoff][, iwrap]
     kr   table         kndx, ifn[, ixmode][, ixoff][, iwrap]
     kr   tablei        kndx, ifn[, ixmode][, ixoff][, iwrap]
     ar   table         andx, ifn[, ixmode][, ixoff][, iwrap]
     ar   tablei        andx, ifn[, ixmode][, ixoff][, iwrap]
     kr   oscil1        idel, kamp, idur, ifn
     kr   oscil1i       idel, kamp, idur, ifn
     ar   osciln        kamp, ifrq, ifn, itimes

     kr   oscil         kamp, kcps, ifn[, iphs]
     kr   oscili        kamp, kcps, ifn[, iphs]
     ar   oscil         xamp, xcps, ifn[, iphs]
     ar   oscili        xamp, xcps, ifn[, iphs]
     ar   foscil        xamp, kcps, kcar, kmod, kndx, ifn[, iphs]

          itablew       isig, indx, ifn [,ixmode] [,ixoff] [,iwgmode]
          tablew        ksig, kndx, ifn [,ixmode] [,ixoff] [,iwgmode] 
          tablew        asig, andx, ifn [,ixmode] [,ixoff] [,iwgmode] 
          tablewkt      ksig, kndx, kfn [,ixmode] [,ixoff] [,iwgmode]  
          tablewkt      asig, andx, kfn [,ixmode] [,ixoff] [,iwgmode] 

     ir   itableng      ifn 
     kr   tableng       kfn
          itablegpw     ifn
          tablegpw      kfn
          tablemix      kdft, kdoff, klen, ks1ft, ks1off, ks1g, ks2ft, \
                          ks2off, ks2g
          itablemix     idft, idoff, ilen, is1ft, is1off, is1g, is2ft, \
                          is2off, is2g
          tablecopy     kdft, ksft 
          itablecopy    idft, isft  

     ar   tablera       kfn, kstart, koff
 kstart   tablewa       kfn, asig, koff 

     ar   foscili       xamp, kcps, kcar, kmod, kndx, ifn[, iphs]

ar1[,ar2] loscil        xamp, kcps, ifn[, ibas][, imod1v,ibeg1,iend1] \
                          [, imod2,ibeg2,iend2]
ar1[,ar2] doscil        xamp, ifn

     ar   poscil        kamp, kcps, kfrac[, iphs]
     ar   buzz          xamp, xcps, knh, ifn[, iphs]
     ar   gbuzz         xamp, xcps, knh, kih, kr, ifn[, iphs]

     ar   adsyn         kamod, kfmod, ksmod, ifilcod 
     ar   pvoc          ktimpnt, kfmod, ifilcod[, ispecwp]

 fr,kap   pvread        ktimpnt,  ifile, ibin                   
          pvbufread     ktimpnt, ifile
     ar   pvinterp      ktimpnt, kfmod, ifile, kfreqscale1,\
                        kfreqscale2, kampscale1, kampscale2, \
                        kfreqinterp, kampinterp
     ar   pvcross       ktimpnt, kfmod, ifile, kamp1, kamp2,[ispecwp]
          tableseg      ifn1, idur1, ifn2[, idur2, ifn3[...]]
          tablexseg     ifn1, idur1, ifn2[, idur2, ifn3[...]]
     ar   vpvoc         ktimpnt, kfmod, ifile, [ispecwp]
     a2   pvadd         ktimpnt, kfmod, ifile, ifn, ibins [, ibinoffset,
                            ibinincr]

     ar   cross2        ain1, ain2, isize, ioverlap, iwin, kbias
     ar   fof           xamp, xfund, xform, koct, kband, kris, kdur, kdec, \
                           iolaps, ifna, ifnb, itotdur[, iphs][, ifmode] 
     ar   fof2          xamp, xfund, xform, koct, kband, kris, kdur, kdec, \
                           iolaps, ifna, ifnb, itotdur, kphs, kgliss 
     ar   fog           xamp, xdens, xtrans, xspd, koct, kband, kris,  \
                        kdur, kdec, iolaps, ifna, ifnb, itotdur[, iphs] \    
                           [, itmode] 
     ar   grain         xamp, xpitch, xdens, kampoff, kpitchoff, \
                           kgdur, igfn,iwfn,imgdur
     ar   granule       xamp, ivoice, iratio, imode, ithd, ifn, \
                           ipshift,igskip, igskip_os, ilength, kgap, igap_os,\
                           kgsize, igsize_os, iatt, idec [,iseed][,ipitch1] \
                           [,ipitch2][,ipitch3][,ipitch4][,ifnenv]

 ar[,ac]  sndwarp       xamp, xtimewarp, xresample, ifn1, ibeg,\
                          iwsize, irandw, ioverlap, ifn2, itimemode
ar1,ag2[,ac1,ac2] sndwarpst xamp, xtimewarp, xresample, ifn1,\
                          ibeg, iwsize, irandw, ioverlap, ifn2, itimemode

     ar   pluck         kamp, kcps, icps, ifn, imeth [, iparm1, iparm2] 
     ar   wgpluck2      iplk, xam, icps, kpick, krefl
     ar   repluck       iplk, xam, icps, kpick, krefl, axcite

     ar   wgbow       kamp, kfreq, kpres, krat, kvibf, kvamp, ifn[, iminfreq]
     ar   wgflute       kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, \
                              ifn[, iminfreq]
     ar   wgbrass       kamp, kfreq, iatt, kvibf, kvamp, ifn[, iminfreq]
     ar   wgclar        kamp, kfreq, kstiff, iatt, idetk, kngain, kvibf, kvamp, \
                              ifn[, iminfreq]
     ar   shaker        kamp, kfreq, kbeans, kdamp, knum, ktimes[, idecay]
     a1   moog          kamp, kfreq, kfiltq, kfiltrate, kvibf, kvamp, iafn, \
                              iwfn, ivfn
     ar   marimba       kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec
     ar   vibes         kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec       
     a1   mandol        kamp, kfreq, kpluck, kdetune, kgain, ksize, ifn[, iminfreq]
     ar   agogobel      kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn
     a1   voice         kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn

     a1   fmvoice       kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate, ifn1, ifn2, \
                              ifn3, ifn4, ivibfn
     a1   fmtbell       kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     a1   fmrhode       kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     a1   fmwurlr       kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     a1   fmheavmet     kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     a1   fmb3ham       kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     a1   fmpercfl      kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn

     kr   rand          xamp[, iseed]
     kr   randh         kamp, kcps[, iseed]
     kr   randi         kamp, kcps[, iseed]
     ar   rand          xamp[, iseed]
     ar   randh         xamp, xcps[, iseed]
     ar   randi         xamp, xcps[, iseed]

          xlinrand      krange 
          xtrirand      krange
          xexprand      krange
          xbexprnd      krange
          xcauchy               kalpha
          xpcauchy      kalpha
          xpoisson      klambda
          xgauss        krange
          xweibull      ksigma, ktau
          xbeta         krange, kalpha, kbeta
          xuniform      krange

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

SIGNAL MODIFIERS

     kr   linen         kamp, irise, idur, idec
     ar   linen         xamp, irise, idur, idec
     kr   linenr        kamp, irise, idec, iatdec
     ar   linenr        xamp, irise, idec, iatdec
     kr   envlpx        kamp, irise, idur, idec, ifn, iatss, iatdec[, ixmod]
     ar   envlpx        xamp, irise, idur, idec, ifn, iatss, iatdec[, ixmod]

     kr   port          ksig, ihtim[, isig]
     kr   kport         ksig, khtim[, isig]
     ar   tone          asig, khp[, istor]
     ar   atone         asig, khp[, istor]
     ar   reson         asig, kcf, kbw[, iscl, istor]
     ar   areson        asig, kcf, kbw[, iscl, istor]

     ar   butterhp      asig, kfreq [,iskip]
     ar   butterlp      asig, kfreq [,iskip]
     ar   butterbp      asig, kfreq, kband [,iskip]
     ar   butterbr      asig, kfreq, kband [,iskip]
 
     ar   nlfilt        ain, ka, kb, kd, kL, kC

     a1   filter2       asig, iM,iN,ib0,ib1,..., ibM,ia1,ia2,...,iaN
     k1   kfilter2      ksig, iM,iN,ib0,ib1,...,ibM,ia1,ia2,...,iaN
     a1   zfilter2      asig, kdamp,kfreq,iM,iN,ib0,ib1,...,ibM,ia1,ia2,...,iaN
     a1   dcblock       asig [,ig]

krmsr,krmso,kerr,kcps lpread  ktimpnt, ifilcod [, inpoles][,ifrmrate]
     ar   lpreson       asig
     ar   lpfreson      asig, kfrqratio
          lpslot        islot
          lpinterpol    islot1,islot2,kmix

     kr   rms           asig[, ihp, istor]
     nr   gain          asig, krms[, ihp, istor]
     ar   balance       asig, acomp[, ihp, istor]
     kr   follow        asig,  idt
     ar   dam           ain, kthreshold, icomp1, icomp2, rtime, ftime
     kr   downsamp      asig[, iwlen]
     ar   upsamp        ksig
     ar   interp        ksig[, istor]
     kr   integ         ksig[, istor]
     ar   integ         asig[, istor]
     kr   diff          ksig[, istor]
     ar   diff          asig[, istor]
     kr   samphold      xsig, kgate[, ival, ivstor]
     ar   samphold      asig, xgate[, ival, ivstor]

     ar   harmon        asig, kestfrq, kmaxvar, kgenfreq1,\
                            kgenfreq2, imode, iminfrq, iprd
 

     ar   delayr        idlt[, istor]
          delayw        asig
     ar   delay         asig, idlt[, istor]
     ar   delay1        asig[, istor]
     ar   deltap        kdlt
     ar   deltapi       xdlt
     ar   multitap      asig, itime1, igain1, itime2, igain2...
     ar   vdelay        asig, adel, imaxdel  [, iskip]

     ar   comb          asig, krvt, ilpt[, istor]
     ar   alpass        asig, krvt, ilpt[, istor]
     ar   reverb        asig, krvt[, istor]
     ar   reverb2       asig, ktime, khdif [,iskip]
ar1[,ar2[,ar3[,ar4]]]  convolve   ain,ifilcod,channel


QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

OPERATIONS USING SPECTRAL DATA-TYPES

     dsig octdown   xsig, iocts, isamps[, idisprd]
     wsig noctdft   dsig, iprd, ifrqs, iq[, ihann, idbout, idsines]
     wsig specaddm  wsig1, wsig2[, imul2]
     wsig specdiff  wsigin
     wsig specscal  wsigin, ifscale, ifthresh
     wsig spechist  wsigin,
     wsig specfilt  wsigin, ifhtim
     koct specptrk  wsigin, inptls, irollof, iodd,[,interp, ifprd, iwtflg]
     ksum specsum   wsig[, interp]
          specdisp  wsig, iprd[, iwtflg]

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

SENSING AND CONTROL

     ktemp     tempest   kin, iprd, imindur, imemdur, ihp, ithresh, \
                         ihtim, ixfdbak,istartempo, ifn[, idisprd, \
                         [itweek] 
     kx, ky    xyin      iprd, ixmin, ixmax, iymin, iymax[, ixinit, iyinit] 
               tempo     ktempo, istartempo 
     kr        timek   
     kr        times
     ir        itimek
     ir        itimes
     kr        instimek
     kr        instimes

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

SIGNAL INPUT AND OUTPUT

a1              in 
a1, a2          ins 
a1, a2, a3, a4  inq 

a1              soundin  ifilcod[, iskptim][, iformat]
a1, a2          soundin  ifilcod[, iskptim][, iformat]
a1, a2, a3, a4  soundin  ifilcod[, iskptim][, iformat]
a1[,a2[,a3,a4]] diskin   ifilcod, kpitch[, iskiptim] \    
                          [, iwraparound][, iformat]
                out      asig
                outs1    asig
                outs2    asig
                outs     asig1, asig2

                outq1    asig
                outq2    asig
                outq3    asig
                outq4    asig
                outq     asig1, asig2, asig3, asig4

a1, a2, a3, a4  pan      asig, kx, ky, ifn[, imode][,ioffset]

a1, a2          locsig   asig, kdegree, kdistance, kreverbsend     
a1, a2, a3, a4  locsig   asig, kdegree, kdistance, kreverbsend 
a1, a2          locsend
a1, a2, a3, a4  locsend

a1, a2, a3, a4  space    asig, ifn, ktime, kreverbsend [,kx, ky]  
a1, a2, a3, a4  spsend
k1              spdist   ifn, ktime, [,kx, ky] 


 aLeft, aRight  hrtfer   asig, kAz, kElev, "HRTFcompact"

k1              kread   ifilname, iformat, iprd[, interp]
k1,k2           kread2  ifilname, iformat, iprd[, interp]
k1,k2,k3        kread3  ifilname, iformat, iprd[, interp]
k1,k2,k3, k4    kread4  ifilname, iformat, iprd[, interp]

                kdump    ksig, ifilname,iformat,iprd
                kdump2   ksig1, ksig2, ifilname,iformat,iprd
                kdump3   ksig1, ksig2, ksig3, ifilname,iformat,iprd
                kdump4   ksig1, ksig2, ksig3, ksig4, ifilname,iformat,iprd

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

SIGNAL DISPLAY

          print     iarg[, iarg,...]
          display   xsig, iprd[, iwtflg]
          dispfft   xsig, iprd, iwsiz[, iwtyp][, idbouti][, iwtflg]
          printk    kval, ispace [, itime]
          printk2   kvar [, numspaces]
          printks   "txtstring", itime, kval1, kval2, kval3, kval4

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

THE ZAK PATCH SYSTEM

          zakinit isizea, isizek
  ir      zir     indx                    
  kr      zkr     kndx                    
          ziw     isig, indx              
          zkw     ksig, kndx              
          ziwm    isig, indx, imix        
          zkwm    ksig, kndx, kmix        
  
  kr      zkmod    ksig, kzkmod
  ar      zamod    asig, kzamod
          zkcl    kfirst, klast           
          zacl    kfirst, klast    

  ar      zar     kndx                    
  ar      zarg    kndx, kgain             
          zaw     asig, kndx              
          zawm    asig, kndx, kmix

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Appendices 

GEN FUNCTIONS

    f#  time  size  1   filcod skiptime format channel
    f#  time  size  2   v1 v2 v3 . . .   
    f#  time  size  3   xval1 xval2  c0  c1  c2 . . . cn   
    f#  time  size  4   source#  sourcemode   
    f#  time  size  5   a n1 b n2 c . . .  
    f#  time  size  6   a n1 b n2 c n3  d . . .  
    f#  time  size  7   a n1 b n2 c . . .    
    f#  time  size  8   a n1 b n2 c n3  d  . . .    
    f#  time  size  9   pna  stra phsa pnb strb phsb . . .  
    f#  time  size  10  str1 str2 str3 str4 . . . .  
    f#  time  size  19  pna stra phsa dcoa pnb strb phsb dcob . . .  
    f#  time  size  11  nh lh r   
    f#  time  size -12  xint        
    f#  time  size  13  xint xamp h0 h1 h2 . . . hn 
    f#  time  size  14  xint xamp h0 h1 h2 . . . hn 
    f#  time  size  15  xint xamp h0 phs0 h1 phs1 h2 phs2 . . .    
    f#  time  size  17  x1 a x2 b x3 c . . . 
    f#  time  size  20  window max op
    f#  time  size  21  type lvl arg1 arg2
    f#  time  size  25  x1 y1 x2 y2 x3  .  .  .
    f#  time  size  27  x1 y1 x2 y2 x3  .  .  .
    f#  time  0     28  filcod
 

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Appendices 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97