| One note, you can you do per-note automation as well if using chnget,
you'll just have to develop a scheme for doing it. I used one in
handling multitouch code in Android:
http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=blob_plain;f=android/CsoundAndroidExamples/res/raw/multitouch_xy.csd;hb=HEAD
This one used a pfield to determine note number, but if you use
fractiional instrument numbers, you could use the fractional part of
p1 to use with an sprintf. You could then use the automation
instrument with things like:
i 2 0 2 "controller.1" 10 20
i 2 0 2 "controller.2" 10 20
I guess if you want per-instrument and per-note both in the same
instrument and for the same parameter, you'd have to write some kind
of code that looks for a fractional value or other indicator. At
least using sprintf with chnget/chnset might be something to think
about.
On Mon, Apr 2, 2012 at 9:49 PM, John Allsup wrote:
> On 02/04/12 18:48, Tarmo Johannes wrote:
>> Hello,
>>
>> you have different possibilities:
>>
>> if you really like automation, you can use csound as plugin to your favourite DAW (either as LADSPA with csLadspa or VST (http://code.google.com/p/cabbage/ ) or if you have max-max4Live-Ableton Live you can use csound4live http://csound4live.com/ )
>
>>
>> Inside csound you can form envelopes (for example with opcode linseg but there many-many other methods as well) however long and use them with your parameters. I think it is most useful to do it with global variable. A very simple example to set envelope
>>
> ...
>> instr 1 ; automation
>> gkGain linseg 0, 12*60 , 0.5, 5*60, 1, 3*60,0 ; in 12 minutes to 0.5, 5 minutes to full and just in 3 to back 0 again
>> endin
>>
>> instr 2
>> asig oscil gkGain, 100,giSine
>> out asig
>> endin
> The imagined use case is as follows:
> 1) There are multiple instances of an instrument and possibly multiple
> notes playing on each instance.
> 2) Changing settings on one instrument changes settings for notes
> playing on that synth,
> 2a) but not for notes on other instances of the same instrument (same as
> in having the same opcode definition).
> 3) There is per-instance automation data and per-note automation data.
>
> If I want to automate each note differently, I can't use a single global
> variable, can't use signal routing at an instrument by instrument basis
> (as described in the article
> http://www.csounds.com/journal/issue13/emulatingMidiBasedStudios.html
> referenced in the other reply), so have to use zak channels (and a lot
> of them), and can't hardwire the opcode choices into a single
> instrument. (Else I have to duplicate the instrument and order things so
> that automation sent to the logical instrument are copied across these
> duplicate instruments.) These are just an array of channels, so if you
> have multiple channels per note and a few more for the instrument then
> while you can pass in the zak channel number via the score, you have to
> allocate numbers manually (and this makes modifying a score a potential
> nightmare with what I have in mind).
>
> I'm toying with writing a Ruby library (tending to use Ruby rather than
> python for scripting) that generates suitable input for csound. Maybe
> that's the way to go for what I want for now (and hopefully together
> with a few examples it will better illustrate what I'm trying to achieve.)
>
> One quick question about lines and linsegs etc. What is the best way to
> set the value that will be in the variable written to by the opcode when
> the envelope finishes?
>
>>
>>
>>
>> i 2 0 [20*60]
>>
>>
>>
>> Perhaps you know it all already and I did not get your questions exactly...
>>
>> If you want to record an autmoation in realtime then it is possible with writing the values to table or maybe to an external file with foutk but probablt more experienced users can give here better hints.
>>
>>
>> greetings,
>> tarmo
>>
>>
>>
>>
>> On Monday 02 April 2012 20:27:16 John Allsup wrote:
>>> I am new to csound and am gradually trying to figure out what it's
>>> readily capable of. A routine feature of modern DAWs is parameter
>>> automation. Clearly at opcode level csound is capable of fine-grained
>>> automation of any parameter of any opcode. The question is how to get
>>> the information into the instrument. Where and how do you specify a
>>> long varied (e.g. minutes long with 100s of segments) curve to change a
>>> parameter of a note or instrument? I'm wondering whether the easiest
>>> thing to do is to write a separate script in ruby or python that
>>> generates the curve as a mono WAV file that can then be imported via a
>>> table or opcode. Any thoughts?
>>>
>>>
>>> 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"
>
|