« Return to Thread: Reinitialize instruments in real time
Oeyvind Brandtsegg-2 wrote:Maybe like this (untested):
if gkcontrol == 1 then
myLabel:
a1,a2 diskin "rep1.wav", 1, 0, 1, 0, 100
rireturn
outs a1, a2
endif
if gkcontrol == 2 then
reinit myLabel
endif
Oeyvind
2009/5/28 davistro <davistro@hotmail.com>:
>
>
> In the following code, we have a control variable used to star reproducing
> a sample (if gkControl is 1) and stop reproducing if gkControl is 2 here is
> where we want to reinitialize the state of the opcode diskin or others like
> pluck, line, linen, etc. How can we do that?
>
>
> <CsoundSynthesizer>
> <CsOptions>
>
> -o dac -+rtaudio=alsa
>
> </CsOptions>
>
> <CsInstruments>
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 2
>
> gkcontrol init 0
>
> instr 1
> gkcontrol chnget "sample"
>
> if gkcontrol == 1 then
> a1,a2 diskin "rep1.wav", 1, 0, 1, 0, 100
> outs a1, a2
> endif
> if gkcontrol == 2 then
> ;Reiniciar
> endif
> endin
>
> instr 2
> gkcontrol = p4
>
> printk2 gkcontrol
>
> endin
>
>
>
> </CsInstruments>
>
> <CsScore>
>
> ;reproduccion todos los instrumentos
>
> i1 0 100
> i2 0 50 1
> i2 50 50 2
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> --
> View this message in context: http://www.nabble.com/Reinitialize-instruments-in-real-time-tp23763800p23763800.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
« Return to Thread: Reinitialize instruments in real time
| Free embeddable forum powered by Nabble | Forum Help |