this discussion went up when we talked about the karplus-strong-sythesis. so it is not about getting this short delay in realtime. it is about a sythesis that tries to simulate string and other percussive instruments. the problem is, that the frequency of the sythesized sound is dependent from a delay-time (frequency=1/delaytime). if the quantization of the delaytime is 1 sample, you can't play any frequency you want with this sythesis (for example: you want freq of 5000. how many samples long is the delay: 44100 / 5000 = 8.82 samples delaytime > 8.82 truncated> 9. freq with 9 samples delay = 44100 / 9 = 4900 >>> you get an error size of 100Hz or 2%) .
with your idea, it's maybe possible to play any frequency with karplus-strong-sythesis.
thanks
----- Original Message ----- From: "pix" pix@test.at To: "Roman Haefeli" reduzierer@yahoo.de Cc: pd-ot@iem.kug.ac.at Sent: Friday, May 14, 2004 12:59 AM Subject: Re: [PD] smallest possible value of a delay-time
hmm, quickly thinking about it (and moving the discussion to the [OT] list)...
since you can't actually generate output out of sample boundaries, even though you might be able to interpolate and find out a delay value less than one sample, you will only be about to output it during the next sample. but latency is always going to be much more than one sample anyhow, so i guess i can assume you don't care about this.
the other thing is that you only have two samples to play with, the current sample and the last sample. so the best you can do is linearly interpolate, which doesn't sound so great. (well you theoretically have access to all of the previous samples, but normally to do interpolation you need points symetrically before and after the point you want to interpolate).
if C is the current sample and L is the previous sample, you could linearly interpolate between them with something like C*t+L*(1-t). where t is between 0,1 and is the fractional number of samples you want to delay. you can get L in pd using the zexy "z" object.
if you are less concerned about realtime, you could keep a buffer of the last few input samples and do better interpolation. your final output will be delayed, but the relative delay between your input signal and your interpolated delay will be less than one sample.
btw, i'm no academic, don't go using this as gospel to shout down your teacher. but feel free to use it as inspiration ;)
pix.
On Fri, May 14, 2004 at 12:35:17AM +0200, Roman Haefeli wrote:
hi
i had a discussion with a teacher today. the topic was the smallest delay-time possible. in his opinion one sample is the atom of signal and cannot be divided anymore. in my opinion it should be possible to get shorter delays than 1 samples with interpolation. my argument was: it
should
be possible to set the values of each sample so, that the resulting
signal
would be similar to a digitized analogue signal with a shorter than 1
sample
delay.
Does anybody know a good explanation for this problem?
i konw, this haven't got anything to do with pd. but i think you are the right people to ask. by the way: if it is possible, how would a
realization
in pd look like?
thank you for helpin me
roman
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
this discussion went up when we talked about the karplus-strong-sythesis. so it is not about getting this short delay in realtime. it is about a sythesis that tries to simulate string and other percussive instruments. the problem is, that the frequency of the sythesized sound is dependent from a delay-time (frequency=1/delaytime). if the quantization of the delaytime is 1 sample, you can't play any frequency you want with this sythesis (for example: you want freq of 5000. how many samples long is the delay: 44100 / 5000 = 8.82 samples delaytime > 8.82 truncated> 9. freq with 9 samples delay = 44100 / 9 = 4900 >>> you get an error size of 100Hz or 2%) .
A delay simply is a sound recorder and player. In earlier times, they were done with tapes, that were just shorter than tapes for real recordings, and looped.
Thinking of tapes as simple sample recorder/players or even as some kind of adc/dac combination, they must follow the same rules as other samle players, that is: the max frequency they can record or play is Nyquist frequency, that is half sample rate. The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
The second question then is: Can you have delays not quantized on samples? This looks as if it's the same problem as a basic wavetable oscillator has, like tabplay~. They also play a short buffer for a certain time, that doesn't have to be exactly on a sample, but can be in between.
Frank Barknecht _ ______footils.org__
From: "Frank Barknecht" fbar@footils.org To: "post pd-msg" pd-list@iem.kug.ac.at
The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
= 2 samples?
Why? I'm talking about a signal in the digital domain. I don't want to get it digitized and analog-converted in this time. I'm looking for a solution to get a delay time between original and delayed signal shorter than 1 sample. I don't care if the delay of both signals has a value bigger than 1 sample.
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
= 2 samples?
Why?
Scrap my mail, it was too early. (7:15 am...) ciao
On Fri, 14 May 2004, Frank Barknecht wrote:
Thinking of tapes as simple sample recorder/players or even as some kind of adc/dac combination, they must follow the same rules as other samle players, that is: the max frequency they can record or play is Nyquist frequency, that is half sample rate. The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
Is it? Using a fractional interpolating all pass filter, you can't acheive delays less than one sample? Or does the allpass filter let you get fractional delays, but still the minimum delay is one sample?
Larry Troxler
Fascinating question... You can get very small delays from allpass filters, but they're frequency-dependent (i.e., the group phase delay depends on frequency.) There are probably other interpolation schemes that could get fractional delays (fit a polynomial through the points you have, 1 to the right and n-1 to the left, for instance) but they won't have a flat frequency response. So one could probably devise trade-offs that sounded OK, at least at low frequencies.
If the aim is to make a recirculating delay network with very low delay, the best way is probably to resample to a much higher sample rate, do the job, and then resample back down.
cheers Miller
On Fri, May 14, 2004 at 11:28:16AM -0400, Larry Troxler wrote:
On Fri, 14 May 2004, Frank Barknecht wrote:
Thinking of tapes as simple sample recorder/players or even as some kind of adc/dac combination, they must follow the same rules as other samle players, that is: the max frequency they can record or play is Nyquist frequency, that is half sample rate. The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
Is it? Using a fractional interpolating all pass filter, you can't acheive delays less than one sample? Or does the allpass filter let you get fractional delays, but still the minimum delay is one sample?
Larry Troxler
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hallo, Larry Troxler hat gesagt: // Larry Troxler wrote:
On Fri, 14 May 2004, Frank Barknecht wrote:
The shortest possible delay time then in theory is 1/nyquist[Hz] seconds.
Is it?
Well, as I wrote, I devised this conclusion early in the moring when my brain was still suffering from a kind of longest possible delay time way beyond my personal nyquist frequency... ;-P
Frank Barknecht _ ______footils.org__
What happens if you upsample the signal to a sample rate high enough so that you can do a single sample delay, and then downsample again? There are various interpolation techniques for this I think, and you are not limited to lineair interpolation, which I suspect that this does work.Not sure if you can do it in pd though.
you should ask the music-dsp list, or the csound list. I think in csound they solved the tuning of the karplus-strong this way. But again I am not sure.
regards
Gerard
On Friday 14 May 2004 00:09, Roman Haefeli wrote:
this discussion went up when we talked about the karplus-strong-sythesis. so it is not about getting this short delay in realtime. it is about a sythesis that tries to simulate string and other percussive instruments. the problem is, that the frequency of the sythesized sound is dependent from a delay-time (frequency=1/delaytime). if the quantization of the delaytime is 1 sample, you can't play any frequency you want with this sythesis (for example: you want freq of 5000. how many samples long is the delay: 44100 / 5000 = 8.82 samples delaytime > 8.82 truncated> 9. freq with 9 samples delay = 44100 / 9 = 4900 >>> you get an error size of 100Hz or 2%) .
with your idea, it's maybe possible to play any frequency with karplus-strong-sythesis.