Csound Csound-dev Csound-tekno Search About

[Csnd] Use of global orchestra variables in score

Date2019-10-10 15:24
From"Jeanette C."
Subject[Csnd] Use of global orchestra variables in score
Hey hey,
I'm not sure if this is the right way to think about, I'm open to suggestions.

I have a big orchestra with many named global audio and control signals. These 
are used in many named instruments which always do the same thing, example:
instr Source1
   asource1 soundin p4
   gasource1 += asource1
endin

Similar things apply to the control instruments.

Is there a way to pass an instrument a global audio signal in the score? Same 
for control signals.

How about ftables created with ftgen:
gisource1ctl ftgen 0, 0, 50, -23, "source1ctl.ftable"

If there was a way to do it, this would greatly reduce the size of my 
orchestra and make it more manageable. And the score would in some places be 
more readable.

Best wishes and thanks for any tips,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Twitter: https://twitter.com/jeanette_c_s
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

There must be another way
Cause I believe in taking chances
But who am I to say - What a girl is to do <3
(Britney Spears)

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

Date2019-10-10 15:45
FromSteven Yi
SubjectRe: [Csnd] Use of global orchestra variables in score
Have you considered the channel system or global arrays? I use
channels as a dictionary to store global settings and sometimes
signals. I also use global arrays for mixing between instruments. I've
found both work out well for my uses cases, but I'm not exactly sure
if it overlaps with what you're going for. You I imagine instruments
like:

instr Source1
   asource1 soundin p4
   Schan = p5
   chnmix(asource1, Schan)
endin

or:

gamixer[] init 64

instr Source1
   asource1 soundin p4
   imix_channel = p5
   gamixer[imix_channel] += asource1
endin

For live coding, I the hide global details behind opcodes:

https://github.com/kunstmusik/csound-live-code/blob/master/livecode.orc#L1105-L1138

and I find using those opcodes easy enough to remember.

For tables, I tend to use the pattern I wrote about at the end of the
article here:

http://csoundjournal.com/2006winter/encapsulatedInstruments.html

in the "Tips on Usage" section.

On Thu, Oct 10, 2019 at 10:24 AM Jeanette C.  wrote:
>
> Hey hey,
> I'm not sure if this is the right way to think about, I'm open to suggestions.
>
> I have a big orchestra with many named global audio and control signals. These
> are used in many named instruments which always do the same thing, example:
> instr Source1
>    asource1 soundin p4
>    gasource1 += asource1
> endin
>
> Similar things apply to the control instruments.
>
> Is there a way to pass an instrument a global audio signal in the score? Same
> for control signals.
>
> How about ftables created with ftgen:
> gisource1ctl ftgen 0, 0, 50, -23, "source1ctl.ftable"
>
> If there was a way to do it, this would greatly reduce the size of my
> orchestra and make it more manageable. And the score would in some places be
> more readable.
>
> Best wishes and thanks for any tips,
>
> Jeanette
>
> --
>   * Website: http://juliencoder.de - for summer is a state of sound
>   * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>   * SoundCloud: https://soundcloud.com/jeanette_c
>   * Twitter: https://twitter.com/jeanette_c_s
>   * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>   * GitHub: https://github.com/jeanette-c
>
> There must be another way
> Cause I believe in taking chances
> But who am I to say - What a girl is to do <3
> (Britney Spears)
>
> 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

Date2019-10-10 15:59
From"Jeanette C."
SubjectRe: [Csnd] Use of global orchestra variables in score
Hey hey Steven,
first of all thanks for all the tips and hints.
Oct 10 2019, Steven Yi has written:
...
> instr Source1
>   asource1 soundin p4
>   Schan = p5
>   chnmix(asource1, Schan)
> endin
...
This could easily solved most of the issue.

> http://csoundjournal.com/2006winter/encapsulatedInstruments.html
>
> in the "Tips on Usage" section.
...
This again might prove to (nearly) solve the rest of my dilemma. I've already
skimmed the article and will presently give it the attention it
deserves.

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Twitter: https://twitter.com/jeanette_c_s
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

There must be another way
Cause I believe in taking chances
But who am I to say - What a girl is to do <3
(Britney Spears)

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