Any way to make breakpoint envelopes with unlimited number of points?
Date | 2007-09-10 13:12 |
From | teemuo |
Subject | Any way to make breakpoint envelopes with unlimited number of points? |
I've been coding a sort of Cecilia equivalent for Windows for the past month, and it's been progressing nicely...But one problem I'm having is how to pass envelopes to the Csound orchestra efficiently and accurately. The envelopes of course must have varying amounts of breakpoints and I am currently simply using Ftables generated with GEN27. The problem with this approach is the timing accuracy for the breakpoints that can be achieved. Now, of course, I could simply use very large tables, like as large as the desired render duration in sample frames, but that seems a bit silly... Is there any other alternative? One possibility, I guess, would be to handle the breakpoint functions directly in the orchestra code using linseg or similar, as most of the processing modules I am planning to include in my program only need one note in the score anyway, so having the envelopes hardcoded in the orchestra in that way could be possible...But can the Csound orchestra code compiler handle very large amounts of input fields to, for example, linseg? Thanks for any insights you might be able to give, Teemu O -- View this message in context: http://www.nabble.com/Any-way-to-make-breakpoint-envelopes-with-unlimited-number-of-points--tf4414113.html#a12591424 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-09-10 14:10 |
From | peiman |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
Hi, do you mean that you are not happy about the way Cecilia handles envelops? For a good resolution why not just use very large table size (e.g. 16384 or more) regardless of the actual length of the note? Best Peiman teemuo wrote: > > I've been coding a sort of Cecilia equivalent for Windows for the past > month, and it's been progressing nicely...But one problem I'm having is > how to pass envelopes to the Csound orchestra efficiently and accurately. > The envelopes of course must have varying amounts of breakpoints and I am > currently simply using Ftables generated with GEN27. The problem with this > approach is the timing accuracy for the breakpoints that can be achieved. > Now, of course, I could simply use very large tables, like as large as the > desired render duration in sample frames, but that seems a bit silly... > > Is there any other alternative? One possibility, I guess, would be to > handle the breakpoint functions directly in the orchestra code using > linseg or similar, as most of the processing modules I am planning to > include in my program only need one note in the score anyway, so having > the envelopes hardcoded in the orchestra in that way could be > possible...But can the Csound orchestra code compiler handle very large > amounts of input fields to, for example, linseg? > > Thanks for any insights you might be able to give, > > Teemu O > -- View this message in context: http://www.nabble.com/Any-way-to-make-breakpoint-envelopes-with-unlimited-number-of-points--tf4414113.html#a12592487 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-09-10 14:27 |
From | teemuo |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
I am not happy at all how Cecilia works right now on Windows...That why I've been programming my own similar front-end for Csound... A table size of 16384 isnt't nearly enough for very fast changes in envelopes, especially if the sound is long...In fact the envelopes should be able to respond sample accurately, in which case the table size(s) would grow insanely...I'm hoping for a solution where I would not need huge function tables... As an example, I might want to have the following breakpoints (given as seconds and then value) : 0.000 0.0 0.001 1.0 59.999 0.5 60.000 0.0 Using the table approach I would have to waste resources and use a very large table just for these four breakpoints. I think it is not possible to pass varying numbers of p-fields from the score to, for example, a linseg-opcode in the orchestra, right? peiman wrote: > > Hi, > > do you mean that you are not happy about the way Cecilia handles envelops? > For a good resolution why not just use very large table size (e.g. 16384 > or more) regardless of the actual length of the note? > > Best > Peiman > > -- View this message in context: http://www.nabble.com/Any-way-to-make-breakpoint-envelopes-with-unlimited-number-of-points--tf4414113.html#a12592780 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-09-10 14:42 |
From | peiman |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
OK I see where you are coming from :-) I did myself wonder about that. Now I know that Blue uses this breakpoint format for automating istruments and you can import and export these automations. Just looking at a blue generated CSD this is what I see: ; ; "" ; by author ; ; ; ; Generated by blue 0.117.0 (http://csounds.com/stevenyi/blue/index.html) ; |
Date | 2007-09-10 14:51 |
From | teemuo |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
Ok, the Blue-approach seems clever and workable...I have try something like that...Thanks a lot for suggesting! peiman wrote: > > OK I see where you are coming from :-) I did myself wonder about that. Now > I know that Blue uses this breakpoint format for automating istruments and > you can import and export these automations. > > Just looking at a blue generated CSD this is what I see: > > -snip- > > So it breaks up the envelop points into line segments (as apposed to > linseg-opcode) using a global line object. This means that you don't have > to have very large number of pfields but the line object has to be > controlled by a separate note (or rather a note section). > > I would be very interested to see what solution you come up with. > > Best > peiman > > > -- View this message in context: http://www.nabble.com/Any-way-to-make-breakpoint-envelopes-with-unlimited-number-of-points--tf4414113.html#a12593122 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-09-10 15:11 |
From | Jacob Joaquin |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
My solution ended up being virtually identical to peiman's, except that it uses the zak bus instead of a global variable. :) |
Date | 2007-09-10 15:20 |
From | joachim heintz |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
hi teemuo - i'm not sure if this a good idea for your case, but one solution could also be to write the breakpoint pair-values (time and value) in a function table via GEN02 (as much as you need), and then to read the table in the orc and to make a linseg with this values. a simple example with your values: ;making a ftable with pairs timepoint/value gibreakp ftgen 0, 0, 8, -2, 0, 0, 0.001, 1, 59.999, 0.5, 60, 0 instr 1 ;reading the table values itmpt1 table 0, gibreakp ival1 table 1, gibreakp itmpt2 table 2, gibreakp ival2 table 3, gibreakp itmpt3 table 4, gibreakp ival3 table 5, gibreakp itmpt4 table 6, gibreakp ival4 table 7, gibreakp ;calculating the durations idur1 = itmpt2 - itmpt1 idur2 = itmpt3 - itmpt2 idur3 = itmpt4 - itmpt3 ;envelope and audiosignal kenv linseg ival1, idur1, ival2, idur2, ival3, idur3, ival4 asin oscils 0dbfs, 666, 0 aenv = asin * kenv out aenv endin i1 0 60 best - joachim Am 10.09.2007 um 15:27 schrieb teemuo:
|
Date | 2007-09-10 16:50 |
From | "Steven Yi" |
Subject | Re: Any way to make breakpoint envelopes with unlimited number of points? |
Attachments | None |