Hello All,
I have a very basic question regarding pd - does it use dual buffer approach ?
That is, suppose I'm going to use a FIR (FFT, for example) with long (several seconds) processing time (latency), and there is enough CPU performance to do processing in real time.
Still, if I want to hear uninterrupted sound, the sound card, having, say, a buffer of 4096 samples has to be fed new data much more often - with 44.1KHz sampling frequency it has to be fed about 11 times per second.
So, a possible solution is to have to buffers - while one of them is waiting for the new data from the FIR, the other piece by piece feeds data to soundcard, and when the feeding buffer is empty, the buffers are swapped.
So, how does pd deal with long latencies like in the case described above - does it use dual buffer approach in order to have uninterrupted sound ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________ Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. http://autos.yahoo.com/carfinder/
Depending on the OS, you can get at least 100 milliseconds of buffering and perhaps much more... so it should be fine.
cheers Miller
On Sat, Aug 18, 2007 at 01:50:46PM -0700, Sergei Steshenko wrote:
Hello All,
I have a very basic question regarding pd - does it use dual buffer approach ?
That is, suppose I'm going to use a FIR (FFT, for example) with long (several seconds) processing time (latency), and there is enough CPU performance to do processing in real time.
Still, if I want to hear uninterrupted sound, the sound card, having, say, a buffer of 4096 samples has to be fed new data much more often - with 44.1KHz sampling frequency it has to be fed about 11 times per second.
So, a possible solution is to have to buffers - while one of them is waiting for the new data from the FIR, the other piece by piece feeds data to soundcard, and when the feeding buffer is empty, the buffers are swapped.
So, how does pd deal with long latencies like in the case described above - does it use dual buffer approach in order to have uninterrupted sound ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. http://autos.yahoo.com/carfinder/
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
--- Miller Puckette mpuckett@imusic1.ucsd.edu wrote:
Depending on the OS, you can get at least 100 milliseconds of buffering and perhaps much more... so it should be fine.
cheers Miller
Well, the OS is Linux (SUSE 10.2 to be precise) and I'm interested in FFT transforms taking, say, 3 seconds.
Will pd allocate the necessary buffers/threads ?
Can pd be configured to cope with such latencies ?
If yes, at run time or at compile time ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
Hey, there, Sergei I was just working on an example to show you if it can be done... I have worked with this quite a bit, and have successfully used filters as long as 1.5 seconds long @ 44kHz using my dinky little 1.6Ghz Sempron. Although the original implementation was a subband adaptive filter using wavelet transform, and many other externals I wrote to do it, it DID use pd's own blocking/dsp scheduling system. So, I for one think it is possible, depending upon your system (also I was using Linux, by the way). However, then I created a canvas that covered up some things to make a GOP patch. Ummm apparently I did things in the wrong order, so it crashes now, every time. I will try to recover the work I just did, and get back to you as soon as I can.
Chuck
On 8/18/07, Sergei Steshenko sergstesh@yahoo.com wrote:
--- Miller Puckette mpuckett@imusic1.ucsd.edu wrote:
Depending on the OS, you can get at least 100 milliseconds of buffering and perhaps much more... so it should be fine.
cheers Miller
Well, the OS is Linux (SUSE 10.2 to be precise) and I'm interested in FFT transforms taking, say, 3 seconds.
Will pd allocate the necessary buffers/threads ?
Can pd be configured to cope with such latencies ?
If yes, at run time or at compile time ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
However, then I created a canvas that covered up some things to make a GOP patch. Ummm apparently I did things in the wrong order, so it crashes now, every time.
nope, it's not the canvas.... I've confirmed that much.... I will need to re-organize and re-do the patch... that will take a few days... but take my word, you can make long filters without audio dropouts...
Chuck
maybe you also want to look at the vasp library. with vasp you can do fft on whatever buffersize you want. marius.
Sergei Steshenko wrote:
--- Miller Puckette mpuckett@imusic1.ucsd.edu wrote:
Depending on the OS, you can get at least 100 milliseconds of buffering and perhaps much more... so it should be fine.
cheers Miller
Well, the OS is Linux (SUSE 10.2 to be precise) and I'm interested in FFT transforms taking, say, 3 seconds.
Will pd allocate the necessary buffers/threads ?
Can pd be configured to cope with such latencies ?
If yes, at run time or at compile time ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
--- marius schebella marius.schebella@gmail.com wrote:
maybe you also want to look at the vasp library. with vasp you can do fft on whatever buffersize you want. marius.
Sergei Steshenko wrote:
--- Miller Puckette mpuckett@imusic1.ucsd.edu wrote:
Depending on the OS, you can get at least 100 milliseconds of buffering and perhaps much more... so it should be fine.
cheers Miller
Well, the OS is Linux (SUSE 10.2 to be precise) and I'm interested in FFT transforms taking, say, 3 seconds.
Will pd allocate the necessary buffers/threads ?
Can pd be configured to cope with such latencies ?
If yes, at run time or at compile time ?
Thanks, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto
Green Center.
http://autos.yahoo.com/green_center/
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Thanks.
Did you mean
http://www.parasitaere-kapazitaeten.net/Pd/ext/vasp/readme.txt
as a starting point ?
--Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433