| Istvan,
OK, I appreciate what you are saying now. We have the problem of "channel
clog." All sixteen channels are being occupied by instrument 1(-16), and
there is no channel left for any controller messages not destined for
instrument 1(-16).
Of course, the same situation would apply if your i100 were to be triggered
externally as a note by midi. As your example stands, no notes would go to
i100; they'd go, according to channel number to i1-16. So my answer to your
question below, is that (as the example stands), no midictrl messages would
go to i100 and I'd expect nothing to be printed. Rather, messages would go
to the appropriate (via channel = instrument number) i1-16; as they are not
involved in these instruments, the messages would be effectively lost.
My suggested solution to this "ambiguity" is of course to recode the
example. As it stands, midictrl is doing nothing, so it probably should be
coded into i1-16 somewhere, where it will have an effect. (An equally
obvious improvement might be to reduce i1-16 to i1, and send all notes in on
channel 1; this is what is clogging channels.)
Of course you could always ask, how could midictrl affect several
instruments (triggered by different midi channels) when it came in on a
single channel?
There are several ways to do this - including simply using ctrl7 instead of
midictrl. Ctrl7 would be used for more complex situations; midictrl only for
simpler ones.
My solution, however, would be to save a single channel (if it must be
unique) for midictrl (probably #16 - and i16) and use it only for control
messages - paralleling your example i100. As many controllers as you like
(up to 128) can come in on a single channel; you only *need* one.
Midi-activated instruments would simply avoid i16.
Yes, there is the generic problem with midi in Csound that you can't easily
have more than 16 channels simultaneously. This means "more than 16
instrument types or control destinations simultaneously." If we want to use
the more basic opcodes, we'll just have to code around these limitations.
All this said, though I'd prefer to be able to use midictrl in notes called
by the orchestra (in simpler situations where ctrl7 is not necessary), I'm
happy enough with the addition/clarification to the manual. It might also be
helpful to note under ctrl7's doc that it can be used for score-triggered
events whereas midictrl cannot.
Art Hunkins
----- Original Message -----
From: "Istvan Varga"
To:
Sent: Tuesday, October 25, 2005 4:44 AM
Subject: Re: [Csnd] Midictrl vs. Ctrl7
> Art Hunkins wrote:
>
> > Could you give a simple example? I still don't follow you.
>
> sr = 44100
> ksmps = 10
> nchnls = 1
>
> instr 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
> kcps cpsmidib
> iamp veloc
> a1 vco2 iamp * iamp, kcps
> out a1
> endin
>
> instr 100
> kctl midictrl 7
> printk2 kctl
> endin
>
> Now, assume that MIDI control change messages arrive on all channels,
> and instr 100 is activated from the score. Which channel should be used
> by midictrl in instr 100 and why ?
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |