zakinit is a problem because according to the manual it can only be called once. If you were to put the zakinit call in the global orc portion of your instrument that uses zak channels (to make sure zakinit is called for your instrument), then including multiple zak instruments in your project would cause multiple calls to zakinit.
I understand the whole clobbered scoreline thing. That's why I really enjoy working with the effects that Steven put in; so many of my zak instruments were just effects, and it really is a PITA to route all those zak channels through your score. The need for zak instruments isn't removed completely, but effects shoulder a lot of that duty. I don't mind passing zak channels as
parameters to my instruments if it doesn't happen too often.
----- Original Message ----
From: Pia Kraft <ZarahNeander@t-online.de>
To: blue users mailing list <firstname.lastname@example.org>
Sent: Thursday, February 22, 2007 12:40:15 AM
Subject: Re: [Bluemusic-users] Named instruments and blue
Thanks for your reply.
Michael Bechard wrote:
regards to using Zak in a modular manner, the only problem seems to be
with the zakinit opcode;
Why is that a problem? In case I forgot a zakinit, I can rely on csound
remembering me immediately. IMO a 'if (gizakinitiated) then' would hide
a not so potential problem. Do I miss something here?
I specify zak channel numbers as parameters to my instruments.
I do that too for the zakw instruments. For the zakr instruments, my
scoreline is already clobbered enough, so I try to avoid passing a
parameter which is de facto a constant. Either I use a giZakChn
variable or a '#define ZAKCHN #0#'.
Though it works, I'm looking for a more portable solution. I uploaded
in instrument to blueShare which uses only one zakw, and even writing
the documentation was awkward (go here..change this..go there..change
that). Not nice.