Csound Csound-dev Csound-tekno Search About

[Csnd] envelop clicks with sr=96000 Hz

Date2007-11-14 23:27
Frompeiman
Subject[Csnd] envelop clicks with sr=96000 Hz
Hello, 

Apologies for the double post, can't be sure if the last one was sent
properly. I keep getting messages saying that the message is still pending I
have just renewed my acount so it should hopefully work now! 

I am using a single sine oscillator with it's envelop controlled by a second
oscillator. At a sample rate of 44100  everything runs fine, but when the
rate is changed to 96000 then I get clicks at the end of most notes (and
it's not a real-time performance issue since it's the same with render to
file).   


Bellow is the csd. I would very much appreciate any suggestions to unveil
the mystery :-) 

Many Thanks in advance 

Peiman 


 

 
sr=96000 
ksmps=1 
nchnls=2 


        instr 1 ;Sine 
kamp = 1000 
kfreq = 261.6 

aenv oscili 1, .5/p3, 1 
ares oscili kamp, kfreq, 1 

outs ares*aenv, ares*aenv 
        endin 


 

 

f 1 0 1048576 10 1 




i1 0.28125 2 
i1 2.28125 2 
i1 4.28125 2 
i1 5.28125 2 
e 

 



-- 
View this message in context: http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13758786
Sent from the Csound - General mailing list archive at Nabble.com.


Date2007-11-15 11:37
Frompeiman
Subject[Csnd] Re: envelop clicks with sr=96000 Hz
Thanks Tim :-)

ciao!
p

peiman wrote:
> 
> Hello, 
> 
> Apologies for the double post, can't be sure if the last one was sent
> properly. I keep getting messages saying that the message is still pending
> I have just renewed my acount so it should hopefully work now! 
> 
> I am using a single sine oscillator with it's envelop controlled by a
> second oscillator. At a sample rate of 44100  everything runs fine, but
> when the rate is changed to 96000 then I get clicks at the end of most
> notes (and it's not a real-time performance issue since it's the same with
> render to file).   
> 
> 
> Bellow is the csd. I would very much appreciate any suggestions to unveil
> the mystery :-) 
> 
> Many Thanks in advance 
> 
> Peiman 
> 
> 
>  
> 
>  
> sr=96000 
> ksmps=1 
> nchnls=2 
> 
> 
>         instr 1 ;Sine 
> kamp = 1000 
> kfreq = 261.6 
> 
> aenv oscili 1, .5/p3, 1 
> ares oscili kamp, kfreq, 1 
> 
> outs ares*aenv, ares*aenv 
>         endin 
> 
> 
>  
> 
>  
> 
> f 1 0 1048576 10 1 
> 
> 
> 
> 
> i1 0.28125 2 
> i1 2.28125 2 
> i1 4.28125 2 
> i1 5.28125 2 
> e 
> 
>  
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13765794
Sent from the Csound - General mailing list archive at Nabble.com.


Date2007-11-20 01:15
Fromjoachim heintz
Subject[Csnd] Re: envelop clicks with sr=96000 Hz
Attachmentsclick1a.csd  click1b.csd  click2a.csd  click2b.csd  click3a.csd  click3b.csd  click4a.csd  click4b.csd  click5a.csd  click5b.csd  click6a.csd  click6b.csd  
Hello Peiman -

I checked your example, and found some strange results. Here they  
are, with new questions:

1.
I got the same click as you did, but I think the click is just  
stronger at sr=96000 (click1a.csd) than at sr=44100 (click1b.csd).  
When you render your orc with a full-scale amplitude and just two  
notes with a pause between them, e.g.
i1 0 2
i1 3 2
and you take a look in an audio-editor, you can see the discontiuity  
at the end of the first note. And it's audible, too.

2.
I guess, the click arises, because aenv is not zero at the end of the  
note. So I tried an other way of using a half sine as envelope:
f 2 0 65536 9 .5 1 0
Going through this table with oscili and 1/p3:
aenv 	oscili 	1, 1/p3, 2
gives the following values for aenv at sr=96000 (click2a.csd):
  i   1 time     0.00001:     0.00000
  i   1 time     1.00000:     0.99998
  i   1 time     2.00000:     0.01373
The same instr at sr=44100 (click2b.csd) gives:
  i   1 time     0.00002:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00363
So this is obviously more exact at sr=44100 than at sr=96000!

3.
I tried reading the table with tablei instead of oscili and 1/p3 as  
frequency:
itablen	tableng	2
aindx	linseg	0, p3, itablen-1; from 0 to 65535 as indices
aenv	tablei	aindx, 2
Results:
At sr=96000 (click3a.csd):
  i   1 time     0.00001:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00531
At sr=44100 (click3b.csd):
  i   1 time     0.00002:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00265
So again the table is more exactly read at the lower sample rate!

4.
But why isn't the table read correctly? Why isn't the last value of  
aenv zero? I tried
aindx	linseg	0, p3, itablen instead of
aindx	linseg	0, p3, itablen-1 (though this should be correct, because  
the last index ist itablen-1?!). Results:
At sr=96000 (click4a.csd):
  i   1 time     0.00001:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00531
At sr=44100 (click4b.csd):
  i   1 time     0.00002:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00265
So these are exactly the same results as in 3, though I am going to  
65536 as the last index instead of 65535.

5.
When I continue increasing the index, I get at
aindx	linseg	0, p3, itablen+50 (i.e. going to 50 indices more than  
the table has!)
and at sr=96000 (click5a.csd):
  i   1 time     0.00001:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00488
At sr=44100 (click5b.csd):
  i   1 time     0.00002:     0.00000
  i   1 time     1.00000:     1.00000
  i   1 time     2.00000:     0.00029
When I go to itablen+100, finally the values of aenv are zero at time  
2.00000.

So my questions are:
1. Why leads sr=96000 in all the examples to worse results than  
sr=44100?
2. Why gives reading the table with oscili and 1/p3 as frequency so  
inexact results (click2a/b)?
3. Why is reading the table not exact in this way (click3a/b):
itablen	tableng	2
aindx	linseg	0, p3, itablen-1
aenv	tablei	aindx, 2
But seems to be correct in this way (click6a/b):
itablen	tableng	2
aindx	linseg	0, p3, itablen+100
aenv	tablei	aindx, 2
?

Best -

	joachim











Am 15.11.2007 um 00:27 schrieb peiman:

>
> Hello,
>
> Apologies for the double post, can't be sure if the last one was sent
> properly. I keep getting messages saying that the message is still  
> pending I
> have just renewed my acount so it should hopefully work now!
>
> I am using a single sine oscillator with it's envelop controlled by  
> a second
> oscillator. At a sample rate of 44100  everything runs fine, but  
> when the
> rate is changed to 96000 then I get clicks at the end of most notes  
> (and
> it's not a real-time performance issue since it's the same with  
> render to
> file).
>
>
> Bellow is the csd. I would very much appreciate any suggestions to  
> unveil
> the mystery :-)
>
> Many Thanks in advance
>
> Peiman
>
>
> 
>
> 
> sr=96000
> ksmps=1
> nchnls=2
>
>
>         instr 1 ;Sine
> kamp = 1000
> kfreq = 261.6
>
> aenv oscili 1, .5/p3, 1
> ares oscili kamp, kfreq, 1
>
> outs ares*aenv, ares*aenv
>         endin
>
>
> 
>
> 
>
> f 1 0 1048576 10 1
>
>
>
>
> i1 0.28125 2
> i1 2.28125 2
> i1 4.28125 2
> i1 5.28125 2
> e
>
> 
>
> 
>
> -- 
> View this message in context: http://www.nabble.com/envelop-clicks- 
> with-sr%3D96000-Hz-tf4808715.html#a13758786
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"


Date2007-11-20 01:43
Frompeiman
Subject[Csnd] Re: envelop clicks with sr=96000 Hz
Hi Joachim,

Thanks very much for testing this, and the thorough report. It seems very
strange indeed. One thing I found also was that if the table is read at
k-rate (instead of a-rate) then the clicks disappear, depending on the krate
of course (the lower the better it seems!!). So I can confirm that the 96000
Hz is certainly the issue here.  

I am absolutely baffled, more so because it's such a basic thing: how can it
be that no one else has encountered these problems before? I guess 96000 Hz
is not such a common sampling rate.

It would be great if someone could please take a look at this (I don't know
about deep DSP or programing!). 

Thanks very much
Peiman

 

   




joachim heintz wrote:
> 
> Hello Peiman -
> 
> I checked your example, and found some strange results. Here they  
> are, with new questions:
> 
> 1.
> I got the same click as you did, but I think the click is just  
> stronger at sr=96000 (click1a.csd) than at sr=44100 (click1b.csd).  
> When you render your orc with a full-scale amplitude and just two  
> notes with a pause between them, e.g.
> i1 0 2
> i1 3 2
> and you take a look in an audio-editor, you can see the discontiuity  
> at the end of the first note. And it's audible, too.
> 
> 2.
> I guess, the click arises, because aenv is not zero at the end of the  
> note. So I tried an other way of using a half sine as envelope:
> f 2 0 65536 9 .5 1 0
> Going through this table with oscili and 1/p3:
> aenv 	oscili 	1, 1/p3, 2
> gives the following values for aenv at sr=96000 (click2a.csd):
>   i   1 time     0.00001:     0.00000
>   i   1 time     1.00000:     0.99998
>   i   1 time     2.00000:     0.01373
> The same instr at sr=44100 (click2b.csd) gives:
>   i   1 time     0.00002:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00363
> So this is obviously more exact at sr=44100 than at sr=96000!
> 
> 3.
> I tried reading the table with tablei instead of oscili and 1/p3 as  
> frequency:
> itablen	tableng	2
> aindx	linseg	0, p3, itablen-1; from 0 to 65535 as indices
> aenv	tablei	aindx, 2
> Results:
> At sr=96000 (click3a.csd):
>   i   1 time     0.00001:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00531
> At sr=44100 (click3b.csd):
>   i   1 time     0.00002:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00265
> So again the table is more exactly read at the lower sample rate!
> 
> 4.
> But why isn't the table read correctly? Why isn't the last value of  
> aenv zero? I tried
> aindx	linseg	0, p3, itablen instead of
> aindx	linseg	0, p3, itablen-1 (though this should be correct, because  
> the last index ist itablen-1?!). Results:
> At sr=96000 (click4a.csd):
>   i   1 time     0.00001:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00531
> At sr=44100 (click4b.csd):
>   i   1 time     0.00002:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00265
> So these are exactly the same results as in 3, though I am going to  
> 65536 as the last index instead of 65535.
> 
> 5.
> When I continue increasing the index, I get at
> aindx	linseg	0, p3, itablen+50 (i.e. going to 50 indices more than  
> the table has!)
> and at sr=96000 (click5a.csd):
>   i   1 time     0.00001:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00488
> At sr=44100 (click5b.csd):
>   i   1 time     0.00002:     0.00000
>   i   1 time     1.00000:     1.00000
>   i   1 time     2.00000:     0.00029
> When I go to itablen+100, finally the values of aenv are zero at time  
> 2.00000.
> 
> So my questions are:
> 1. Why leads sr=96000 in all the examples to worse results than  
> sr=44100?
> 2. Why gives reading the table with oscili and 1/p3 as frequency so  
> inexact results (click2a/b)?
> 3. Why is reading the table not exact in this way (click3a/b):
> itablen	tableng	2
> aindx	linseg	0, p3, itablen-1
> aenv	tablei	aindx, 2
> But seems to be correct in this way (click6a/b):
> itablen	tableng	2
> aindx	linseg	0, p3, itablen+100
> aenv	tablei	aindx, 2
> ?
> 
> Best -
> 
> 	joachim
> 
> 
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
> 
> 
> 
> 
> 
> 
> Am 15.11.2007 um 00:27 schrieb peiman:
> 
>>
>> Hello,
>>
>> Apologies for the double post, can't be sure if the last one was sent
>> properly. I keep getting messages saying that the message is still  
>> pending I
>> have just renewed my acount so it should hopefully work now!
>>
>> I am using a single sine oscillator with it's envelop controlled by  
>> a second
>> oscillator. At a sample rate of 44100  everything runs fine, but  
>> when the
>> rate is changed to 96000 then I get clicks at the end of most notes  
>> (and
>> it's not a real-time performance issue since it's the same with  
>> render to
>> file).
>>
>>
>> Bellow is the csd. I would very much appreciate any suggestions to  
>> unveil
>> the mystery :-)
>>
>> Many Thanks in advance
>>
>> Peiman
>>
>>
>> 
>>
>> 
>> sr=96000
>> ksmps=1
>> nchnls=2
>>
>>
>>         instr 1 ;Sine
>> kamp = 1000
>> kfreq = 261.6
>>
>> aenv oscili 1, .5/p3, 1
>> ares oscili kamp, kfreq, 1
>>
>> outs ares*aenv, ares*aenv
>>         endin
>>
>>
>> 
>>
>> 
>>
>> f 1 0 1048576 10 1
>>
>>
>>
>>
>> i1 0.28125 2
>> i1 2.28125 2
>> i1 4.28125 2
>> i1 5.28125 2
>> e
>>
>> 
>>
>> 
>>
>> -- 
>> View this message in context: http://www.nabble.com/envelop-clicks- 
>> with-sr%3D96000-Hz-tf4808715.html#a13758786
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13849365
Sent from the Csound - General mailing list archive at Nabble.com.


Date2007-11-20 01:57
FromAdam
Subject[Csnd] Re: Re: envelop clicks with sr=96000 Hz
AttachmentsNone  

Date2007-11-20 02:46
FromPeiman Khosravi
Subject[Csnd] Re: Re: Re: envelop clicks with sr=96000 Hz
Hi Adam,

I think I tried that. But I'll give it another go in the morning and  
post the result.

Thanks
Peiman

On 20 Nov 2007, at 01:57, Adam wrote:

>
> It could be you need a power-of-2-plus-1  for your ftable,
> when you use the interpolating oscili
>
> See ftable in the manual. Sorry I haven't got the exact url.
>
>>>> 
>>>>
>>>> 
>>>> sr=96000
>>>> ksmps=1
>>>> nchnls=2
>>>>
>>>>
>>>>         instr 1 ;Sine
>>>> kamp = 1000
>>>> kfreq = 261.6
>>>>
>>>> aenv oscili 1, .5/p3, 1
>>>> ares oscili kamp, kfreq, 1
>                    ^^^
>>>>
>>>> outs ares*aenv, ares*aenv
>>>>         endin
>>>>
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>> f 1 0 1048576 10 1
>                       ^^^
>
>>>>
>>>>
>>>>
>>>>
>>>> i1 0.28125 2
>>>> i1 2.28125 2
>>>> i1 4.28125 2
>>>> i1 5.28125 2
>>>> e
>>>>
>>>> 
>>>>
>>>> 
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"


Date2007-11-20 12:32
Frompeiman
Subject[Csnd] Re: Re: envelop clicks with sr=96000 Hz
As I suspected, power of 2 + 1 doesn't make any difference at all. But for
some reason using poscil3 instead of oscil or oscili gets rid of the clicks.
I know that poscil3 is supposed to be high precision but why do oscil and
oscili work at 44100 and not 96000? If this is normal behavior and only
poscil3 is precise enough to generate a reliable envelope at higher sample
rate then shouldn't this be mentioned in the document?   

Best
Peiman 
 

Adam Chennells wrote:
> 
> 
> It could be you need a power-of-2-plus-1  for your ftable, 
> when you use the interpolating oscili
> 
> See ftable in the manual. Sorry I haven't got the exact url. 
> 
>> >> 
>> >>
>> >> 
>> >> sr=96000
>> >> ksmps=1
>> >> nchnls=2
>> >>
>> >>
>> >>         instr 1 ;Sine
>> >> kamp = 1000
>> >> kfreq = 261.6
>> >>
>> >> aenv oscili 1, .5/p3, 1
>> >> ares oscili kamp, kfreq, 1
>                    ^^^
>> >>
>> >> outs ares*aenv, ares*aenv
>> >>         endin
>> >>
>> >>
>> >> 
>> >>
>> >> 
>> >>
>> >> f 1 0 1048576 10 1
>                       ^^^
> 
>> >>
>> >>
>> >>
>> >>
>> >> i1 0.28125 2
>> >> i1 2.28125 2
>> >> i1 4.28125 2
>> >> i1 5.28125 2
>> >> e
>> >>
>> >> 
>> >>
>> >> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 
> 

-- 
View this message in context: http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13856168
Sent from the Csound - General mailing list archive at Nabble.com.


Date2007-11-20 14:50
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: envelop clicks with sr=96000 Hz
The difference between poscil and oscil(i) is simple: Oscil et all use integer
math to keep track of the table index increment; large tables will reduce 
the precision
in the increment integration and off the top of my head I think so does the 
SR.
But poscil uses double-precision floating point maths and its precision is 
always
that of a double (about 13-4 digits), no matter what size the table is.

Victor


At 12:32 20/11/2007, you wrote:

>As I suspected, power of 2 + 1 doesn't make any difference at all. But for
>some reason using poscil3 instead of oscil or oscili gets rid of the clicks.
>I know that poscil3 is supposed to be high precision but why do oscil and
>oscili work at 44100 and not 96000? If this is normal behavior and only
>poscil3 is precise enough to generate a reliable envelope at higher sample
>rate then shouldn't this be mentioned in the document?
>
>Best
>Peiman
>
>
>Adam Chennells wrote:
> >
> >
> > It could be you need a power-of-2-plus-1  for your ftable,
> > when you use the interpolating oscili
> >
> > See ftable in the manual. Sorry I haven't got the exact url.
> >
> >> >> 
> >> >>
> >> >> 
> >> >> sr=96000
> >> >> ksmps=1
> >> >> nchnls=2
> >> >>
> >> >>
> >> >>         instr 1 ;Sine
> >> >> kamp = 1000
> >> >> kfreq = 261.6
> >> >>
> >> >> aenv oscili 1, .5/p3, 1
> >> >> ares oscili kamp, kfreq, 1
> >                    ^^^
> >> >>
> >> >> outs ares*aenv, ares*aenv
> >> >>         endin
> >> >>
> >> >>
> >> >> 
> >> >>
> >> >> 
> >> >>
> >> >> f 1 0 1048576 10 1
> >                       ^^^
> >
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> i1 0.28125 2
> >> >> i1 2.28125 2
> >> >> i1 4.28125 2
> >> >> i1 5.28125 2
> >> >> e
> >> >>
> >> >> 
> >> >>
> >> >> 
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> > csound"
> >
> >
>
>--
>View this message in context: 
>http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13856168
>Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
>Send bugs reports to this list.
>To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>csound"

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


Date2007-11-20 15:12
Fromjoachim heintz
Subject[Csnd] Re: Re: Re: Re: envelop clicks with sr=96000 Hz
Thanks, Victor - that's the solution. I checked my "cklick2a.csd"  
with poscil instead of oscili, and it's exact now (no click and  
correct value of aenv). I thought that the difference you are  
describing was the difference between oscil and oscili. It's very  
good to know the qualities of poscil(3) now, and the problems of oscili.
Perhaps there could be a hint in the manual page of oscili, and under  
"see also" a link to poscil and poscil3, too?

	joachim



Am 20.11.2007 um 15:50 schrieb Victor Lazzarini:

> The difference between poscil and oscil(i) is simple: Oscil et all  
> use integer
> math to keep track of the table index increment; large tables will  
> reduce the precision
> in the increment integration and off the top of my head I think so  
> does the SR.
> But poscil uses double-precision floating point maths and its  
> precision is always
> that of a double (about 13-4 digits), no matter what size the table  
> is.
>
> Victor
>
>
> At 12:32 20/11/2007, you wrote:
>
>> As I suspected, power of 2 + 1 doesn't make any difference at all.  
>> But for
>> some reason using poscil3 instead of oscil or oscili gets rid of  
>> the clicks.
>> I know that poscil3 is supposed to be high precision but why do  
>> oscil and
>> oscili work at 44100 and not 96000? If this is normal behavior and  
>> only
>> poscil3 is precise enough to generate a reliable envelope at  
>> higher sample
>> rate then shouldn't this be mentioned in the document?
>>
>> Best
>> Peiman
>>
>>
>> Adam Chennells wrote:
>> >
>> >
>> > It could be you need a power-of-2-plus-1  for your ftable,
>> > when you use the interpolating oscili
>> >
>> > See ftable in the manual. Sorry I haven't got the exact url.
>> >
>> >> >> 
>> >> >>
>> >> >> 
>> >> >> sr=96000
>> >> >> ksmps=1
>> >> >> nchnls=2
>> >> >>
>> >> >>
>> >> >>         instr 1 ;Sine
>> >> >> kamp = 1000
>> >> >> kfreq = 261.6
>> >> >>
>> >> >> aenv oscili 1, .5/p3, 1
>> >> >> ares oscili kamp, kfreq, 1
>> >                    ^^^
>> >> >>
>> >> >> outs ares*aenv, ares*aenv
>> >> >>         endin
>> >> >>
>> >> >>
>> >> >> 
>> >> >>
>> >> >> 
>> >> >>
>> >> >> f 1 0 1048576 10 1
>> >                       ^^^
>> >
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> i1 0.28125 2
>> >> >> i1 2.28125 2
>> >> >> i1 4.28125 2
>> >> >> i1 5.28125 2
>> >> >> e
>> >> >>
>> >> >> 
>> >> >>
>> >> >> 
>> >
>> >
>> > Send bugs reports to this list.
>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> > csound"
>> >
>> >
>>
>> --
>> View this message in context: http://www.nabble.com/envelop-clicks- 
>> with-sr%3D96000-Hz-tf4808715.html#a13856168
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"


Date2007-11-20 15:21
Frompeiman
Subject[Csnd] Re: Re: Re: Re: envelop clicks with sr=96000 Hz
Yes... Also my thanks Victor for the hint. 

Best
Peiman


joachim heintz wrote:
> 
> Thanks, Victor - that's the solution. I checked my "cklick2a.csd"  
> with poscil instead of oscili, and it's exact now (no click and  
> correct value of aenv). I thought that the difference you are  
> describing was the difference between oscil and oscili. It's very  
> good to know the qualities of poscil(3) now, and the problems of oscili.
> Perhaps there could be a hint in the manual page of oscili, and under  
> "see also" a link to poscil and poscil3, too?
> 
> 	joachim
> 
> 
> 
> Am 20.11.2007 um 15:50 schrieb Victor Lazzarini:
> 
>> The difference between poscil and oscil(i) is simple: Oscil et all  
>> use integer
>> math to keep track of the table index increment; large tables will  
>> reduce the precision
>> in the increment integration and off the top of my head I think so  
>> does the SR.
>> But poscil uses double-precision floating point maths and its  
>> precision is always
>> that of a double (about 13-4 digits), no matter what size the table  
>> is.
>>
>> Victor
>>
>>
>> At 12:32 20/11/2007, you wrote:
>>
>>> As I suspected, power of 2 + 1 doesn't make any difference at all.  
>>> But for
>>> some reason using poscil3 instead of oscil or oscili gets rid of  
>>> the clicks.
>>> I know that poscil3 is supposed to be high precision but why do  
>>> oscil and
>>> oscili work at 44100 and not 96000? If this is normal behavior and  
>>> only
>>> poscil3 is precise enough to generate a reliable envelope at  
>>> higher sample
>>> rate then shouldn't this be mentioned in the document?
>>>
>>> Best
>>> Peiman
>>>
>>>
>>> Adam Chennells wrote:
>>> >
>>> >
>>> > It could be you need a power-of-2-plus-1  for your ftable,
>>> > when you use the interpolating oscili
>>> >
>>> > See ftable in the manual. Sorry I haven't got the exact url.
>>> >
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >> >> sr=96000
>>> >> >> ksmps=1
>>> >> >> nchnls=2
>>> >> >>
>>> >> >>
>>> >> >>         instr 1 ;Sine
>>> >> >> kamp = 1000
>>> >> >> kfreq = 261.6
>>> >> >>
>>> >> >> aenv oscili 1, .5/p3, 1
>>> >> >> ares oscili kamp, kfreq, 1
>>> >                    ^^^
>>> >> >>
>>> >> >> outs ares*aenv, ares*aenv
>>> >> >>         endin
>>> >> >>
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> f 1 0 1048576 10 1
>>> >                       ^^^
>>> >
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> i1 0.28125 2
>>> >> >> i1 2.28125 2
>>> >> >> i1 4.28125 2
>>> >> >> i1 5.28125 2
>>> >> >> e
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >
>>> >
>>> > Send bugs reports to this list.
>>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> > csound"
>>> >
>>> >
>>>
>>> --
>>> View this message in context: http://www.nabble.com/envelop-clicks- 
>>> with-sr%3D96000-Hz-tf4808715.html#a13856168
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe csound"
>>
>> Victor Lazzarini
>> Music Technology Laboratory
>> Music Department
>> National University of Ireland, Maynooth
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 
> 

-- 
View this message in context: http://www.nabble.com/envelop-clicks-with-sr%3D96000-Hz-tf4808715.html#a13858911
Sent from the Csound - General mailing list archive at Nabble.com.


Date2007-11-20 15:28
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Re: envelop clicks with sr=96000 Hz
Comparing the two on a waveform editor, it looks like the envelope
period of the oscili version is slightly longer than 1/2 cycle in p3 secs,
so it clicks, because the envelope does not reach 0. This agrees with
the fact that the freq precision is lost with long tables (and higher sr).

Victor


At 15:12 20/11/2007, you wrote:
>Thanks, Victor - that's the solution. I checked my "cklick2a.csd"
>with poscil instead of oscili, and it's exact now (no click and
>correct value of aenv). I thought that the difference you are
>describing was the difference between oscil and oscili. It's very
>good to know the qualities of poscil(3) now, and the problems of oscili.
>Perhaps there could be a hint in the manual page of oscili, and under
>"see also" a link to poscil and poscil3, too?
>
>         joachim
>
>
>
>Am 20.11.2007 um 15:50 schrieb Victor Lazzarini:
>
>>The difference between poscil and oscil(i) is simple: Oscil et all
>>use integer
>>math to keep track of the table index increment; large tables will
>>reduce the precision
>>in the increment integration and off the top of my head I think so
>>does the SR.
>>But poscil uses double-precision floating point maths and its
>>precision is always
>>that of a double (about 13-4 digits), no matter what size the table
>>is.
>>
>>Victor
>>
>>
>>At 12:32 20/11/2007, you wrote:
>>
>>>As I suspected, power of 2 + 1 doesn't make any difference at all.
>>>But for
>>>some reason using poscil3 instead of oscil or oscili gets rid of
>>>the clicks.
>>>I know that poscil3 is supposed to be high precision but why do
>>>oscil and
>>>oscili work at 44100 and not 96000? If this is normal behavior and
>>>only
>>>poscil3 is precise enough to generate a reliable envelope at
>>>higher sample
>>>rate then shouldn't this be mentioned in the document?
>>>
>>>Best
>>>Peiman
>>>
>>>
>>>Adam Chennells wrote:
>>> >
>>> >
>>> > It could be you need a power-of-2-plus-1  for your ftable,
>>> > when you use the interpolating oscili
>>> >
>>> > See ftable in the manual. Sorry I haven't got the exact url.
>>> >
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >> >> sr=96000
>>> >> >> ksmps=1
>>> >> >> nchnls=2
>>> >> >>
>>> >> >>
>>> >> >>         instr 1 ;Sine
>>> >> >> kamp = 1000
>>> >> >> kfreq = 261.6
>>> >> >>
>>> >> >> aenv oscili 1, .5/p3, 1
>>> >> >> ares oscili kamp, kfreq, 1
>>> >                    ^^^
>>> >> >>
>>> >> >> outs ares*aenv, ares*aenv
>>> >> >>         endin
>>> >> >>
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> f 1 0 1048576 10 1
>>> >                       ^^^
>>> >
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> i1 0.28125 2
>>> >> >> i1 2.28125 2
>>> >> >> i1 4.28125 2
>>> >> >> i1 5.28125 2
>>> >> >> e
>>> >> >>
>>> >> >> 
>>> >> >>
>>> >> >> 
>>> >
>>> >
>>> > Send bugs reports to this list.
>>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>"unsubscribe
>>> > csound"
>>> >
>>> >
>>>
>>>--
>>>View this message in context: http://www.nabble.com/envelop-clicks- 
>>>with-sr%3D96000-Hz-tf4808715.html#a13856168
>>>Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>>
>>>Send bugs reports to this list.
>>>To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>"unsubscribe csound"
>>
>>Victor Lazzarini
>>Music Technology Laboratory
>>Music Department
>>National University of Ireland, Maynooth
>>
>>
>>
>>Send bugs reports to this list.
>>To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>"unsubscribe csound"
>
>
>
>Send bugs reports to this list.
>To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>csound"

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth