Csound Csound-dev Csound-tekno Search About

[Csnd] Re: massignLayer opcode Needed

Date2010-04-01 17:15
From"Art Hunkins"
Subject[Csnd] Re: massignLayer opcode Needed
Personally, I'm against opcode bloat.

I'd rather see massign enhanced with optional arguments, rather than 
proliferate opcodes.

With a little creative thinking, such an approach should be possible with 
massign.

Art Hunkins

----- Original Message ----- 
From: "Dr. Richard Boulanger" 
To: 
Sent: Thursday, April 01, 2010 10:15 AM
Subject: [Csnd] massignLayer opcode Needed


> Dear Csound Developers,
>
> There is a real need for an opcode, like massign, that would allow us
> to have input from MIDI channel 1 be assigned to multiple instruments
> so that we can layer more simply and intuntively "layer" our MIDI 
> instruments
> in Csound.
>
> Maybe there is a UDO for this already?  But....  Would you consider 
> writing and adding another MIDI opcode?
>
> It would be really useful to have something like massign, but with 
> scaling - call it mlayer or massignMulti or massignLayer
>
> You would use it in instrument 0 (like massign)
>
> mlayer 1, 3, 100, 12   (simplest version - MIDI channel 1 is mapped to 
> control instrument 3, 100, and 12)
>
> mlayervel  1,   3,.9,  100, .6, 12, 1.0  (mix version - MIDI channel 1  is 
> mapped to instr3 with velocity scaling by 90%, to instrument 100  with 
> velocity scaling at 60%, and instr 12 with no velocity scaling)
>
>
> Currently, I am doing layering in my MIDI orchestras with the subinstr 
> opcode (which is really cool, but quite complex)
>
> Something simple like this  -  a couple of new "massign-like" opcodes 
> would be really great.
>
> Hope you can add them to Csound.
>
> Dr. B.
>
>
>
>
> 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"

Date2010-04-01 17:24
From"Dr. Richard Boulanger"
Subject[Csnd] Re: massignLayer opcode Needed
Hello Art,

Possibly massign could be enhanced with optional arguments, but... no  
matter what...,
this is such a common task/need for MIDI musicians and for sound  
designers using MIDI
synths.

In Csound, we need to support layering and scaling in the simplest and  
clearest way
and at the highest level.

This is such a common and  "easy" task to do with any other MIDI-based  
production tool  or softSynth.

Yet, my "subinstrument" solution is way too complex for beginners and  
I would not want to introduce
this level of complexity to my first semester students at Berklee.   
Rather, there should be a simple MIDI
opcode that takes care of this "MIDI merging"  "MIDI mapping" task.

My students and I both hope that it is easy to add/do and that we will  
see it in the next release of Csound.

Wishing you and all Csounders......... all the best,

Dr. B.


On Apr 1, 2010, at 12:15 PM, Art Hunkins wrote:

> Personally, I'm against opcode bloat.
>
> I'd rather see massign enhanced with optional arguments, rather than  
> proliferate opcodes.
>
> With a little creative thinking, such an approach should be possible  
> with massign.
>
> Art Hunkins
>
> ----- Original Message ----- From: "Dr. Richard Boulanger"  >
> To: 
> Sent: Thursday, April 01, 2010 10:15 AM
> Subject: [Csnd] massignLayer opcode Needed
>
>
>> Dear Csound Developers,
>>
>> There is a real need for an opcode, like massign, that would allow us
>> to have input from MIDI channel 1 be assigned to multiple instruments
>> so that we can layer more simply and intuntively "layer" our MIDI  
>> instruments
>> in Csound.
>>
>> Maybe there is a UDO for this already?  But....  Would you consider  
>> writing and adding another MIDI opcode?
>>
>> It would be really useful to have something like massign, but with  
>> scaling - call it mlayer or massignMulti or massignLayer
>>
>> You would use it in instrument 0 (like massign)
>>
>> mlayer 1, 3, 100, 12   (simplest version - MIDI channel 1 is mapped  
>> to control instrument 3, 100, and 12)
>>
>> mlayervel  1,   3,.9,  100, .6, 12, 1.0  (mix version - MIDI  
>> channel 1  is mapped to instr3 with velocity scaling by 90%, to  
>> instrument 100  with velocity scaling at 60%, and instr 12 with no  
>> velocity scaling)
>>
>>
>> Currently, I am doing layering in my MIDI orchestras with the  
>> subinstr opcode (which is really cool, but quite complex)
>>
>> Something simple like this  -  a couple of new "massign-like"  
>> opcodes would be really great.
>>
>> Hope you can add them to Csound.
>>
>> Dr. B.
>>
>>
>>
>>
>> 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"

Date2010-04-01 17:39
FromJacob Joaquin
Subject[Csnd] Re: Re: massignLayer opcode Needed
> Personally, I'm against opcode bloat.

I agree with the sentiment, though that ship sailed long ago.
According to "csound --list-opcodes", there are 1395 opcodes.
Unfortunately, I don't think there is a solution for opcode bloat. At
least not for Csound 5.  Perhaps Csound 6 could have a system for
organizing opcodes into libraries.

Best,
Jake

Date2010-04-01 17:59
From"Dr. Richard Boulanger"
Subject[Csnd] Re: Re: Re: massignLayer opcode Needed
I feel we are heading for a Fox News - MSNBC "debate" here... and I am  
stopping now

but...

I never appreciated the negativity of the criticisms about "opcode- 
bloat"

Pushing back on adding new opcodes would be like accusing someone  
blogging about their dream of
turning  Csound into SuperCollider, CommonMusic, or PyCsound ( ;-} ) -  
all of which, by the way, inspire me as
well;  I don't ever want to complain about  adding yet another  
"unnecessary" front-end or score-generator/processor,
or more OSC/MIDI/JACK/Max/LIVE/VST/AU/WIIMOTE/ETC support either  
because ALL of these directions and additions,
these alternative approaches.... are what make Csound so important and  
amazing.

Under the umbrella of Csound we show, support and champion so many  
perspectives and approaches to making music.
I think this is one of our best and maybe one of our most important  
joint international contributions to the field.

I am always excited by "more" opcodes and "new" opcodes.

I am always inspired by new front-ends.

I am always thrilled and blow away by "new" approaches.

and...

I love to "brag" in my classes and to beginners about how many  
"modules" we have in "our" massive free cross-platform synthesizer.

And... I am always thrilled to discover new features and functionality  
and new ways the people are using these new possibilities to make  
music and to connect
with commercial production tools.

We need to keep looking at the solutions of others and the way that  
people and programs work - and making sure that Csound supports as  
many of these modalities and aesthetics as we can.

Dr. B.


On Apr 1, 2010, at 12:39 PM, Jacob Joaquin wrote:

>> Personally, I'm against opcode bloat.
>
> I agree with the sentiment, though that ship sailed long ago.
> According to "csound --list-opcodes", there are 1395 opcodes.
> Unfortunately, I don't think there is a solution for opcode bloat. At
> least not for Csound 5.  Perhaps Csound 6 could have a system for
> organizing opcodes into libraries.
>
> Best,
> Jake
> -- 
> The Csound Blog - http://csound.noisepages.com/
> Slipmat - http://slipmat.noisepages.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"

Date2010-04-01 18:05
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: massignLayer opcode Needed
Obviously...having contributed a fair number of this bloat items
myself.... I agree with Richard Boulanger here!

The solution is better documentation and, above all, better example pieces.

Regards,
Mike

On Thu, Apr 1, 2010 at 12:59 PM, Dr. Richard Boulanger
 wrote:
> I feel we are heading for a Fox News - MSNBC "debate" here... and I am
> stopping now
>
> but...
>
> I never appreciated the negativity of the criticisms about "opcode-bloat"
>
> Pushing back on adding new opcodes would be like accusing someone blogging
> about their dream of
> turning  Csound into SuperCollider, CommonMusic, or PyCsound ( ;-} ) - all
> of which, by the way, inspire me as
> well;  I don't ever want to complain about  adding yet another "unnecessary"
> front-end or score-generator/processor,
> or more OSC/MIDI/JACK/Max/LIVE/VST/AU/WIIMOTE/ETC support either because ALL
> of these directions and additions,
> these alternative approaches.... are what make Csound so important and
> amazing.
>
> Under the umbrella of Csound we show, support and champion so many
> perspectives and approaches to making music.
> I think this is one of our best and maybe one of our most important joint
> international contributions to the field.
>
> I am always excited by "more" opcodes and "new" opcodes.
>
> I am always inspired by new front-ends.
>
> I am always thrilled and blow away by "new" approaches.
>
> and...
>
> I love to "brag" in my classes and to beginners about how many "modules" we
> have in "our" massive free cross-platform synthesizer.
>
> And... I am always thrilled to discover new features and functionality and
> new ways the people are using these new possibilities to make music and to
> connect
> with commercial production tools.
>
> We need to keep looking at the solutions of others and the way that people
> and programs work - and making sure that Csound supports as many of these
> modalities and aesthetics as we can.
>
> Dr. B.
>
>
> On Apr 1, 2010, at 12:39 PM, Jacob Joaquin wrote:
>
>>> Personally, I'm against opcode bloat.
>>
>> I agree with the sentiment, though that ship sailed long ago.
>> According to "csound --list-opcodes", there are 1395 opcodes.
>> Unfortunately, I don't think there is a solution for opcode bloat. At
>> least not for Csound 5.  Perhaps Csound 6 could have a system for
>> organizing opcodes into libraries.
>>
>> Best,
>> Jake
>> --
>> The Csound Blog - http://csound.noisepages.com/
>> Slipmat - http://slipmat.noisepages.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"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot 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"


Date2010-04-01 18:33
FromJacob Joaquin
Subject[Csnd] Re: Re: Re: Re: massignLayer opcode Needed
> I never appreciated the negativity of the criticisms about "opcode-bloat"

Just to clarify my position. I believe the bloat problem comes not
from having 1400 opcodes, but from a lack of a system of organization.

If opcodes could be organized into libraries, that would help all the
way around.  We could have several new MIDI libraries written, without
having to come up with inventive names for each individual opcode
because a large portion of the namespace has been eaten up by earlier
opcodes.  I'm not at all suggesting that new opcodes shouldn't be
added because there is already enough of them. I'm saying that a
system of opcode organization could in fact help Csound grow, and
eliminate the perceived bloat problem.

In the meantime, Michael's suggestion about documentation is probably
the way to go.

Best,
Jake

Date2010-04-01 18:44
FromTakahiko TSUCHIYA
Subject[Csnd] Re: Re: Re: Re: Re: massignLayer opcode Needed
Hello everyone,
I'm the one who asked about this problem in Dr. B's class. 

Does anyone know the reason why massign was designed in this way, 
that each MIDI input channel is to be assigned to a single instrument?

Also, I'm interested if we could play multiple instruments from a 
single note event in the score section. In other words, passing note 
on info from an instr to another.

Best regards,
Takahiko Tsuchiya


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"

Date2010-04-01 19:41
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Re: Re: massignLayer opcode Needed
OK, yes, something like namespaces would be a good idea and could
probably be done in a backwardly compatible way.

Regards,
Mike

On Thu, Apr 1, 2010 at 1:44 PM, Takahiko TSUCHIYA  wrote:
> Hello everyone,
> I'm the one who asked about this problem in Dr. B's class.
>
> Does anyone know the reason why massign was designed in this way,
> that each MIDI input channel is to be assigned to a single instrument?
>
> Also, I'm interested if we could play multiple instruments from a
> single note event in the score section. In other words, passing note
> on info from an instr to another.
>
> Best regards,
> Takahiko Tsuchiya
>
>
> 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"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot 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"


Date2010-04-01 19:48
FromVictor Lazzarini
Subject[Csnd] Re: Re: massignLayer opcode Needed
Here's an example I used in class this week that picks up MIDI and  
sends  OSC messages to four hosts. If you change the
OSCsend code to an 'event' opcode, you can control several instruments  
with a single MIDI channel.

instr 1
ktrig init 1
k1 cpsmidib 1
i1 ampmidi 0dbfs
if ktrig == 1 then
kinst rand 1000, 2
kinst = 2 + abs(kinst)/1000
OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
ktrig = 0
endif
ktag release
if ktag == 1 then
OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
turnoff
endif
endin


Victor

On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:

> Hello everyone,
> I'm the one who asked about this problem in Dr. B's class.
>
> Does anyone know the reason why massign was designed in this way,
> that each MIDI input channel is to be assigned to a single instrument?
>
> Also, I'm interested if we could play multiple instruments from a
> single note event in the score section. In other words, passing note
> on info from an instr to another.
>
> Best regards,
> Takahiko Tsuchiya
>
>
> 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"

Date2010-04-02 16:26
FromTakahiko TSUCHIYA
Subject[Csnd] Re: Re: Re: massignLayer opcode Needed
Thanks Victor and Michael,
Yes, I could layer / pass note events by using "event_i." 
("event" makes glitchy sound and I don't know why.)
I still cannot figure out how to gate amp by MIDI notes though.


gisine	ftgen	1, 0, 4096, 10, 1

	instr 1
ifrq	cpsmidi
asig	buzz	ampdb(75), ifrq, 10, 1
	out	asig
	event_i	"i", 2, 0, p3, ifrq
	endin

	instr 2
iamp	=	ampdb(78)
ifrq	=	p4
asig	oscil	iamp, ifrq, 1
	out	asig
	endin


Takahiko

Victor Lazzarini  wrote:
(2010/04/01 14:48)

>Here's an example I used in class this week that picks up MIDI and  
>sends  OSC messages to four hosts. If you change the
>OSCsend code to an 'event' opcode, you can control several instruments  
>with a single MIDI channel.
>
>instr 1
>ktrig init 1
>k1 cpsmidib 1
>i1 ampmidi 0dbfs
>if ktrig == 1 then
>kinst rand 1000, 2
>kinst = 2 + abs(kinst)/1000
>OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>ktrig = 0
>endif
>ktag release
>if ktag == 1 then
>OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
>OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>turnoff
>endif
>endin
>
>
>Victor
>
>On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:
>
>> Hello everyone,
>> I'm the one who asked about this problem in Dr. B's class.
>>
>> Does anyone know the reason why massign was designed in this way,
>> that each MIDI input channel is to be assigned to a single instrument?
>>
>> Also, I'm interested if we could play multiple instruments from a
>> single note event in the score section. In other words, passing note
>> on info from an instr to another.
>>
>> Best regards,
>> Takahiko Tsuchiya
>>
>>
>> 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"

Date2010-04-02 16:38
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: massignLayer opcode Needed
Note that a MIDI event has an invalid p3, so your code is bound to  
have problems. If you adapt my code, it'll
do what you want:

instr 1

  ktrig init 1

  k1 cpsmidib 1
  i1 ampmidi 0dbfs

  if ktrig == 1 then  /* NOTE ON */
      kinst rand 1000, 1
      kinst = 2 + abs(kinst)/1000
      event  "i", kinstr, 0, -1, i1, k1
      ktrig = 0
  endif

  ktag release       /* NOTE OFF */
  if ktag == 1 then
       event  "i",-kinstr, 0, 1, i1, k1
       turnoff
  endif

endin


instr 2

  a1 oscili  p4, p5, 1
       out a1

endin



On 2 Apr 2010, at 16:26, Takahiko TSUCHIYA wrote:

> Thanks Victor and Michael,
> Yes, I could layer / pass note events by using "event_i."
> ("event" makes glitchy sound and I don't know why.)
> I still cannot figure out how to gate amp by MIDI notes though.
>
>
> gisine	ftgen	1, 0, 4096, 10, 1
>
> 	instr 1
> ifrq	cpsmidi
> asig	buzz	ampdb(75), ifrq, 10, 1
> 	out	asig
> 	event_i	"i", 2, 0, p3, ifrq
> 	endin
>
> 	instr 2
> iamp	=	ampdb(78)
> ifrq	=	p4
> asig	oscil	iamp, ifrq, 1
> 	out	asig
> 	endin
>
>
> Takahiko
>
> Victor Lazzarini  wrote:
> (2010/04/01 14:48)
>
>> Here's an example I used in class this week that picks up MIDI and
>> sends  OSC messages to four hosts. If you change the
>> OSCsend code to an 'event' opcode, you can control several  
>> instruments
>> with a single MIDI channel.
>>
>> instr 1
>> ktrig init 1
>> k1 cpsmidib 1
>> i1 ampmidi 0dbfs
>> if ktrig == 1 then
>> kinst rand 1000, 2
>> kinst = 2 + abs(kinst)/1000
>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>> ktrig = 0
>> endif
>> ktag release
>> if ktag == 1 then
>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>> turnoff
>> endif
>> endin
>>
>>
>> Victor
>>
>> On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:
>>
>>> Hello everyone,
>>> I'm the one who asked about this problem in Dr. B's class.
>>>
>>> Does anyone know the reason why massign was designed in this way,
>>> that each MIDI input channel is to be assigned to a single  
>>> instrument?
>>>
>>> Also, I'm interested if we could play multiple instruments from a
>>> single note event in the score section. In other words, passing note
>>> on info from an instr to another.
>>>
>>> Best regards,
>>> Takahiko Tsuchiya
>>>
>>>
>>> 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"
>



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"

Date2010-04-02 16:45
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Re: massignLayer opcode Needed
sorry make the line

kinst rand 1000, 1

into

kinst rand 1000, 2

Victor

On 2 Apr 2010, at 16:38, Victor Lazzarini wrote:

> Note that a MIDI event has an invalid p3, so your code is bound to  
> have problems. If you adapt my code, it'll
> do what you want:
>
> instr 1
>
> ktrig init 1
>
> k1 cpsmidib 1
> i1 ampmidi 0dbfs
>
> if ktrig == 1 then  /* NOTE ON */
>     kinst rand 1000, 1
>     kinst = 2 + abs(kinst)/1000
>     event  "i", kinstr, 0, -1, i1, k1
>     ktrig = 0
> endif
>
> ktag release       /* NOTE OFF */
> if ktag == 1 then
>      event  "i",-kinstr, 0, 1, i1, k1
>      turnoff
> endif
>
> endin
>
>
> instr 2
>
> a1 oscili  p4, p5, 1
>      out a1
>
> endin
>
>
>
> On 2 Apr 2010, at 16:26, Takahiko TSUCHIYA wrote:
>
>> Thanks Victor and Michael,
>> Yes, I could layer / pass note events by using "event_i."
>> ("event" makes glitchy sound and I don't know why.)
>> I still cannot figure out how to gate amp by MIDI notes though.
>>
>>
>> gisine	ftgen	1, 0, 4096, 10, 1
>>
>> 	instr 1
>> ifrq	cpsmidi
>> asig	buzz	ampdb(75), ifrq, 10, 1
>> 	out	asig
>> 	event_i	"i", 2, 0, p3, ifrq
>> 	endin
>>
>> 	instr 2
>> iamp	=	ampdb(78)
>> ifrq	=	p4
>> asig	oscil	iamp, ifrq, 1
>> 	out	asig
>> 	endin
>>
>>
>> Takahiko
>>
>> Victor Lazzarini  wrote:
>> (2010/04/01 14:48)
>>
>>> Here's an example I used in class this week that picks up MIDI and
>>> sends  OSC messages to four hosts. If you change the
>>> OSCsend code to an 'event' opcode, you can control several  
>>> instruments
>>> with a single MIDI channel.
>>>
>>> instr 1
>>> ktrig init 1
>>> k1 cpsmidib 1
>>> i1 ampmidi 0dbfs
>>> if ktrig == 1 then
>>> kinst rand 1000, 2
>>> kinst = 2 + abs(kinst)/1000
>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>> ktrig = 0
>>> endif
>>> ktag release
>>> if ktag == 1 then
>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>> turnoff
>>> endif
>>> endin
>>>
>>>
>>> Victor
>>>
>>> On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:
>>>
>>>> Hello everyone,
>>>> I'm the one who asked about this problem in Dr. B's class.
>>>>
>>>> Does anyone know the reason why massign was designed in this way,
>>>> that each MIDI input channel is to be assigned to a single  
>>>> instrument?
>>>>
>>>> Also, I'm interested if we could play multiple instruments from a
>>>> single note event in the score section. In other words, passing  
>>>> note
>>>> on info from an instr to another.
>>>>
>>>> Best regards,
>>>> Takahiko Tsuchiya
>>>>
>>>>
>>>> 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"
>>
>
>
>
> 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"

Date2010-04-02 17:51
FromTakahiko TSUCHIYA
Subject[Csnd] Re: Re: Re: Re: Re: Re: massignLayer opcode Needed
It works perfectly. Thanks a lot!

Takahiko

Victor Lazzarini  wrote:
(2010/04/02 11:45)

>sorry make the line
>
>kinst rand 1000, 1
>
>into
>
>kinst rand 1000, 2
>
>Victor
>
>On 2 Apr 2010, at 16:38, Victor Lazzarini wrote:
>
>> Note that a MIDI event has an invalid p3, so your code is bound to  
>> have problems. If you adapt my code, it'll
>> do what you want:
>>
>> instr 1
>>
>> ktrig init 1
>>
>> k1 cpsmidib 1
>> i1 ampmidi 0dbfs
>>
>> if ktrig == 1 then  /* NOTE ON */
>>     kinst rand 1000, 1
>>     kinst = 2 + abs(kinst)/1000
>>     event  "i", kinstr, 0, -1, i1, k1
>>     ktrig = 0
>> endif
>>
>> ktag release       /* NOTE OFF */
>> if ktag == 1 then
>>      event  "i",-kinstr, 0, 1, i1, k1
>>      turnoff
>> endif
>>
>> endin
>>
>>
>> instr 2
>>
>> a1 oscili  p4, p5, 1
>>      out a1
>>
>> endin
>>
>>
>>
>> On 2 Apr 2010, at 16:26, Takahiko TSUCHIYA wrote:
>>
>>> Thanks Victor and Michael,
>>> Yes, I could layer / pass note events by using "event_i."
>>> ("event" makes glitchy sound and I don't know why.)
>>> I still cannot figure out how to gate amp by MIDI notes though.
>>>
>>>
>>> gisine	ftgen	1, 0, 4096, 10, 1
>>>
>>> 	instr 1
>>> ifrq	cpsmidi
>>> asig	buzz	ampdb(75), ifrq, 10, 1
>>> 	out	asig
>>> 	event_i	"i", 2, 0, p3, ifrq
>>> 	endin
>>>
>>> 	instr 2
>>> iamp	=	ampdb(78)
>>> ifrq	=	p4
>>> asig	oscil	iamp, ifrq, 1
>>> 	out	asig
>>> 	endin
>>>
>>>
>>> Takahiko
>>>
>>> Victor Lazzarini  wrote:
>>> (2010/04/01 14:48)
>>>
>>>> Here's an example I used in class this week that picks up MIDI and
>>>> sends  OSC messages to four hosts. If you change the
>>>> OSCsend code to an 'event' opcode, you can control several  
>>>> instruments
>>>> with a single MIDI channel.
>>>>
>>>> instr 1
>>>> ktrig init 1
>>>> k1 cpsmidib 1
>>>> i1 ampmidi 0dbfs
>>>> if ktrig == 1 then
>>>> kinst rand 1000, 2
>>>> kinst = 2 + abs(kinst)/1000
>>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
>>>> ktrig = 0
>>>> endif
>>>> ktag release
>>>> if ktag == 1 then
>>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
>>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
>>>> turnoff
>>>> endif
>>>> endin
>>>>
>>>>
>>>> Victor
>>>>
>>>> On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:
>>>>
>>>>> Hello everyone,
>>>>> I'm the one who asked about this problem in Dr. B's class.
>>>>>
>>>>> Does anyone know the reason why massign was designed in this way,
>>>>> that each MIDI input channel is to be assigned to a single  
>>>>> instrument?
>>>>>
>>>>> Also, I'm interested if we could play multiple instruments from a
>>>>> single note event in the score section. In other words, passing  
>>>>> note
>>>>> on info from an instr to another.
>>>>>
>>>>> Best regards,
>>>>> Takahiko Tsuchiya
>>>>>
>>>>>
>>>>> 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"
>>>
>>
>>
>>
>> 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"

Date2010-04-02 18:01
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: massignLayer opcode Needed
Good. The original code can be used to do the same for various  
computers in the network, which can be good fun. Layering machines,
then, with a csound client like this:

gio OSCinit 44100

instr 1

kinst init 0
kstart init 0
kdur init 0
kamp init 0
kfreq init 0
listen:
   kans OSClisten gio, "/instr2", "fffff",kinst, kstart,kdur,kamp,kfreq
   if kans == 1 then
     event "i",kinst,kstart,kdur,kamp,kfreq
     kgoto listen
   endif

endin

instr 2
   a1 buzz p4, p5, 40, 2
   out a1
endin




On 2 Apr 2010, at 17:51, Takahiko TSUCHIYA wrote:

> It works perfectly. Thanks a lot!
>
> Takahiko
>
> Victor Lazzarini  wrote:
> (2010/04/02 11:45)
>
>> sorry make the line
>>
>> kinst rand 1000, 1
>>
>> into
>>
>> kinst rand 1000, 2
>>
>> Victor
>>
>> On 2 Apr 2010, at 16:38, Victor Lazzarini wrote:
>>
>>> Note that a MIDI event has an invalid p3, so your code is bound to
>>> have problems. If you adapt my code, it'll
>>> do what you want:
>>>
>>> instr 1
>>>
>>> ktrig init 1
>>>
>>> k1 cpsmidib 1
>>> i1 ampmidi 0dbfs
>>>
>>> if ktrig == 1 then  /* NOTE ON */
>>>    kinst rand 1000, 1
>>>    kinst = 2 + abs(kinst)/1000
>>>    event  "i", kinstr, 0, -1, i1, k1
>>>    ktrig = 0
>>> endif
>>>
>>> ktag release       /* NOTE OFF */
>>> if ktag == 1 then
>>>     event  "i",-kinstr, 0, 1, i1, k1
>>>     turnoff
>>> endif
>>>
>>> endin
>>>
>>>
>>> instr 2
>>>
>>> a1 oscili  p4, p5, 1
>>>     out a1
>>>
>>> endin
>>>
>>>
>>>
>>> On 2 Apr 2010, at 16:26, Takahiko TSUCHIYA wrote:
>>>
>>>> Thanks Victor and Michael,
>>>> Yes, I could layer / pass note events by using "event_i."
>>>> ("event" makes glitchy sound and I don't know why.)
>>>> I still cannot figure out how to gate amp by MIDI notes though.
>>>>
>>>>
>>>> gisine	ftgen	1, 0, 4096, 10, 1
>>>>
>>>> 	instr 1
>>>> ifrq	cpsmidi
>>>> asig	buzz	ampdb(75), ifrq, 10, 1
>>>> 	out	asig
>>>> 	event_i	"i", 2, 0, p3, ifrq
>>>> 	endin
>>>>
>>>> 	instr 2
>>>> iamp	=	ampdb(78)
>>>> ifrq	=	p4
>>>> asig	oscil	iamp, ifrq, 1
>>>> 	out	asig
>>>> 	endin
>>>>
>>>>
>>>> Takahiko
>>>>
>>>> Victor Lazzarini  wrote:
>>>> (2010/04/01 14:48)
>>>>
>>>>> Here's an example I used in class this week that picks up MIDI and
>>>>> sends  OSC messages to four hosts. If you change the
>>>>> OSCsend code to an 'event' opcode, you can control several
>>>>> instruments
>>>>> with a single MIDI channel.
>>>>>
>>>>> instr 1
>>>>> ktrig init 1
>>>>> k1 cpsmidib 1
>>>>> i1 ampmidi 0dbfs
>>>>> if ktrig == 1 then
>>>>> kinst rand 1000, 2
>>>>> kinst = 2 + abs(kinst)/1000
>>>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1,  
>>>>> k1
>>>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1,  
>>>>> k1
>>>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1,  
>>>>> k1
>>>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1,  
>>>>> k1
>>>>> ktrig = 0
>>>>> endif
>>>>> ktag release
>>>>> if ktag == 1 then
>>>>> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1,  
>>>>> k1
>>>>> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst, 
>>>>> 0,-1,i1, k1
>>>>> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst, 
>>>>> 0,-1,i1, k1
>>>>> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst, 
>>>>> 0,-1,i1, k1
>>>>> turnoff
>>>>> endif
>>>>> endin
>>>>>
>>>>>
>>>>> Victor
>>>>>
>>>>> On 1 Apr 2010, at 18:44, Takahiko TSUCHIYA wrote:
>>>>>
>>>>>> Hello everyone,
>>>>>> I'm the one who asked about this problem in Dr. B's class.
>>>>>>
>>>>>> Does anyone know the reason why massign was designed in this way,
>>>>>> that each MIDI input channel is to be assigned to a single
>>>>>> instrument?
>>>>>>
>>>>>> Also, I'm interested if we could play multiple instruments from a
>>>>>> single note event in the score section. In other words, passing
>>>>>> note
>>>>>> on info from an instr to another.
>>>>>>
>>>>>> Best regards,
>>>>>> Takahiko Tsuchiya
>>>>>>
>>>>>>
>>>>>> 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"
>>>>
>>>
>>>
>>>
>>> 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"
>



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"

Date2010-04-02 23:48
FromDavid Akbari
Subject[Csnd] Re: Re: Re: massignLayer opcode Needed
> instr 1
> ktrig init 1
> k1 cpsmidib 1
> i1 ampmidi 0dbfs
> if ktrig == 1 then
> kinst rand 1000, 2
> kinst = 2 + abs(kinst)/1000
> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",kinst,0,-1,i1, k1
> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",kinst,0,-1,i1, k1
> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",kinst,0,-1,i1, k1
> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",kinst,0,-1,i1, k1
> ktrig = 0
> endif
> ktag release
> if ktag == 1 then
> OSCsend 0,"10.204.24.79",44100, "/instr2","fffff",-kinst,0,1,i1, k1
> OSCsend 0,"10.204.24.73",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
> OSCsend 0,"10.204.24.75",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
> OSCsend 0,"10.204.24.76",44100, "/instr2","fffff",-kinst,0,-1,i1, k1
> turnoff
> endif
> endin

Nice!

What complications could arise from encapsulating something like this
(especially the 'event' version) into an UDO? Are there checks for
situations where there could be event conflicts?

Also more opcodes, please for sure! I thought the beauty of having the
API with multiple plugin libraries was supposed to be that you can
pick and choose which you want to have in your custom version!



-David


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"