Csound Csound-dev Csound-tekno Search About

[Csnd] problem with envelope (Please help a very frustrated composer!!)

Date2008-09-19 20:27
Frompeiman
Subject[Csnd] problem with envelope (Please help a very frustrated composer!!)
Hello

Please tell me I've lost my mind and am doing something completely stupid!
I've managed to narrow the problem down to one sine-tone after hours of
striping my orchestra.

For some reason when I run the attached csd I get a click right at the end.
However, increasing ksmps from 1 to 16 gets rid of the glitch. This is
strange as the envelope is k-rate and should only get better with higher
control rate.

I'm on csound64....

Any suggestions will save me hours of head-banging!

All the best
Peiman 






sr=96000
ksmps=1
nchnls=2

0dbfs = 1


	instr 4
;p4 = freq
;p5 = pitch transpose (in cent)
;p6 = gain scale
;p7 = panner initial phase


itablecreate	ftgen 0, 0, 65537, -7, 0.0, 12837.14453125, 0.020270288,
9627.859375, 0.0405405164, 5067.29296875, 0.0743243098, 3378.1953125,
0.1216216087, 3716.015625, 0.2432432175, 3209.28515625, 0.3581081033,
3547.109375, 0.6013513803, 2026.91796875, 0.8040540218, 1013.45703125,
0.9662162066, 1520.18359375, 0.8783783913, 844.5546875, 0.6621621847,
2533.64453125, 0.3783783913, 2702.5546875, 0.2364864945, 2533.6484375,
0.0945945978, 3616.171875, 0.0427509546, 7362.96484375, 0.0

ktime	= .1
igain   = p6


iscale = cent(p5)


kfreq0 = p4
kamp0  = .1

kenv          oscili    kamp0*igain,1/p3,itablecreate

ar	oscili	kenv, kfreq0*iscale, 1
kpan	oscili	1,.3 , 1, p7
kpan = kpan + .5

aoutl        =         ar * (1 - kpan) 
aoutr        =         ar * kpan

out aoutl, aoutr


	endin






f 1 0 32769 10 1


t 0 60.0


i4.0	2.558442	20.3125	440	0	1.0	0.55980074
e



 http://www.nabble.com/file/p19577988/test.csd test.csd 

-- 
View this message in context: http://www.nabble.com/problem-with-envelope-%28Please-help-a-very-frustrated-composer%21%21%29-tp19577988p19577988.html
Sent from the Csound - General mailing list archive at Nabble.com.