[Csnd] Re: massignLayer opcode Needed
| Date | 2010-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" |
| Date | 2010-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" |
| Date | 2010-04-01 17:39 |
| From | Jacob 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 |
| Date | 2010-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"
|
| Date | 2010-04-01 18:05 |
| From | Michael 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 |
| Date | 2010-04-01 18:33 |
| From | Jacob 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 |
| Date | 2010-04-01 18:44 |
| From | Takahiko 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"
|
| Date | 2010-04-01 19:41 |
| From | Michael 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 |
| Date | 2010-04-01 19:48 |
| From | Victor 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"
|
| Date | 2010-04-02 16:26 |
| From | Takahiko 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 |
| Date | 2010-04-02 16:38 |
| From | Victor 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 |
| Date | 2010-04-02 16:45 |
| From | Victor 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 |
| Date | 2010-04-02 17:51 |
| From | Takahiko TSUCHIYA |
| Subject | [Csnd] Re: Re: Re: Re: Re: Re: massignLayer opcode Needed |
It works perfectly. Thanks a lot! Takahiko Victor Lazzarini |
| Date | 2010-04-02 18:01 |
| From | Victor 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 |
| Date | 2010-04-02 23:48 |
| From | David 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"
|