Csound Csound-dev Csound-tekno Search About

[Csnd] squared envelopes

Date2012-06-19 19:35
FromStefan Thomas
Subject[Csnd] squared envelopes
Dear community,
I have a question about squaring envelopes (I found something similar in the book "cooing with csound").
There's written:
                
amp1    linseg  0, .001, 0, .03, 1, p3 - .061, .9, .03, 0, 1, 0    ; amplitude envelopes
amp2    =       amp1 * amp1
Does this  mean, that amplitude values will be squared (1^2, 0.9^2, ) or does this mean also the durations between the segments?
And I would also like to ask a question about the last 5 p-fields of the linseg:
.9, .03, 0, 1, 0  
Does this mean 0.03 seconds to zero and then remaining 1 second to this value?
I don't see the sense in this section!

Date2012-06-19 22:00
FromDeepak
SubjectRe: [Csnd] squared envelopes
since this is happening at a-rate, I would assume that it is only the amplitude which is getting squared...the first line of code would be executed "sr" number of times in a second, and the second line of code would take the output of the first line and just square it....

during the remaining 1 second stay at 0. or else..I think it become more sensible if one is using loopsegs (for eg:)

community, please correct me if I am wrong!!

Thanks
Deepak.


On Tue, Jun 19, 2012 at 2:35 PM, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear community,
I have a question about squaring envelopes (I found something similar in the book "cooing with csound").
There's written:
                
amp1    linseg  0, .001, 0, .03, 1, p3 - .061, .9, .03, 0, 1, 0    ; amplitude envelopes
amp2    =       amp1 * amp1
Does this  mean, that amplitude values will be squared (1^2, 0.9^2, ) or does this mean also the durations between the segments?
And I would also like to ask a question about the last 5 p-fields of the linseg:
.9, .03, 0, 1, 0  
Does this mean 0.03 seconds to zero and then remaining 1 second to this value?
I don't see the sense in this section!



--
www.myspace.com/dcompanymusic
www.myspace.com/thewoodshedmusicians

Date2012-06-20 07:06
FromOeyvind Brandtsegg
SubjectRe: [Csnd] squared envelopes
All good, that is correct,
(and the durations would not get squared in any case).
The last segment is probably a safety measure from old times,
as the line segment generators used to continue in the same direction
if not explicitly clamped to a value (like it is done with the last
segment here).
This behaviour has been fixed (some years ago), so it is no longer
necessary to use that last segment (but I admit I oftentimes still do
it like that).
Oeyvind

2012/6/19 Deepak :
> since this is happening at a-rate, I would assume that it is only the
> amplitude which is getting squared...the first line of code would be
> executed "sr" number of times in a second, and the second line of code would
> take the output of the first line and just square it....
>
> during the remaining 1 second stay at 0. or else..I think it become more
> sensible if one is using loopsegs (for eg:)
>
> community, please correct me if I am wrong!!
>
> Thanks
> Deepak.
>
>
>
> On Tue, Jun 19, 2012 at 2:35 PM, Stefan Thomas
>  wrote:
>>
>> Dear community,
>> I have a question about squaring envelopes (I found something similar in
>> the book "cooing with csound").
>> There's written:
>>
>> amp1    linseg  0, .001, 0, .03, 1, p3 - .061, .9, .03, 0, 1, 0    ;
>> amplitude envelopes
>> amp2    =       amp1 * amp1
>> Does this  mean, that amplitude values will be squared (1^2, 0.9^2, ) or
>> does this mean also the durations between the segments?
>> And I would also like to ask a question about the last 5 p-fields of the
>> linseg:
>> .9, .03, 0, 1, 0
>> Does this mean 0.03 seconds to zero and then remaining 1 second to this
>> value?
>> I don't see the sense in this section!
>
>
>
>
> --
> www.myspace.com/dcompanymusic
> www.myspace.com/thewoodshedmusicians



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp