Csound Csound-dev Csound-tekno Search About

STK Opcodes

Date2006-04-30 03:41
FromDavid Akbari
SubjectSTK Opcodes
Hi List,

Playing around with Perry Cook's STK in Csound lends itself 
instinctively to want to use k-rate input (similar to Barry Vercoe's 
compress opcode); because they are physically modeled instruments, they 
require haptic control of some sort to really bring out their colorful 
nature as sound synthesis unit generators.

I thought I saw a manual entry for these (I can't seem to find an entry 
for them in the manual ??) that indicated they did have k-rate input 
however looking at the -z list I see that they have type 'j' as input 
which, according to the OENTRY reference is "optional i-rate defaulting 
to -1".

As a student of music synthesis, I'd like to request information or 
possibly a feature added that would make it possible to control these 
opcodes at k-rate with i-rate parameter input. If someone took the 
initiative to write k-rate handlers for the STK opcode inputs (I'd do 
it but I'm still learning CS) I'd be in heaven, but also information on 
how to work around this with only Csound is even better !


Is it possible to do like Istvan does in his program change UDO(1) and 
simply do something like(2)

;//
(1)
    opcode fluidProgramSelect_k, 0, kkkkk

keng, kchn, ksf2, kbnk, kpre   xin
    igoto skipInit
doInit:
    fluidProgramSelect i(keng), i(kchn), i(ksf2), i(kbnk), i(kpre)
    reinit doInit
    rireturn
skipInit:

    endop
;//


;//
(2)
    opcode  STKbowed_k, aa, kkkkkkk

k1, k2, k3, k4, k5, k6, k7  xin

al, ar STKbowed  i1, i2, i(k1), i(k2), i(k3), i(k4) ... etc

  xout al, ar

    endop

;//

without getting 0x000 nbyte allocation errors (I got those when trying 
this technique with BBCut(3))

If you want to try out the nbyte allocation error thing here's the UDO 
i was getting it with, lol

;//
(3)
		opcode	bbcuts_k, aa, aakkkkk

ail, air, kbps, ksubd, kbarl, kphb, knr	xin

a0l, a0r	bbcuts	ail, air, i(kbps), i(ksubd), i(kbarl), i(kphb), i(knr)

	xout	a0l, a0r

		endop
;//


-David