Csound Csound-dev Csound-tekno Search About

[Csnd-dev] transeg delay

Date2016-04-20 14:18
FromOeyvind Brandtsegg
Subject[Csnd-dev] transeg delay
I discovered something with transeg today, about the delay before the
envelope starts.
I'm not sure if it is something about the formula for the envelop that
means it has to be this way, but it would be nice if it could be
avoided.

The thing is:
If I use a nonzero ityp, the whole envelope will be delayed by 1/kr

The following instr can be used to test. Inspect the envelope in a sound editor.
* If itype = 0, the envelope starts after 1/kr (I'm assuming this
delay comes from the upsampling to a-rate?)
* If itype is nonzero, the envelope starts after 2/kr, and also ends
1/kr after its specified end time

instr 1
idur    = 0.1
icurve  = 2
kamp    transeg 0, idur, icurve, 1
out a(kamp)
endin


-- 

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

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-20 15:11
Fromjpff
SubjectRe: [Csnd-dev] transeg delay
O dear1  I an reproduce



kr = 100
nchnls = 2
0dbfs = 1
instr 1
idur    = 0.1
icurve  = 2
kamp    transeg 0, idur, icurve, 1
kk      transeg 0, idur, 0, 1
out a(kamp), a(kk)
endin


i1 0 0.2
e




On Wed, 20 Apr 2016, Oeyvind Brandtsegg wrote:

> I discovered something with transeg today, about the delay before the
> envelope starts.
> I'm not sure if it is something about the formula for the envelop that
> means it has to be this way, but it would be nice if it could be
> avoided.
>
> The thing is:
> If I use a nonzero ityp, the whole envelope will be delayed by 1/kr
>
> The following instr can be used to test. Inspect the envelope in a sound editor.
> * If itype = 0, the envelope starts after 1/kr (I'm assuming this
> delay comes from the upsampling to a-rate?)
> * If itype is nonzero, the envelope starts after 2/kr, and also ends
> 1/kr after its specified end time
>
> instr 1
> idur    = 0.1
> icurve  = 2
> kamp    transeg 0, idur, icurve, 1
> out a(kamp)
> endin
>
>
> -- 
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp

Date2016-04-20 15:32
Fromjpff
SubjectRe: [Csnd-dev] transeg delay
...and it looksOK in a-rate version.

On Wed, 20 Apr 2016, Oeyvind Brandtsegg wrote:

> I discovered something with transeg today, about the delay before the
> envelope starts.
> I'm not sure if it is something about the formula for the envelop that
> means it has to be this way, but it would be nice if it could be
> avoided.
>
> The thing is:
> If I use a nonzero ityp, the whole envelope will be delayed by 1/kr
>
> The following instr can be used to test. Inspect the envelope in a sound editor.
> * If itype = 0, the envelope starts after 1/kr (I'm assuming this
> delay comes from the upsampling to a-rate?)
> * If itype is nonzero, the envelope starts after 2/kr, and also ends
> 1/kr after its specified end time
>
> instr 1
> idur    = 0.1
> icurve  = 2
> kamp    transeg 0, idur, icurve, 1
> out a(kamp)
> endin
>
>
> -- 
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp

Date2016-04-20 15:54
Fromjpff
SubjectRe: [Csnd-dev] transeg delay
itype=0 caseis correct - interpolation causes the apparent delay

itype!=0 case needs tought

On Wed, 20 Apr 2016, jpff wrote:

> ...and it looksOK in a-rate version.
>
> On Wed, 20 Apr 2016, Oeyvind Brandtsegg wrote:
>
>> I discovered something with transeg today, about the delay before the
>> envelope starts.
>> I'm not sure if it is something about the formula for the envelop that
>> means it has to be this way, but it would be nice if it could be
>> avoided.
>> 
>> The thing is:
>> If I use a nonzero ityp, the whole envelope will be delayed by 1/kr
>> 
>> The following instr can be used to test. Inspect the envelope in a sound 
>> editor.
>> * If itype = 0, the envelope starts after 1/kr (I'm assuming this
>> delay comes from the upsampling to a-rate?)
>> * If itype is nonzero, the envelope starts after 2/kr, and also ends
>> 1/kr after its specified end time
>> 
>> instr 1
>> idur    = 0.1
>> icurve  = 2
>> kamp    transeg 0, idur, icurve, 1
>> out a(kamp)
>> endin
>> 
>> 
>> -- 
>> 
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>> 
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp
>> 

Date2016-04-20 20:03
Fromjpff
SubjectRe: [Csnd-dev] transeg delay

Date2016-04-20 20:59
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] transeg delay
Thanks!

2016-04-20 21:03 GMT+02:00 jpff :
> Fixed in git



-- 

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

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/