Csound Csound-dev Csound-tekno Search About

[Csnd] Playing multiple instruments from a single MIDI channel

Date2011-06-15 21:35
FromSamuel Sagan
Subject[Csnd] Playing multiple instruments from a single MIDI channel
The massign opcode allows you to assign one instrument to one MIDI channel.
That's a one to one relationship.

What if you need to assign multiple instruments to one MIDI channel (one to
many relationship)?

It's a frequent situation when playing a keyboard live -- the need to
activate more than one instrument. How do you do that?

Thanks in advance.

--
View this message in context: http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-06-15 21:43
FromJoel Ross
SubjectRe: [Csnd] Playing multiple instruments from a single MIDI channel
You might like to check out this thread in the list archive:

http://csound.1045644.n5.nabble.com/Activating-instruments-with-midi-td2265590.html#a2266534

On 15 June 2011 22:35, Samuel Sagan  wrote:
> The massign opcode allows you to assign one instrument to one MIDI channel.
> That's a one to one relationship.
>
> What if you need to assign multiple instruments to one MIDI channel (one to
> many relationship)?
>
> It's a frequent situation when playing a keyboard live -- the need to
> activate more than one instrument. How do you do that?
>
> Thanks in advance.
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-06-15 21:48
FromVictor Lazzarini
SubjectRe: [Csnd] Playing multiple instruments from a single MIDI channel
you can call your other instruments from the one that is triggered by  
the MIDI note:


instr 1
i1 cpsmidi
a1 oscils 0.1, i1, 0
a2 subinstr 21,i1*1.5
out a1+a2
endin

instr 21
i1 cpsmidi
a1 oscils 0.1, p4, 0
out a1
endin


On 15 Jun 2011, at 21:35, Samuel Sagan wrote:

> The massign opcode allows you to assign one instrument to one MIDI  
> channel.
> That's a one to one relationship.
>
> What if you need to assign multiple instruments to one MIDI channel  
> (one to
> many relationship)?
>
> It's a frequent situation when playing a keyboard live -- the need to
> activate more than one instrument. How do you do that?
>
> Thanks in advance.
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-06-16 16:12
FromSamuel Sagan
Subject[Csnd] Re: Playing multiple instruments from a single MIDI channel
Thanks very much.

Working fine!

--
View this message in context: http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4495483.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-06-16 17:50
FromRichard Boulanger
SubjectRe: [Csnd] Playing multiple instruments from a single MIDI channel
Victor,

Thanks for this reminder and solution.  I use it myself,
but we really really really do need a "simple" massign way of mapping 
MIDI input from one input channel to multiple Csound MIDI instruments 
(to play them back in a layered orchestration - something so common and standard)

Something like:

mmassign  1,  1,2,28,49
mmassign  2,  1,28,49,122

A multi MIDI assign  

MIDI messages from channel 1 are mapped to instruments  1, 2, 28 and 49
MIDI messages from channel 2 are mapped to instruments  1, 28, 49 and 122

Could someone write this code or add this (standard commercial) feature to Csound?
It would be great.

Dr. B.


Richard Boulanger, Ph.D.
Professor of Electronic Production and Design
Music Technology Division
Berklee College of Music
1140 Boylston Street
Boston, MA 02215
617-747-2485 (office)
774-488-9166 (cell)
rboulanger@berklee.edu
http://csounds.com/boulanger

On Jun 15, 2011, at 4:48 PM, Victor Lazzarini wrote:

you can call your other instruments from the one that is triggered by the MIDI note:


instr 1
i1 cpsmidi
a1 oscils 0.1, i1, 0
a2 subinstr 21,i1*1.5
out a1+a2
endin

instr 21
i1 cpsmidi
a1 oscils 0.1, p4, 0
out a1
endin


On 15 Jun 2011, at 21:35, Samuel Sagan wrote:

The massign opcode allows you to assign one instrument to one MIDI channel.
That's a one to one relationship.

What if you need to assign multiple instruments to one MIDI channel (one to
many relationship)?

It's a frequent situation when playing a keyboard live -- the need to
activate more than one instrument. How do you do that?

Thanks in advance.

--
View this message in context: http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2011-06-16 18:52
FromAdam Puckett
SubjectRe: [Csnd] Playing multiple instruments from a single MIDI channel
Here's a simple Python way to do this:

def mmasign(*args):
  buffer = '' # return value
  for i in range(1, len(args)):
    buffer += "massign {}, {}".format(args[0], args[i])
  return buffer
# end

This can be used like this:

orc += mmasign(1, 1,24,28,37,99)

(This code requires Python 3; 3.2 recommended!)

Hope this helps somewhat.

Adam

On 6/16/11, Richard Boulanger  wrote:
> Victor,
>
> Thanks for this reminder and solution.  I use it myself,
> but we really really really do need a "simple" massign way of mapping
> MIDI input from one input channel to multiple Csound MIDI instruments
> (to play them back in a layered orchestration - something so common and
> standard)
>
> Something like:
>
> mmassign  1,  1,2,28,49
> mmassign  2,  1,28,49,122
>
> A multi MIDI assign
>
> MIDI messages from channel 1 are mapped to instruments  1, 2, 28 and 49
> MIDI messages from channel 2 are mapped to instruments  1, 28, 49 and 122
>
> Could someone write this code or add this (standard commercial) feature to
> Csound?
> It would be great.
>
> Dr. B.
>
>
> Richard Boulanger, Ph.D.
> Professor of Electronic Production and Design
> Music Technology Division
> Berklee College of Music
> 1140 Boylston Street
> Boston, MA 02215
> 617-747-2485 (office)
> 774-488-9166 (cell)
> rboulanger@berklee.edu
> http://csounds.com/boulanger
>
> On Jun 15, 2011, at 4:48 PM, Victor Lazzarini wrote:
>
>> you can call your other instruments from the one that is triggered by the
>> MIDI note:
>>
>>
>> instr 1
>> i1 cpsmidi
>> a1 oscils 0.1, i1, 0
>> a2 subinstr 21,i1*1.5
>> out a1+a2
>> endin
>>
>> instr 21
>> i1 cpsmidi
>> a1 oscils 0.1, p4, 0
>> out a1
>> endin
>>
>>
>> On 15 Jun 2011, at 21:35, Samuel Sagan wrote:
>>
>>> The massign opcode allows you to assign one instrument to one MIDI
>>> channel.
>>> That's a one to one relationship.
>>>
>>> What if you need to assign multiple instruments to one MIDI channel (one
>>> to
>>> many relationship)?
>>>
>>> It's a frequent situation when playing a keyboard live -- the need to
>>> activate more than one instrument. How do you do that?
>>>
>>> Thanks in advance.
>>>
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-06-16 18:55
FromAdam Puckett
SubjectRe: [Csnd] Playing multiple instruments from a single MIDI channel
Sorry, there is a bug in the above code! It should be:

buffer += "massign {}, {}\n".format(args[0], args[i])

On 6/16/11, Adam Puckett  wrote:
> Here's a simple Python way to do this:
>
> def mmasign(*args):
>   buffer = '' # return value
>   for i in range(1, len(args)):
>     buffer += "massign {}, {}".format(args[0], args[i])
>   return buffer
> # end
>
> This can be used like this:
>
> orc += mmasign(1, 1,24,28,37,99)
>
> (This code requires Python 3; 3.2 recommended!)
>
> Hope this helps somewhat.
>
> Adam
>
> On 6/16/11, Richard Boulanger  wrote:
>> Victor,
>>
>> Thanks for this reminder and solution.  I use it myself,
>> but we really really really do need a "simple" massign way of mapping
>> MIDI input from one input channel to multiple Csound MIDI instruments
>> (to play them back in a layered orchestration - something so common and
>> standard)
>>
>> Something like:
>>
>> mmassign  1,  1,2,28,49
>> mmassign  2,  1,28,49,122
>>
>> A multi MIDI assign
>>
>> MIDI messages from channel 1 are mapped to instruments  1, 2, 28 and 49
>> MIDI messages from channel 2 are mapped to instruments  1, 28, 49 and 122
>>
>> Could someone write this code or add this (standard commercial) feature
>> to
>> Csound?
>> It would be great.
>>
>> Dr. B.
>>
>>
>> Richard Boulanger, Ph.D.
>> Professor of Electronic Production and Design
>> Music Technology Division
>> Berklee College of Music
>> 1140 Boylston Street
>> Boston, MA 02215
>> 617-747-2485 (office)
>> 774-488-9166 (cell)
>> rboulanger@berklee.edu
>> http://csounds.com/boulanger
>>
>> On Jun 15, 2011, at 4:48 PM, Victor Lazzarini wrote:
>>
>>> you can call your other instruments from the one that is triggered by
>>> the
>>> MIDI note:
>>>
>>>
>>> instr 1
>>> i1 cpsmidi
>>> a1 oscils 0.1, i1, 0
>>> a2 subinstr 21,i1*1.5
>>> out a1+a2
>>> endin
>>>
>>> instr 21
>>> i1 cpsmidi
>>> a1 oscils 0.1, p4, 0
>>> out a1
>>> endin
>>>
>>>
>>> On 15 Jun 2011, at 21:35, Samuel Sagan wrote:
>>>
>>>> The massign opcode allows you to assign one instrument to one MIDI
>>>> channel.
>>>> That's a one to one relationship.
>>>>
>>>> What if you need to assign multiple instruments to one MIDI channel
>>>> (one
>>>> to
>>>> many relationship)?
>>>>
>>>> It's a frequent situation when playing a keyboard live -- the need to
>>>> activate more than one instrument. How do you do that?
>>>>
>>>> Thanks in advance.
>>>>
>>>> --
>>>> View this message in context:
>>>> http://csound.1045644.n5.nabble.com/Playing-multiple-instruments-from-a-single-MIDI-channel-tp4492560p4492560.html
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"