Csound Csound-dev Csound-tekno Search About

Re: Midictrl vs. Ctrl7

Date2005-10-25 04:18
From"Art Hunkins"
SubjectRe: Midictrl vs. Ctrl7
Istvan,

Could you give a simple example? I still don't follow you.

Are you talking about midi out from csound to something external? (I've
never done this.)

It seems to me that midi controller data always would come to csound from an
external source, never from a score - and doing so, would always have an
unambiguous channel number attached to it (just like other external midi
input).

And (just in principle), I should think that if an opcode lacks a channel
identifier, the rule that applies to other midi data should likewise apply
here (i.e., normally, channel # = instrument #).

So, please, an example (as basic as possible).

Art Hunkins

----- Original Message -----
From: "Istvan Varga" 
To: 
Sent: Monday, October 24, 2005 3:52 AM
Subject: Re: [Csnd] Midictrl vs. Ctrl7


> Art Hunkins wrote:
>
> > Controller messages come in with channel numbers attached just like note
> > events do. Thus the problem of translating their numbers to the
instruments
> > they are meant to apply to, is the same as that for note events.
>
> No, I mean translating instrument numbers to MIDI channels (that is
> what midictrl would have to do when called from a score activated
> instrument), not the other way around, and it often cannot be done
> unambiguously.
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2005-10-25 09:44
FromIstvan Varga
SubjectRe: 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 ?