Csound Csound-dev Csound-tekno Search About

[Csnd] pvsbuffer issue

Date2011-07-07 15:35
Frompeiman khosravi
Subject[Csnd] pvsbuffer issue
Hello,

As the csd below demonstrates there seems to be something fishy going on 
with pvsbuffer. It sounds as if some bins are zeroed out. The result is 
drastically different from a straight resynthesis of the fsig.

Am I doing something wrong?

Thanks

Peiman





-odac -d




sr     = 96000
ksmps  = 100
nchnls = 2
0dbfs  = 1

instr 1

asig1    noise    .2, 0

fsig1   pvsanal   asig1,1024,256,1024,1


ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1

khan = ibuf1

fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer

ar1    pvsynth fsb
ar2    pvsynth fsig1

outs ar1, ar2
endin





i1 0 10






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"

Date2011-07-07 15:40
Frompeiman khosravi
Subject[Csnd] Re: pvsbuffer issue
It turns out if ksmps=1 then it sounds fine. Should I file it as a bug? 
That's a real pity, I had great plans for that opcode - my Sunday roast 
is ruined now :-)

Best,
Peiman

On 07/07/2011 15:35, peiman khosravi wrote:
> Hello,
>
> As the csd below demonstrates there seems to be something fishy going 
> on with pvsbuffer. It sounds as if some bins are zeroed out. The 
> result is drastically different from a straight resynthesis of the fsig.
>
> Am I doing something wrong?
>
> Thanks
>
> Peiman
>
>
> 
>
> 
> -odac -d
> 
>
>
> 
> sr     = 96000
> ksmps  = 100
> nchnls = 2
> 0dbfs  = 1
>
> instr 1
>
> asig1    noise    .2, 0
>
> fsig1   pvsanal   asig1,1024,256,1024,1
>
>
> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>
> khan = ibuf1
>
> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>
> ar1    pvsynth fsb
> ar2    pvsynth fsig1
>
> outs ar1, ar2
> endin
>
> 
>
>
> 
> i1 0 10
> 
>
>
> 



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"

Date2011-07-07 15:49
FromSteven Yi
SubjectRe: [Csnd] Re: pvsbuffer issue
Does this work if you wrap it in a UDO and use setksmps 1?

On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
 wrote:
> It turns out if ksmps=1 then it sounds fine. Should I file it as a bug?
> That's a real pity, I had great plans for that opcode - my Sunday roast is
> ruined now :-)
>
> Best,
> Peiman
>
> On 07/07/2011 15:35, peiman khosravi wrote:
>>
>> Hello,
>>
>> As the csd below demonstrates there seems to be something fishy going on
>> with pvsbuffer. It sounds as if some bins are zeroed out. The result is
>> drastically different from a straight resynthesis of the fsig.
>>
>> Am I doing something wrong?
>>
>> Thanks
>>
>> Peiman
>>
>>
>> 
>>
>> 
>> -odac -d
>> 
>>
>>
>> 
>> sr     = 96000
>> ksmps  = 100
>> nchnls = 2
>> 0dbfs  = 1
>>
>> instr 1
>>
>> asig1    noise    .2, 0
>>
>> fsig1   pvsanal   asig1,1024,256,1024,1
>>
>>
>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>
>> khan = ibuf1
>>
>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>
>> ar1    pvsynth fsb
>> ar2    pvsynth fsig1
>>
>> outs ar1, ar2
>> endin
>>
>> 
>>
>>
>> 
>> i1 0 10
>> 
>>
>>
>> 
>
>
>
> 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"


Date2011-07-07 15:57
Frompeiman khosravi
SubjectRe: [Csnd] Re: pvsbuffer issue
Thanks Steven,

Good idea, I will try it in a sec. But is it supposed to behave like this?

Thanks

Peiman

On 07/07/2011 15:49, Steven Yi wrote:
> Does this work if you wrap it in a UDO and use setksmps 1?
>
> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>   wrote:
>> It turns out if ksmps=1 then it sounds fine. Should I file it as a bug?
>> That's a real pity, I had great plans for that opcode - my Sunday roast is
>> ruined now :-)
>>
>> Best,
>> Peiman
>>
>> On 07/07/2011 15:35, peiman khosravi wrote:
>>> Hello,
>>>
>>> As the csd below demonstrates there seems to be something fishy going on
>>> with pvsbuffer. It sounds as if some bins are zeroed out. The result is
>>> drastically different from a straight resynthesis of the fsig.
>>>
>>> Am I doing something wrong?
>>>
>>> Thanks
>>>
>>> Peiman
>>>
>>>
>>> 
>>>
>>> 
>>> -odac -d
>>> 
>>>
>>>
>>> 
>>> sr     = 96000
>>> ksmps  = 100
>>> nchnls = 2
>>> 0dbfs  = 1
>>>
>>> instr 1
>>>
>>> asig1    noise    .2, 0
>>>
>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>
>>>
>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>
>>> khan = ibuf1
>>>
>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>
>>> ar1    pvsynth fsb
>>> ar2    pvsynth fsig1
>>>
>>> outs ar1, ar2
>>> endin
>>>
>>> 
>>>
>>>
>>> 
>>> i1 0 10
>>> 
>>>
>>>
>>> 
>>
>>
>> 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"
>



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"

Date2011-07-07 16:12
Frompeiman khosravi
SubjectRe: [Csnd] Re: pvsbuffer issue
Actually UDO is not an option as the writing and reading into buffer is 
done in two different instruments and you cannot pass fsig to a UDO :-(

Thanks
Peiman

On 07/07/2011 15:49, Steven Yi wrote:
> Does this work if you wrap it in a UDO and use setksmps 1?
>
> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>   wrote:
>> It turns out if ksmps=1 then it sounds fine. Should I file it as a bug?
>> That's a real pity, I had great plans for that opcode - my Sunday roast is
>> ruined now :-)
>>
>> Best,
>> Peiman
>>
>> On 07/07/2011 15:35, peiman khosravi wrote:
>>> Hello,
>>>
>>> As the csd below demonstrates there seems to be something fishy going on
>>> with pvsbuffer. It sounds as if some bins are zeroed out. The result is
>>> drastically different from a straight resynthesis of the fsig.
>>>
>>> Am I doing something wrong?
>>>
>>> Thanks
>>>
>>> Peiman
>>>
>>>
>>> 
>>>
>>> 
>>> -odac -d
>>> 
>>>
>>>
>>> 
>>> sr     = 96000
>>> ksmps  = 100
>>> nchnls = 2
>>> 0dbfs  = 1
>>>
>>> instr 1
>>>
>>> asig1    noise    .2, 0
>>>
>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>
>>>
>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>
>>> khan = ibuf1
>>>
>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>
>>> ar1    pvsynth fsb
>>> ar2    pvsynth fsig1
>>>
>>> outs ar1, ar2
>>> endin
>>>
>>> 
>>>
>>>
>>> 
>>> i1 0 10
>>> 
>>>
>>>
>>> 
>>
>>
>> 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"
>



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"

Date2011-07-07 16:20
FromSteven Yi
SubjectRe: [Csnd] Re: pvsbuffer issue
Hm, well another possibility to is put all of your instrument code in
a UDO, and have your instrument just call that. :P  Other than that, I
guess perhaps someone will need to modify the opcode to work without
ksmps=1.

On Thu, Jul 7, 2011 at 11:12 AM, peiman khosravi
 wrote:
> Actually UDO is not an option as the writing and reading into buffer is done
> in two different instruments and you cannot pass fsig to a UDO :-(
>
> Thanks
> Peiman
>
> On 07/07/2011 15:49, Steven Yi wrote:
>>
>> Does this work if you wrap it in a UDO and use setksmps 1?
>>
>> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>>   wrote:
>>>
>>> It turns out if ksmps=1 then it sounds fine. Should I file it as a bug?
>>> That's a real pity, I had great plans for that opcode - my Sunday roast
>>> is
>>> ruined now :-)
>>>
>>> Best,
>>> Peiman
>>>
>>> On 07/07/2011 15:35, peiman khosravi wrote:
>>>>
>>>> Hello,
>>>>
>>>> As the csd below demonstrates there seems to be something fishy going on
>>>> with pvsbuffer. It sounds as if some bins are zeroed out. The result is
>>>> drastically different from a straight resynthesis of the fsig.
>>>>
>>>> Am I doing something wrong?
>>>>
>>>> Thanks
>>>>
>>>> Peiman
>>>>
>>>>
>>>> 
>>>>
>>>> 
>>>> -odac -d
>>>> 
>>>>
>>>>
>>>> 
>>>> sr     = 96000
>>>> ksmps  = 100
>>>> nchnls = 2
>>>> 0dbfs  = 1
>>>>
>>>> instr 1
>>>>
>>>> asig1    noise    .2, 0
>>>>
>>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>>
>>>>
>>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>>
>>>> khan = ibuf1
>>>>
>>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>>
>>>> ar1    pvsynth fsb
>>>> ar2    pvsynth fsig1
>>>>
>>>> outs ar1, ar2
>>>> endin
>>>>
>>>> 
>>>>
>>>>
>>>> 
>>>> i1 0 10
>>>> 
>>>>
>>>>
>>>> 
>>>
>>>
>>> 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"
>>
>
>
>
> 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"


Date2011-07-07 17:02
Frompeiman khosravi
SubjectRe: [Csnd] Re: pvsbuffer issue
I think I found the problem.
Increasing the FFT size seems to fix it somehow. Mhh it's strange though

P

On 07/07/2011 16:20, Steven Yi wrote:
> Hm, well another possibility to is put all of your instrument code in
> a UDO, and have your instrument just call that. :P  Other than that, I
> guess perhaps someone will need to modify the opcode to work without
> ksmps=1.
>
> On Thu, Jul 7, 2011 at 11:12 AM, peiman khosravi
>   wrote:
>> Actually UDO is not an option as the writing and reading into buffer is done
>> in two different instruments and you cannot pass fsig to a UDO :-(
>>
>> Thanks
>> Peiman
>>
>> On 07/07/2011 15:49, Steven Yi wrote:
>>> Does this work if you wrap it in a UDO and use setksmps 1?
>>>
>>> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>>>     wrote:
>>>> It turns out if ksmps=1 then it sounds fine. Should I file it as a bug?
>>>> That's a real pity, I had great plans for that opcode - my Sunday roast
>>>> is
>>>> ruined now :-)
>>>>
>>>> Best,
>>>> Peiman
>>>>
>>>> On 07/07/2011 15:35, peiman khosravi wrote:
>>>>> Hello,
>>>>>
>>>>> As the csd below demonstrates there seems to be something fishy going on
>>>>> with pvsbuffer. It sounds as if some bins are zeroed out. The result is
>>>>> drastically different from a straight resynthesis of the fsig.
>>>>>
>>>>> Am I doing something wrong?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Peiman
>>>>>
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>> -odac -d
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> sr     = 96000
>>>>> ksmps  = 100
>>>>> nchnls = 2
>>>>> 0dbfs  = 1
>>>>>
>>>>> instr 1
>>>>>
>>>>> asig1    noise    .2, 0
>>>>>
>>>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>>>
>>>>>
>>>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>>>
>>>>> khan = ibuf1
>>>>>
>>>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>>>
>>>>> ar1    pvsynth fsb
>>>>> ar2    pvsynth fsig1
>>>>>
>>>>> outs ar1, ar2
>>>>> endin
>>>>>
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> i1 0 10
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>
>>>> 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"
>>>
>>
>>
>> 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"
>



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"

Date2011-07-07 19:04
FromVictor Lazzarini
SubjectRe: [Csnd] Re: pvsbuffer issue
It could be to do with the interpolation of windows, which pvsbufread  
does.
Using a ksmps that is pow-of-two seems to sort it (ksmps=64) (at least  
in my crappy laptop speakers)

Victor
On 7 Jul 2011, at 17:02, peiman khosravi wrote:

> I think I found the problem.
> Increasing the FFT size seems to fix it somehow. Mhh it's strange  
> though
>
> P
>
> On 07/07/2011 16:20, Steven Yi wrote:
>> Hm, well another possibility to is put all of your instrument code in
>> a UDO, and have your instrument just call that. :P  Other than  
>> that, I
>> guess perhaps someone will need to modify the opcode to work without
>> ksmps=1.
>>
>> On Thu, Jul 7, 2011 at 11:12 AM, peiman khosravi
>>   wrote:
>>> Actually UDO is not an option as the writing and reading into  
>>> buffer is done
>>> in two different instruments and you cannot pass fsig to a UDO :-(
>>>
>>> Thanks
>>> Peiman
>>>
>>> On 07/07/2011 15:49, Steven Yi wrote:
>>>> Does this work if you wrap it in a UDO and use setksmps 1?
>>>>
>>>> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>>>>     wrote:
>>>>> It turns out if ksmps=1 then it sounds fine. Should I file it as  
>>>>> a bug?
>>>>> That's a real pity, I had great plans for that opcode - my  
>>>>> Sunday roast
>>>>> is
>>>>> ruined now :-)
>>>>>
>>>>> Best,
>>>>> Peiman
>>>>>
>>>>> On 07/07/2011 15:35, peiman khosravi wrote:
>>>>>> Hello,
>>>>>>
>>>>>> As the csd below demonstrates there seems to be something fishy  
>>>>>> going on
>>>>>> with pvsbuffer. It sounds as if some bins are zeroed out. The  
>>>>>> result is
>>>>>> drastically different from a straight resynthesis of the fsig.
>>>>>>
>>>>>> Am I doing something wrong?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>>
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> -odac -d
>>>>>> 
>>>>>>
>>>>>>
>>>>>> 
>>>>>> sr     = 96000
>>>>>> ksmps  = 100
>>>>>> nchnls = 2
>>>>>> 0dbfs  = 1
>>>>>>
>>>>>> instr 1
>>>>>>
>>>>>> asig1    noise    .2, 0
>>>>>>
>>>>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>>>>
>>>>>>
>>>>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>>>>
>>>>>> khan = ibuf1
>>>>>>
>>>>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>>>>
>>>>>> ar1    pvsynth fsb
>>>>>> ar2    pvsynth fsig1
>>>>>>
>>>>>> outs ar1, ar2
>>>>>> endin
>>>>>>
>>>>>> 
>>>>>>
>>>>>>
>>>>>> 
>>>>>> i1 0 10
>>>>>> 
>>>>>>
>>>>>>
>>>>>> 
>>>>>
>>>>> 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"
>>>>
>>>
>>>
>>> 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"
>>
>
>
>
> 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"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





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"

Date2011-07-07 21:41
FromVictor Lazzarini
SubjectRe: [Csnd] Re: pvsbuffer issue
Ok, it was a bug in the buffer position counting of pvsbufread, which  
only showed with ksmps not pow of 2 (or 1). Now fixed in GIT.

Victor

On 7 Jul 2011, at 19:04, Victor Lazzarini wrote:

> It could be to do with the interpolation of windows, which  
> pvsbufread does.
> Using a ksmps that is pow-of-two seems to sort it (ksmps=64) (at  
> least in my crappy laptop speakers)
>
> Victor
> On 7 Jul 2011, at 17:02, peiman khosravi wrote:
>
>> I think I found the problem.
>> Increasing the FFT size seems to fix it somehow. Mhh it's strange  
>> though
>>
>> P
>>
>> On 07/07/2011 16:20, Steven Yi wrote:
>>> Hm, well another possibility to is put all of your instrument code  
>>> in
>>> a UDO, and have your instrument just call that. :P  Other than  
>>> that, I
>>> guess perhaps someone will need to modify the opcode to work without
>>> ksmps=1.
>>>
>>> On Thu, Jul 7, 2011 at 11:12 AM, peiman khosravi
>>>   wrote:
>>>> Actually UDO is not an option as the writing and reading into  
>>>> buffer is done
>>>> in two different instruments and you cannot pass fsig to a UDO :-(
>>>>
>>>> Thanks
>>>> Peiman
>>>>
>>>> On 07/07/2011 15:49, Steven Yi wrote:
>>>>> Does this work if you wrap it in a UDO and use setksmps 1?
>>>>>
>>>>> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>>>>>     wrote:
>>>>>> It turns out if ksmps=1 then it sounds fine. Should I file it  
>>>>>> as a bug?
>>>>>> That's a real pity, I had great plans for that opcode - my  
>>>>>> Sunday roast
>>>>>> is
>>>>>> ruined now :-)
>>>>>>
>>>>>> Best,
>>>>>> Peiman
>>>>>>
>>>>>> On 07/07/2011 15:35, peiman khosravi wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> As the csd below demonstrates there seems to be something  
>>>>>>> fishy going on
>>>>>>> with pvsbuffer. It sounds as if some bins are zeroed out. The  
>>>>>>> result is
>>>>>>> drastically different from a straight resynthesis of the fsig.
>>>>>>>
>>>>>>> Am I doing something wrong?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>>
>>>>>>> 
>>>>>>> -odac -d
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>> sr     = 96000
>>>>>>> ksmps  = 100
>>>>>>> nchnls = 2
>>>>>>> 0dbfs  = 1
>>>>>>>
>>>>>>> instr 1
>>>>>>>
>>>>>>> asig1    noise    .2, 0
>>>>>>>
>>>>>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>>>>>
>>>>>>>
>>>>>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>>>>>
>>>>>>> khan = ibuf1
>>>>>>>
>>>>>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>>>>>
>>>>>>> ar1    pvsynth fsb
>>>>>>> ar2    pvsynth fsig1
>>>>>>>
>>>>>>> outs ar1, ar2
>>>>>>> endin
>>>>>>>
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>> i1 0 10
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>
>>>>>> 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"
>>>>>
>>>>
>>>>
>>>> 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"
>>>
>>
>>
>>
>> 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"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> 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"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





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"

Date2011-07-07 23:11
Frompeiman khosravi
SubjectRe: [Csnd] Re: pvsbuffer issue
Thanks Victor,

Best,

Peiman

On 7 July 2011 21:41, Victor Lazzarini  wrote:
> Ok, it was a bug in the buffer position counting of pvsbufread, which only
> showed with ksmps not pow of 2 (or 1). Now fixed in GIT.
>
> Victor
>
> On 7 Jul 2011, at 19:04, Victor Lazzarini wrote:
>
>> It could be to do with the interpolation of windows, which pvsbufread
>> does.
>> Using a ksmps that is pow-of-two seems to sort it (ksmps=64) (at least in
>> my crappy laptop speakers)
>>
>> Victor
>> On 7 Jul 2011, at 17:02, peiman khosravi wrote:
>>
>>> I think I found the problem.
>>> Increasing the FFT size seems to fix it somehow. Mhh it's strange though
>>>
>>> P
>>>
>>> On 07/07/2011 16:20, Steven Yi wrote:
>>>>
>>>> Hm, well another possibility to is put all of your instrument code in
>>>> a UDO, and have your instrument just call that. :P  Other than that, I
>>>> guess perhaps someone will need to modify the opcode to work without
>>>> ksmps=1.
>>>>
>>>> On Thu, Jul 7, 2011 at 11:12 AM, peiman khosravi
>>>>   wrote:
>>>>>
>>>>> Actually UDO is not an option as the writing and reading into buffer is
>>>>> done
>>>>> in two different instruments and you cannot pass fsig to a UDO :-(
>>>>>
>>>>> Thanks
>>>>> Peiman
>>>>>
>>>>> On 07/07/2011 15:49, Steven Yi wrote:
>>>>>>
>>>>>> Does this work if you wrap it in a UDO and use setksmps 1?
>>>>>>
>>>>>> On Thu, Jul 7, 2011 at 10:40 AM, peiman khosravi
>>>>>>     wrote:
>>>>>>>
>>>>>>> It turns out if ksmps=1 then it sounds fine. Should I file it as a
>>>>>>> bug?
>>>>>>> That's a real pity, I had great plans for that opcode - my Sunday
>>>>>>> roast
>>>>>>> is
>>>>>>> ruined now :-)
>>>>>>>
>>>>>>> Best,
>>>>>>> Peiman
>>>>>>>
>>>>>>> On 07/07/2011 15:35, peiman khosravi wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> As the csd below demonstrates there seems to be something fishy
>>>>>>>> going on
>>>>>>>> with pvsbuffer. It sounds as if some bins are zeroed out. The result
>>>>>>>> is
>>>>>>>> drastically different from a straight resynthesis of the fsig.
>>>>>>>>
>>>>>>>> Am I doing something wrong?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>>
>>>>>>>> 
>>>>>>>> -odac -d
>>>>>>>> 
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>> sr     = 96000
>>>>>>>> ksmps  = 100
>>>>>>>> nchnls = 2
>>>>>>>> 0dbfs  = 1
>>>>>>>>
>>>>>>>> instr 1
>>>>>>>>
>>>>>>>> asig1    noise    .2, 0
>>>>>>>>
>>>>>>>> fsig1   pvsanal   asig1,1024,256,1024,1
>>>>>>>>
>>>>>>>>
>>>>>>>> ibuf1,kt1   pvsbuffer   fsig1, 10  ; 10-sec buf with fsig1
>>>>>>>>
>>>>>>>> khan = ibuf1
>>>>>>>>
>>>>>>>> fsb  pvsbufread  kt1, khan, 0, sr/2   ; read buffer
>>>>>>>>
>>>>>>>> ar1    pvsynth fsb
>>>>>>>> ar2    pvsynth fsig1
>>>>>>>>
>>>>>>>> outs ar1, ar2
>>>>>>>> endin
>>>>>>>>
>>>>>>>> 
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>> i1 0 10
>>>>>>>> 
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>
>>>>>>> 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"
>>>>>>
>>>>>
>>>>>
>>>>> 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"
>>>>
>>>
>>>
>>>
>>> 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"
>>>
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> 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"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> 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"