| However, this csd is broken by the changes to turnoff2. It works if I
revert to the previous version. Any suggestions?
Jonathan.
-+rtaudio=alsa -odac -+rtmidi=alsa -Mhw:1,0 -d -m0
sr = 48000
ksmps = 16
nchnls = 2
0dbfs = 1
massign 0, 0
pgmassign 0, 0
gisin ftgen 1, 0, 32768, 10, 1
giji_12 ftgen 2, 0, 32, -2, 12, 2, 256, 60, 1, \
16/15, 9/8, 6/5, 5/4, 4/3, 7/5, 3/2, 8/5, 5/3, 9/5, 15/8, 2
gkon init 0
gkmax init 8
instr 1
kst, kch, kd1, kd2 midiin
if (kst == 144) then
kdec = kd1/1000
kin = 2.0 + kdec
if (kd2 == 0) then
turnoff2 kin, 4, 1
gkon = gkon - 1
elseif (kd2 > 0) then
event "i", kin, 0, -1, kd1, kd2
gkon = gkon + 1
if (gkon > gkmax) then
turnoff2 2, 1, 1
gkon = gkon - 1
endif
endif
endif
endin
instr 2
ikey = p4
ivel = p5 * 0.0078125
icps cpstuni ikey, giji_12
iatt = 0.03
idec = 10
isus = 0
irel = 1
xtratim irel
krel release
if (krel == 1) kgoto rel
aenv1 linseg 0, iatt, 1, idec, isus, -1, isus
aenv = aenv1
kgoto done
rel:
aenv2 linseg 1, irel, 0, -1, 0
aenv = aenv1 * aenv2
done:
aosc oscil ivel, icps, gisin
aosc = aosc * aenv * 0.2
outs aosc, aosc
endin
i1 0 10000
e
jpff writes:
> True!
> ==John ffitch
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |