| Hi everyone,
Rick Boulanger has brought to my attention a bug that is affecting a
CSD he has (and was previously working perfectly) in version 5.12. I
tracked it down to an interaction between
negative p3 / negative p1 and release-time extension.
It's a hard one to diagnose, but I think this simple CSD demonstrates
it.
Basically when using negative p3s (indeterminate duration) sometimes
if the note is killed with a matching negative p1 and then re-started
with the same p1 and
negative p3, this next note will not be killed by a negative p1 event.
This seems to happen when notes overlap because of the use of release-
time extension and
when the two notes hold separate instrument allocations. If no release-
time extension is used, no problem is detected.
Previously, this behaviour was not present in Csound (Rick's now
broken GM soundfont CSD used in the XO for instance would play
perfectly).
The diagnostics CSD shows that if the release time (girel) is 0, then
the last note is cut. However if it is set to say, 0.5, then the last
note hangs. Other settings of release
time work, eg. 0.1 or 0.6, but not 0.4 or 0.5. It seems to be related
to note duration, but the relationship does not seem straight.
-odac
0dbfs = 1
nchnls=1
ksmps =1
girel init 0.5 ; release time, for certain values notes will hang,
with 0 there is never any problem.
gidur init 0.5 ; note duration
instr 1
k1 linsegr 0,0.1,1,girel,0
a1 oscili k1*p4,p5,1
out a1
endin
instr 2
k1 linsegr 1,1,1,0.1,2
ktrig init 1
ktrig2 init 0
kL release
if kL == 1 then
if ktrig2 == 1 then
scoreline "i-1 0.05 1", ktrig2
endif
ktrig2 = 0
else
ktrig1 delayk ktrig, gidur ; noteoff trigger idur behind noteon trigger
scoreline "i1 0.05 -1 0.1 440", ktrig
scoreline "i-1 0.05 1", ktrig1
ktrig = ktrig1 ; after noteoff trigger noteon on next k-period
endif
endin
f1 0 16384 10 1
i2 0 2
e 5
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |