[Csnd] Envelope with sinusoidal sections?
Date | 2011-03-29 20:11 |
From | Forrest Cahoon |
Subject | [Csnd] Envelope with sinusoidal sections? |
I'd like to have an envelope that would be like linseg, except that instead of line segments between the sections it would translate and scale a section of sinusoidal curve (like sin from -pi/4 to pi/4 or sin^2 from 0 to pi/4), creating a curve that is smooth at all the join points. (I'd love to get a curve that's also continuous in the second derivative, if there's some easy math I'm missing here; but I doubt that would actually make audible difference.) Any suggestions? Forrest 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 | 2011-03-29 20:42 |
From | Forrest Cahoon |
Subject | [Csnd] Re: Envelope with sinusoidal sections? |
Of course I meant pi/2 wherever I said pi/4. Or, if you prefer, 90 degrees. On Tue, Mar 29, 2011 at 2:11 PM, Forrest Cahoon |
Date | 2011-03-29 20:58 |
From | Stéphane Rollandin |
Subject | Re: [Csnd] Envelope with sinusoidal sections? |
You can do this from the envelope editor in Surmulot; it will be eventually exported as a linseg, with arbitrary precision. Surmulot is this: http://www.zogotounga.net/surmulot/surmulot.html Stef 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 | 2011-03-29 20:59 |
From | Stéphane Rollandin |
Subject | Re: [Csnd] Envelope with sinusoidal sections? |
... forgot this link: http://www.zogotounga.net/surmulot/doc/Envelope-editor.html#Envelope-editor best, Stef 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 | 2011-03-29 21:18 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Envelope with sinusoidal sections? |
tabdes > I'd like to have an envelope that would be like linseg, except that > instead of line segments between the sections it would translate and > scale a section of sinusoidal curve (like sin from -pi/4 to pi/4 or > sin^2 from 0 to pi/4), creating a curve that is smooth at all the join > points. > > (I'd love to get a curve that's also continuous in the second > derivative, if there's some easy math I'm missing here; but I doubt > that would actually make audible difference.) > > Any suggestions? > > Forrest > > > 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 | 2011-03-29 21:29 |
From | Justin Glenn Smith |
Subject | Re: [Csnd] Envelope with sinusoidal sections? |
To get literally what you are describing, you could do something like this: ifn ftgenonce 0, 0, 8192, 10, 1 kenv1idx line 0, p3, 8192*(1/4) kenv1 table3 kenv1idx+8192*(7/8), ifn, 0, 1 kenv2idx line 0, p3, 8192*(1/8) kenv2raw table3 kenv2idx, ifn kenv2 = kenv2raw^2 Forrest Cahoon wrote: > I'd like to have an envelope that would be like linseg, except that > instead of line segments between the sections it would translate and > scale a section of sinusoidal curve (like sin from -pi/4 to pi/4 or > sin^2 from 0 to pi/4), creating a curve that is smooth at all the join > points. > > (I'd love to get a curve that's also continuous in the second > derivative, if there's some easy math I'm missing here; but I doubt > that would actually make audible difference.) > > Any suggestions? > > Forrest > > > 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 | 2011-03-29 21:37 |
From | Justin Glenn Smith |
Subject | Re: [Csnd] Envelope with sinusoidal sections? |
Rereading, I think i misunderstood your question. Gen 8 creates interpolated splines of breakpoint functions, like a curved version of linseg. I think this will get close to what you want. ifn ftgenonce 0, 0, 8192, 8, 0, (8192/3), .7, (8192/6), 1, (8192/6), .7, (8192/3), 0 kenvidx line 0, p3, 8191 kenv table3 kenvidx, ifn of course the envelope you want probably has more than 5 breakpoints etc. Justin Glenn Smith wrote: > To get literally what you are describing, you could do something like this: > > ifn ftgenonce 0, 0, 8192, 10, 1 > kenv1idx line 0, p3, 8192*(1/4) > kenv1 table3 kenv1idx+8192*(7/8), ifn, 0, 1 > kenv2idx line 0, p3, 8192*(1/8) > kenv2raw table3 kenv2idx, ifn > kenv2 = kenv2raw^2 > > > > Forrest Cahoon wrote: >> I'd like to have an envelope that would be like linseg, except that >> instead of line segments between the sections it would translate and >> scale a section of sinusoidal curve (like sin from -pi/4 to pi/4 or >> sin^2 from 0 to pi/4), creating a curve that is smooth at all the join >> points. >> >> (I'd love to get a curve that's also continuous in the second >> derivative, if there's some easy math I'm missing here; but I doubt >> that would actually make audible difference.) >> >> Any suggestions? >> >> Forrest >> >> >> 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 | 2011-03-29 23:43 |
From | luis jure |
Subject | [Csnd] spline envelope (was: Envelope with sinusoidal sections?) |
BTW, would it be possible to implement an envelope opcode corresponding to GEN08? i mean, now we have: GEN05 -> expseg GEN07 -> linseg GEN16 -> transeg i for one would love to see something like "splineseg" or whatever other name you find appropriate. best, lj 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 | 2011-03-30 07:19 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] spline envelope (was: Envelope with sinusoidal sections?) |
Yes, maybe it could be implemented as a version of transeg where each (specified) segment gets divided in two subsegments (internally in the opcode). Each subsegment would then have the appropriate convex/concave shape (+ shape for half the segment, and - shape for the other half). The opcode could then have a "shape" argument, like transeg. This can also be done in Csound code with existing opcodes. best Oeyvind 2011/3/30 luis jure |
Date | 2011-03-30 13:51 |
From | luis jure |
Subject | Re: [Csnd] spline envelope (was: Envelope with sinusoidal |
on 2011-03-30 at 08:19 Oeyvind Brandtsegg wrote: >Yes, maybe it could be implemented as a version of transeg where each >(specified) segment gets divided in two subsegments (internally in the >opcode). Each subsegment would then have the appropriate >convex/concave shape (+ shape for half the segment, and - shape for >the other half). The opcode could then have a "shape" argument, like >transeg. >This can also be done in Csound code with existing opcodes. yes, i do by hand something like you describe using transeg. not very practical, and i don't think the result is a real spline, is it? it just occurred to me that, since part of the code is ready in GEN08, it might not be very difficult to implement the corresponding ocpode. best, lj 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 | 2011-03-30 16:58 |
From | Justin Smith |
Subject | Re: [Csnd] spline envelope (was: Envelope with sinusoidal |
Attachments | gen-08-UDO.csd |
attached is a csd with UDOs for splinsegk and splinsega, which use the same arguments as linseg (as demonstrated in the csd)
|
Date | 2011-03-30 20:22 |
From | Justin Glenn Smith |
Subject | Re: [Csnd] spline envelope |
Attachments | splinseg.csd |
update to my prior, I sent the wrong version before luis jure wrote: > on 2011-03-30 at 08:19 Oeyvind Brandtsegg wrote: > >> Yes, maybe it could be implemented as a version of transeg where each >> (specified) segment gets divided in two subsegments (internally in the >> opcode). Each subsegment would then have the appropriate >> convex/concave shape (+ shape for half the segment, and - shape for >> the other half). The opcode could then have a "shape" argument, like >> transeg. >> This can also be done in Csound code with existing opcodes. > > yes, i do by hand something like you describe using transeg. not very > practical, and i don't think the result is a real spline, is it? > > it just occurred to me that, since part of the code is ready in GEN08, it > might not be very difficult to implement the corresponding ocpode. > > > best, > > lj > > > 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" |