Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: Re: multiple instruments with one midi file

Date2007-11-02 12:37
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: multiple instruments with one midi file
I suppose you can try massign.

Victor

>
> I do have an instrument lying around somewhere that uses
> the event  opcodes to trigger other instruments but it
> seems like a hack. I was  hoping there would be an easier
> way. I also thought it might be posible  with massign
> somehow? Thanks for the reply.
>
> Rory.
>
>
> Chuckk Hubbard wrote:
> > There are plenty here who know more than I do, but
> > here's my understanding: the doc says that, for
> > file-driven performance, the instrument defaults  to
> MIDI channel + 1.  Obviously there is no MIDI channel 0,
> > so instr 1  is only being triggered by the score, not
> > the MIDI file.  Maybe you need  to have instr 2 call
> > instr 18 and 19, if you want MIDI channel 1 to  trigger
> > two instruments?
> > -Chuckk
> >
> > On 11/1/07, *Rory Walsh*  > > wrote:
> >     I'm trying to play two instruments with data from
> >     one midi file but I can't manage it. Should the
> >     following csd not do the trick or am I just having a
> > bad day??
> >     
> >     
> >     -odevaudio -F bach.mid  -m0d
> >     
> >     
> >     sr = 44100
> >     kr = 44100
> >     ksmps = 1
> >     nchnls = 1
> >
> >     instr 1
> >              kcps init 0
> >              kvelocity init 0
> >              midinoteoncps kcps, kvelocity
> >              a1 oscili 1000, kcps, 1
> >              out a1
> >     endin
> >
> >     instr 2
> >              kcps init 0
> >              kvelocity init 0
> >              midinoteoncps kcps, kvelocity
> >              a1 oscili 1000, kcps*2, 1
> >              out a1
> >     endin
> >
> >
> >     
> >     
> >     f1 0 1024 10 1
> >     i1 0 100
> >     i2 0 100
> >     
> >     
> >
> >
> >
> >
> > --
> > http://www.badmuthahubbard.com
>

Date2007-11-02 13:26
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: multiple instruments with one midi file
I tried massign that but without any luck for example I thought the 
following would route midi messages from all midi channels to 
instruments 12 and 18, instead it only seems to route them to instr 18:


massign 0, 12
massign 0, 18

instr 1
endin

instr 12
         kcps init 0
         kvelocity init 0
         midinoteoncps kcps, kvelocity
         a1 oscili 1000, kcps, 1
         out a1
endin

instr 18
         kcps init 0
         kvelocity init 0
         midinoteoncps kcps, kvelocity
         a1 oscili 1000, kcps*8, 1
         out a1
endin



f1 0 1024 10 1
i1 0 100


Rory.



Victor Lazzarini wrote:
> I suppose you can try massign.
> 
> Victor
> 
>> I do have an instrument lying around somewhere that uses
>> the event  opcodes to trigger other instruments but it
>> seems like a hack. I was  hoping there would be an easier
>> way. I also thought it might be posible  with massign
>> somehow? Thanks for the reply.
>>
>> Rory.
>>
>>
>> Chuckk Hubbard wrote:
>>> There are plenty here who know more than I do, but
>>> here's my understanding: the doc says that, for
>>> file-driven performance, the instrument defaults  to
>> MIDI channel + 1.  Obviously there is no MIDI channel 0,
>>> so instr 1  is only being triggered by the score, not
>>> the MIDI file.  Maybe you need  to have instr 2 call
>>> instr 18 and 19, if you want MIDI channel 1 to  trigger
>>> two instruments?
>>> -Chuckk
>>>
>>> On 11/1/07, *Rory Walsh* >> > wrote:
>>>     I'm trying to play two instruments with data from
>>>     one midi file but I can't manage it. Should the
>>>     following csd not do the trick or am I just having a
>>> bad day??
>>>     
>>>     
>>>     -odevaudio -F bach.mid  -m0d
>>>     
>>>     
>>>     sr = 44100
>>>     kr = 44100
>>>     ksmps = 1
>>>     nchnls = 1
>>>
>>>     instr 1
>>>              kcps init 0
>>>              kvelocity init 0
>>>              midinoteoncps kcps, kvelocity
>>>              a1 oscili 1000, kcps, 1
>>>              out a1
>>>     endin
>>>
>>>     instr 2
>>>              kcps init 0
>>>              kvelocity init 0
>>>              midinoteoncps kcps, kvelocity
>>>              a1 oscili 1000, kcps*2, 1
>>>              out a1
>>>     endin
>>>
>>>
>>>     
>>>     
>>>     f1 0 1024 10 1
>>>     i1 0 100
>>>     i2 0 100
>>>     
>>>     
>>>
>>>
>>>
>>>
>>> --
>>> http://www.badmuthahubbard.com
> 
> 

Date2007-11-02 14:49
From"Oeyvind Brandtsegg"
Subject[Csnd] Re: Re: Re: Re: Re: multiple instruments with one midi file
AttachmentsNone