Csound Csound-dev Csound-tekno Search About

[Csnd] negative values for linsegr

Date2012-02-18 16:00
FromStefan Thomas
Subject[Csnd] negative values for linsegr
Dear community,
I've looked into the ModalAddSyn-opcode, that I've found here on of Iain McCurdys site.
Within the code a found the lines:
if isus==1 then
      adec    linsegr    0,iattScl*iatt,0,(p3*idur)-(iattScl*iatt),-98,(p3*idur)-(iattScl*iatt),-98    ;AMPLITUDE DECAY ENVELOPE
    else
      adec    linsegr    0,iattScl*iatt,0,(p3*idur)-(iattScl*iatt),-98,idur*0.4,-98        ;AMPLITUDE DECAY ENVELOPE
    endif
   
What I don't understand is: what do those negative values (-98) mean in linsegr?
I would have assumed, that the p-fields of linsegr can only be positive!

Date2012-02-18 21:38
Fromjoachim heintz
SubjectRe: [Csnd] negative values for linsegr
hi stefan -
the *durations* in linseg(r) can just be positive, but not the *values*.
so, it's possible to write
kbla linseg -1, p3, -5
but not
knono linseg 1, -1, 5

	joachim

Am 18.02.2012 17:00, schrieb Stefan Thomas:
> Dear community,
> I've looked into the ModalAddSyn-opcode, that I've found here
>  on of Iain McCurdys
> site.
> Within the code a found the lines:
> 
>     if isus==1 then
>           adec    linsegr   
>     0,iattScl*iatt,0,(p3*idur)-(iattScl*iatt),-98,(p3*idur)-(iattScl*iatt),-98   
>     ;AMPLITUDE DECAY ENVELOPE
>         else
>           adec    linsegr   
>     0,iattScl*iatt,0,(p3*idur)-(iattScl*iatt),-98,idur*0.4,-98       
>     ;AMPLITUDE DECAY ENVELOPE
>         endif
> 
>    
> What I don't understand is: what do those negative values (-98) mean in
> linsegr?
> I would have assumed, that the p-fields of linsegr can only be positive!