Csound Csound-dev Csound-tekno Search About

Linseg (k-rate) and tone bugs

Date1999-09-23 15:31
FromVarga István
SubjectLinseg (k-rate) and tone bugs
------------------------- test1.orc -------------------------

sr      =  44100
kr      =  44100
ksmps   =  1
nchnls  =  1

        instr 1

afoo    =  10000
kbar    linseg 1, 0.5, 1, 0.0005, 0, 1, 0       /* BUGGY */
ablah   linseg 1, 0.5, 1, 0.0005, 0, 1, 0

;afoo   =  afoo*ablah   /* this works */

afoo    =  afoo*kbar    /* envelope will not reach zero */
                        /* in the second segment */

        out afoo

        endin

--------------------- test1.sco -----------------------------

t 0 60
i 1 0 1
e

--------------------- test2.orc -----------------------------

sr      =  44100
kr      =  1050
ksmps   =  42
nchnls  =  1

        seed 0

        instr 1

afoobar unirand 2       /* white noise */
afoobar =  afoobar-1

;afoo   tone afoobar, 2         /* this works well */
afoo    tone afoobar, 1         /* outputs silence */

        out afoo*1000000

        endin

--------------------- test2.sco -----------------------------

t 0 60
i 1 0 2
e

-------------------------------------------------------------