I am working on a cabbage instrument where the synthesis occurs in instrument 1 as usual, but an always on instrument 2 handles gui elements of the synth, effects processing, etc. I would like to have this gui instrument capture the pchbend and mod wheel (via ctrl7) and put them into global variables rather than have each instance of the polyphonic synth 1 read and process the same data.
How might I go about doing this? ctrl7 has an argument to choose a channel, but pchbend does not… it defaults to the channel assigned by csound at init time, in this case “2”. I don’t think massign is the right answer, because that would cause new instances of the gui handling instrument when the keyboard is played.