Hello,
I'm searching how to do a sample resolution audio delay. Is it possible?
All the best, Joël
Hi Joel, Look at z~ , part of zexy library.
Best
S.
2008/12/2 joel silvestre j.silvestre@wanadoo.fr
Hello,
I'm searching how to do a sample resolution audio delay. Is it possible?
All the best, Joël
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Sylvain,
that's exactly what I was looking at, thanks!
Joël
Le mardi 02 décembre 2008 à 14:27 +0100, Sylvain Le Beux a écrit :
Hi Joel,
Look at z~ , part of zexy library.
Best
S.
2008/12/2 joel silvestre j.silvestre@wanadoo.fr Hello,
I'm searching how to do a sample resolution audio delay. Is it possible? All the best, Joël
Hallo, joel silvestre hat gesagt: // joel silvestre wrote:
I'm searching how to do a sample resolution audio delay. Is it possible?
Yes, even in multiple ways: One would involve [rzero~]. rzero acts like this on audio input:
y[n] = x[n] - a[n] * x[n-1]
y[n]: output sample n x[n]: input sample n
If you set a = 1 and substract this from the original signal, you get:
y[n] = x[n] - (x[n] - x[n-1]) = x[n-1]
You could also set a = -1 and substract the original from rzero's output:
y[n] = (x[n] + x[n-1]) - x[n]) = x[n-1]
Both are a one sample delays. In Pd the first approach would realised as:
[inlet~]
|
| [rzero~ 1]
| |
[-~]
|
[outlet~]
Another way would be to use a normal delay with [delwrite~] and [delread~] and set the delay time to be one sample. One sample at a samplerate SR takes 1/SR seconds or 1000/SR milliseconds, so do this:
[samplerate~] | [swap 1000] | / [/~ ] | [* 1] | [delread~ mydelay]
Use this approach if you want to calculate delay times with more than one sample. Just change the [* 1] to [* 5] to get a delay of five samples, for example.
Ciao
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Another way would be to use a normal delay with [delwrite~] and [delread~] and set the delay time to be one sample. One sample at a samplerate SR takes 1/SR seconds or 1000/SR milliseconds, so do this:
[samplerate~] | [swap 1000] | / [/~ ] | [* 1] | [delread~ mydelay]
Use this approach if you want to calculate delay times with more than one sample. Just change the [* 1] to [* 5] to get a delay of five samples, for example.
Additional note: Do not use [vd~] here! It's doing interpolation and has to be run with at least one sample delay anyway.
Frank
Hi Franck,
very interesting!
I've tried delwrite~ / delread~ and it's looks like to me that the minimum delay can't be less than one audio block ( sound card buffer ). Am I wrong?
Thanks a lot! Joël
Le mardi 02 décembre 2008 à 14:50 +0100, Frank Barknecht a écrit :
Hallo, joel silvestre hat gesagt: // joel silvestre wrote:
I'm searching how to do a sample resolution audio delay. Is it possible?
Yes, even in multiple ways: One would involve [rzero~]. rzero acts like this on audio input:
y[n] = x[n] - a[n] * x[n-1]
y[n]: output sample n x[n]: input sample n
If you set a = 1 and substract this from the original signal, you get:
y[n] = x[n] - (x[n] - x[n-1]) = x[n-1]
You could also set a = -1 and substract the original from rzero's output:
y[n] = (x[n] + x[n-1]) - x[n]) = x[n-1]
Both are a one sample delays. In Pd the first approach would realised as:
[inlet~] |
| [rzero~ 1] | | [-~] | [outlet~]Another way would be to use a normal delay with [delwrite~] and [delread~] and set the delay time to be one sample. One sample at a samplerate SR takes 1/SR seconds or 1000/SR milliseconds, so do this:
[samplerate~] | [swap 1000] | / [/~ ] | [* 1] | [delread~ mydelay]
Use this approach if you want to calculate delay times with more than one sample. Just change the [* 1] to [* 5] to get a delay of five samples, for example.
Ciao
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
joel silvestre wrote:
Hi Franck,
very interesting!
I've tried delwrite~ / delread~ and it's looks like to me that the minimum delay can't be less than one audio block ( sound card buffer ).
it has nothing to do with the soundcard buffer, 64 samples is Pd's internal blocksize.
Am I wrong?
yes. see 3.audio.examples/G05.execution.order.pd
fgmasdr IOhannes
So I'm double wrong!
Le mardi 02 décembre 2008 à 15:54 +0100, IOhannes m zmoelnig a écrit :
joel silvestre wrote:
Hi Franck,
very interesting!
I've tried delwrite~ / delread~ and it's looks like to me that the minimum delay can't be less than one audio block ( sound card buffer ).
it has nothing to do with the soundcard buffer, 64 samples is Pd's internal blocksize.
Am I wrong?
yes. see 3.audio.examples/G05.execution.order.pd
fgmasdr IOhannes
Hallo, joel silvestre hat gesagt: // joel silvestre wrote:
I've tried delwrite~ / delread~ and it's looks like to me that the minimum delay can't be less than one audio block ( sound card buffer ). Am I wrong?
You need to use "order forcing" to make sure to get the write executed before the read. See doc/3.audio.examples/G05.execution.order.pd for how to do it.
Frank
I think? that you could easily replace the [rzero~ 1] -> [-~] dance with just an [rzero_rev~ 0]?
On Wed, Dec 3, 2008 at 12:50 AM, Frank Barknecht fbar@footils.org wrote:
Hallo, joel silvestre hat gesagt: // joel silvestre wrote:
I'm searching how to do a sample resolution audio delay. Is it possible?
Yes, even in multiple ways: One would involve [rzero~]. rzero acts like this on audio input:
y[n] = x[n] - a[n] * x[n-1]
y[n]: output sample n x[n]: input sample n
If you set a = 1 and substract this from the original signal, you get:
y[n] = x[n] - (x[n] - x[n-1]) = x[n-1]
You could also set a = -1 and substract the original from rzero's output:
y[n] = (x[n] + x[n-1]) - x[n]) = x[n-1]
Both are a one sample delays. In Pd the first approach would realised as:
[inlet~] |
| [rzero~ 1] | | [-~] | [outlet~]