Hello. I need to do some heavy audio generation and processing but my computer is not powerful enough to do it in real-time. In fact, I just want to record it; I don't need it to be processed in real-time. So, is there any way of doing this in PD? Is there any way of using Pure Data in a non real-time mode and capture its output to a soundfile? Thanks in advance.
Ignacio
Hi Ignacio,
this should be as simple as running PD at a very low rendering sampling rate and recording to a file inside PD. Then take the resulting soundfile and convert it to the desired target sampling rate in a sound editor (or with sndfile-resample, etc etc...). Make sure your rendering sampling rate is an even division of the target sampling rate to avoid interpolation noise.
Or am I wrong, and this would cause a lot of aliasing problems?
best! D.
Ignacio Viano wrote:
Hello. I need to do some heavy audio generation and processing but my computer is not powerful enough to do it in real-time. In fact, I just want to record it; I don't need it to be processed in real-time. So, is there any way of doing this in PD? Is there any way of using Pure Data in a non real-time mode and capture its output to a soundfile? Thanks in advance.
Too complicated, Derek!
Ignacio, just let pd consume 147% of your cpu, stuttering merrily, and the output of writesf~ will magically be glitch free. Pd works on a logical clock, it hardly knows what "real" time is
For example, I've rendered videos in Gem with sound this way, Pd consumed ~10x my available cpu/gpu power so it took ~10x realtime to get the output, but at the end it was all in sync.
Claude
Derek Holzer wrote:
Hi Ignacio,
this should be as simple as running PD at a very low rendering sampling rate and recording to a file inside PD. Then take the resulting soundfile and convert it to the desired target sampling rate in a sound editor (or with sndfile-resample, etc etc...). Make sure your rendering sampling rate is an even division of the target sampling rate to avoid interpolation noise.
Or am I wrong, and this would cause a lot of aliasing problems?
best! D.
Ignacio Viano wrote:
Hello. I need to do some heavy audio generation and processing but my computer is not powerful enough to do it in real-time. In fact, I just want to record it; I don't need it to be processed in real-time. So, is there any way of doing this in PD? Is there any way of using Pure Data in a non real-time mode and capture its output to a soundfile? Thanks in advance.
Wow. OK, I guess I never tried it the "wrong" way.... ;-) just to satisfy curiosity... would downsample/upsample cause aliasing errors or not?
best, d.
Claude Heiland-Allen wrote:
Too complicated, Derek!
Ignacio, just let pd consume 147% of your cpu, stuttering merrily, and the output of writesf~ will magically be glitch free. Pd works on a logical clock, it hardly knows what "real" time is
For example, I've rendered videos in Gem with sound this way, Pd consumed ~10x my available cpu/gpu power so it took ~10x realtime to get the output, but at the end it was all in sync.
Claude
Derek Holzer wrote:
Hi Ignacio,
this should be as simple as running PD at a very low rendering sampling rate and recording to a file inside PD. Then take the resulting soundfile and convert it to the desired target sampling rate in a sound editor (or with sndfile-resample, etc etc...). Make sure your rendering sampling rate is an even division of the target sampling rate to avoid interpolation noise.
Or am I wrong, and this would cause a lot of aliasing problems?
best! D.
Ignacio Viano wrote:
Hello. I need to do some heavy audio generation and processing but my computer is not powerful enough to do it in real-time. In fact, I just want to record it; I don't need it to be processed in real-time. So, is there any way of doing this in PD? Is there any way of using Pure Data in a non real-time mode and capture its output to a soundfile? Thanks in advance.
On Tue, 2008-08-05 at 12:24 +0200, Derek Holzer wrote:
Wow. OK, I guess I never tried it the "wrong" way.... ;-) just to satisfy curiosity... would downsample/upsample cause aliasing errors or not?
best, d.
let's say:
then you wouldn't even have to resample the result, but it would be sufficient to simply change the samplerate field in the header from 24'000 to 48'000. you wouldn't have any artifacts at all in this case.
if you simply record at 24k without all the modifications in your patch as described above and if you resample the rendered result to 48k, you probably would have a bit artefacts, but what is much worse: you cannot increase the quality of your recording by upsampling it. it will still sound the same (as with the lower samplerate) and it would be lacking all frequencies above 12k. so: yeah, it is definitely recommended, whenever possible, to do offline rendering in pd, even if it uses more than 100% cpu.
roman
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Thanks Roman! Claude was right, my way is too complicated. But I'm happy to know the specifics.
Cheers! D.
Roman Haefeli wrote:
On Tue, 2008-08-05 at 12:24 +0200, Derek Holzer wrote:
Wow. OK, I guess I never tried it the "wrong" way.... ;-) just to satisfy curiosity... would downsample/upsample cause aliasing errors or not?
best, d.
let's say:
- you record at 24k, aiming for a result at 48k
- all time variables (metro, delay, etc) are doubled
- all frequencies are halved, respectively 12 is subtracted from all pitches.
then you wouldn't even have to resample the result, but it would be sufficient to simply change the samplerate field in the header from 24'000 to 48'000. you wouldn't have any artifacts at all in this case.
if you simply record at 24k without all the modifications in your patch as described above and if you resample the rendered result to 48k, you probably would have a bit artefacts, but what is much worse: you cannot increase the quality of your recording by upsampling it. it will still sound the same (as with the lower samplerate) and it would be lacking all frequencies above 12k. so: yeah, it is definitely recommended, whenever possible, to do offline rendering in pd, even if it uses more than 100% cpu.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Thank you all very much. With Claude's method things are being recorded with no glitches. This is a very important tool for me. Thanks again. Ignacio