Csound Csound-dev Csound-tekno Search About

midi routing instrument

Date2005-12-21 20:57
FromAtte André Jensen
Subjectmidi routing instrument
Hi

I'd like have an instrument handle all midiin, it should send (through 
subinstr) midi to other instruments based on the inputs midichannel, 
midikey and velocity to have splits, layers and zones. My first problem 
is to have an instrument grab all midichannels. Is this the way to go? 
Anybody done this already? Is there some example code that would make me 
wiser?

Thanks in advance for any advice...

-- 
peace, love & harmony
Atte

http://www.atte.dk

Date2005-12-22 06:14
FromIain Duncan
SubjectRe: midi routing instrument

Atte André Jensen wrote:
> Hi
> 
> I'd like have an instrument handle all midiin, it should send (through 
> subinstr) midi to other instruments based on the inputs midichannel, 
> midikey and velocity to have splits, layers and zones. My first problem 
> is to have an instrument grab all midichannels. Is this the way to go? 
> Anybody done this already? Is there some example code that would make me 
> wiser?
> 
> Thanks in advance for any advice...
> 

My hackish solution was just to number all instruments above the midiin 
instrument, and assign midi to no instruments. I also found I got the 
best results by adding a second layer of control instruments and using 
the hundreds to number ( for easy remembering and readbility )

ie i1 is the midi input parser

i100 to 115 are control instruments, one per midi channel
i200 to 215 are the sound makers for the control instruments etc

This makes routing easy because each control instrument is controlling 
itself plus 100. It also allows nice shortcuts using the macro system.

Iain

Date2005-12-22 06:54
FromIain Duncan
SubjectRe: midi routing instrument
I should also mention that my new plan is to handle all the midi in from 
a C host and make the event calls with the api, allowing finer grained 
midi control and multiple midi ports.

Iain

Iain Duncan wrote:
> 
> 
> Atte André Jensen wrote:
> 
>> Hi
>>
>> I'd like have an instrument handle all midiin, it should send (through 
>> subinstr) midi to other instruments based on the inputs midichannel, 
>> midikey and velocity to have splits, layers and zones. My first 
>> problem is to have an instrument grab all midichannels. Is this the 
>> way to go? Anybody done this already? Is there some example code that 
>> would make me wiser?
>>
>> Thanks in advance for any advice...
>>
> 
> My hackish solution was just to number all instruments above the midiin 
> instrument, and assign midi to no instruments. I also found I got the 
> best results by adding a second layer of control instruments and using 
> the hundreds to number ( for easy remembering and readbility )
> 
> ie i1 is the midi input parser
> 
> i100 to 115 are control instruments, one per midi channel
> i200 to 215 are the sound makers for the control instruments etc
> 
> This makes routing easy because each control instrument is controlling 
> itself plus 100. It also allows nice shortcuts using the macro system.
> 
> Iain
> 

Date2005-12-22 09:20
FromAtte André Jensen
SubjectRe: midi routing instrument
Iain Duncan wrote:

> My hackish solution was just to number all instruments above the midiin 
> instrument, and assign midi to no instruments. I also found I got the 
> best results by adding a second layer of control instruments and using 
> the hundreds to number ( for easy remembering and readbility )
> 
> ie i1 is the midi input parser
> 
> i100 to 115 are control instruments, one per midi channel
> i200 to 215 are the sound makers for the control instruments etc
> 
> This makes routing easy because each control instrument is controlling 
> itself plus 100. It also allows nice shortcuts using the macro system.

That sounds like a plan, could you show me some code, esp the passing on 
of midi information and calling og subinstr?

I figured that I might simplify things by having instr 1 handle midi for 
channel 1 etc. The beauty of having one instrument doing it all will be 
gone, but it might be easier to get going.

-- 
peace, love & harmony
Atte

http://www.atte.dk