Csound Csound-dev Csound-tekno Search About

[Csnd] new opcode: pvsbufread2

Date2011-07-27 12:47
FromVictor Lazzarini
Subject[Csnd] new opcode: pvsbufread2
pvsbufread2   -  pvs buffer reader with bin-wise amplitude and  
frequency delay times

fsig   pvsbufread2  ktime,khandle,kfn1,kfn2


ktime - current read position time
khandle - pvs buffer handle
kfn1 - function table containing delay times in seconds for ampitudes  
in each fsig bin, must be fftsize/2 + 1 size or larger
kfn2 - function table containing delay times in seconds for  
frequencies in each fsig bin, must be fftsize/2 + 1 size or larger

example:





ksmps=64
instr 1
ifftsize = 1024
ihop = ifftsize/4
a1 diskin2 "jarrettm.wav",1
fsig1 pvsanal a1, ifftsize,ihop, ifftsize, 1
ih,kt pvsbuffer fsig1, 10
fsig2 pvsbufread2 kt,ih,1,2
a2 pvsynth fsig2
out a2
endin


f1 0 1024 -7 0 512 5 512 5
f2 0 1024 -7 5 512 0 512 0
i1 0 60



======
outstanding issue with pvs buffers: when ksmps not pow of two, there  
is a slight oscillation of timescale that affects the sound of non- 
timescale modified sounds, so for the moment, we recommend using pow  
of two ksmps. I am working to fix this problem.


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-27 13:07
Frompeiman khosravi
SubjectRe: [Csnd] new opcode: pvsbufread2
Thanks Victor. This is amazing indeed. The addition of bin-wise 
amplitude scaling also means that spectral panning can be done more 
efficiently with this opcode instead of having to use a UDO as I don now 
(just need several instances of pvsbufread2). I cannot wait to use this 
opcode!

Best,

Peiman


On 27/07/2011 12:47, Victor Lazzarini wrote:
>
> pvsbufread2   -  pvs buffer reader with bin-wise amplitude and 
> frequency delay times
>
> fsig   pvsbufread2  ktime,khandle,kfn1,kfn2
>
>
> ktime - current read position time
> khandle - pvs buffer handle
> kfn1 - function table containing delay times in seconds for ampitudes 
> in each fsig bin, must be fftsize/2 + 1 size or larger
> kfn2 - function table containing delay times in seconds for 
> frequencies in each fsig bin, must be fftsize/2 + 1 size or larger
>
> example:
>
> 
> 
> 
> 
> ksmps=64
> instr 1
> ifftsize = 1024
> ihop = ifftsize/4
> a1 diskin2 "jarrettm.wav",1
> fsig1 pvsanal a1, ifftsize,ihop, ifftsize, 1
> ih,kt pvsbuffer fsig1, 10
> fsig2 pvsbufread2 kt,ih,1,2
> a2 pvsynth fsig2
> out a2
> endin
> 
> 
> f1 0 1024 -7 0 512 5 512 5
> f2 0 1024 -7 5 512 0 512 0
> i1 0 60
> 
> 
>
> ======
> outstanding issue with pvs buffers: when ksmps not pow of two, there 
> is a slight oscillation of timescale that affects the sound of 
> non-timescale modified sounds, so for the moment, we recommend using 
> pow of two ksmps. I am working to fix this problem.
>
>
> 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"