| sorry, posted the wrong version...
best,
eduardo
instr 1 ; -------------------------------------------------------------
idur= p3
idurosc= 1/idur
iamp = ampdbfs (p4)
ifq= p5
iatk= p6
iaudiofun= 1
isigfun= 2
timout iatk, idur-iatk, makedecay
a2 poscil iamp, 1/iatk, 2 ; attack
kgoto playit
; jump here after iatk until the end of the note
makedecay:
; timout 0, idur-iatk, makedec
a2 poscil iamp, -(1/(idur-iatk)), 2
; and the end of the note
playit:
a1 poscil a2, ifq, iaudiofun
out a1
endin
Eduardo Moguillansky wrote:
> Hello Marco,
>
> I might have misunderstood what you want, but if I got it right and
> the version here is what you were looking for, then its not timout the
> problem, but a missing kgoto and the period for the second poscil was
> inverted. Please forgive me if this is not what you were looking for.
>
>
>
>
>
>
>
>
>
> sr= 44100
> kr= 44100
> ksmps= 1
> nchnls= 1
>
> 0dbfs = 32767 ; 16 bits
>
> instr 1 ; -------------------------------------------------------------
>
> idur= p3
> idurosc= 1/idur
> iamp = ampdbfs (p4)
> ifq= p5
> iatk= p6
> iaudiofun= 1
> isigfun= 2
>
> timout iatk, idur-iatk, makedecay
>
> a2 poscil iamp, 1/iatk, 2 ; attack
> kgoto playit
>
> ; jump here after iatk until the end of the note
> makedecay:
> ; timout 0, idur-iatk, makedec
> a2 poscil iamp, 1/(idur-iatk), 3
> ; and the end of the note
>
> playit:
> a1 poscil a2, ifq, iaudiofun
>
> out a1
> endin
>
>
>
>
>
> ; SCORE
> f1 0 4097 10 1
> ; sigmoid rise/decay
> f2 0 2049 19 .5 .5 270 .5
> ; iamp ifq iatk
> i1 0 1 -6.0 1000 0.2
>
> e
>
>
>
>
>
>
> Marco Stroppa wrote:
>> Hello, Csounders,
>>
>> I wonder whether someone knows how timout works, or rather, why it
>> does not seem to work properly in the short orchestra+score below.
>> In theory, I should get a tone with a sinusoidal attack and decay,
>> but I also get a crescendo during the sustained part of the note. The
>> only documentation I found on timout is the classical example from
>> Barry Vercoe (repeating notes, with reinit).
>> There are other ways to do this, of course, but I'd like to
>> understand how timout works. I'm using csound 5.08 on a MacIntel.
>> Thanks for any advice.
>>
>> Marco
>>
>>
>>
>> sr= 44100
>> kr= 44100
>> ksmps= 1
>> nchnls= 1
>>
>> 0dbfs = 32767 ; 16 bits
>>
>> instr 1 ; -------------------------------------------------------------
>>
>> idur= p3
>> idurosc= 1/idur
>> iamp = ampdbfs (p4)
>> ifq= p5
>> iatk= p6
>> iaudiofun= 1
>> isigfun= 2
>>
>> timout iatk, idur-iatk, makeatk
>> a2poscil iamp, 1/iatk, isigfun ; sigmoid attack, active between 0
>> and iatk
>>
>> ; jump here after iatk until the end of the note
>> makeatk:
>> timout 0, idur-iatk, makedec
>> a2poscil iamp, -(1/iatk), isigfun; sigmoid decay, active between
>> idur-iatk
>> ; and the end of the note
>> ; jump here between 0 and idur-atk
>> makedec:
>> a1poscil a2, ifq, iaudiofun
>>
>> out a1
>> endin
>>
>>
>> ; SCORE
>> f1 0 4097 10 1
>> ; sigmoid rise/decay
>> f2 0 2049 19 .5 .5 270 .5
>>
>> ; iamp ifq iatk
>> i1 0 1 -6.0 1000 0.2
>>
>> e
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden
>> Schutz gegen Massenmails. http://mail.yahoo.com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
|