Csound Csound-dev Csound-tekno Search About

Pass global krate to irate at instrument Init

Date2017-02-05 16:35
FromEmmett Palaima
SubjectPass global krate to irate at instrument Init
Hi, is there a way for an instrument to initialize an i-rate variable to the value of a global k-rate variable when the instrument turns on? I've succeeded in getting this effect with p-fields, but this is kind of a round-about way, and I was wondering if there was a method for doing it more directly.

I'm looking to do something like:

gkvar init 0

instr 1
ivar init gkvar
[etc...]
endin

instr 2
[calculations involving gkvar]
endin

Thanks!
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-02-05 16:46
FromVictor Lazzarini
SubjectRe: Pass global krate to irate at instrument Init
i( )

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 5 Feb 2017, at 16:36, Emmett Palaima <epalaima@BERKLEE.EDU> wrote:

Hi, is there a way for an instrument to initialize an i-rate variable to the value of a global k-rate variable when the instrument turns on? I've succeeded in getting this effect with p-fields, but this is kind of a round-about way, and I was wondering if there was a method for doing it more directly.

I'm looking to do something like:

gkvar init 0

instr 1
ivar init gkvar
[etc...]
endin

instr 2
[calculations involving gkvar]
endin

Thanks!
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-02-05 20:45
FromTarmo Johannes
SubjectRe: Pass global krate to irate at instrument Init

Hi,

 

ivar init i(gkvar)

 

should work

 

tarmo

 

 

On Sunday 05 February 2017 11:35:50 you wrote:

instr 1 ivar init gkvar [etc...] endin




Date2017-02-06 00:42
FromEmmett Palaima
SubjectRe: Pass global krate to irate at instrument Init
Thanks, that's exactly what I was looking for.

On Sun, Feb 5, 2017 at 3:45 PM, Tarmo Johannes <trmjhnns@gmail.com> wrote:

Hi,

 

ivar init i(gkvar)

 

should work

 

tarmo

 

 

On Sunday 05 February 2017 11:35:50 you wrote:

instr 1 ivar init gkvar [etc...] endin



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here