Hi!
I ve been reading the on-going debate about interpolation for a few days, and it just occured to me that i don't how go about avoiding aliasing more generally than with band-limited wavetables. If i wanted to play a sample at a pitch higher than the original, or if i wanted to use a karplus-strong resonator to generate notes, what would be the proper way of ensuring that no aliasing occurs? Do people generally use low-pass filters with a cut-off somewhere below the Nyquist frequency? Or is there a trick that one can use earlier on in the signal path of a patch?
Pierre
I was thinking about this the other day.... is it possible to have aliasing with Karplus-Strong? Because it's a delay line, nothing is being played back at any higher rate than it was sampled at, so no aliasing should be possible. Right? Math-gurus correct me if I'm wrong.
Otherwise, any signal generator needs to be bandlimited or oversampled:
http://en.flossmanuals.net/PureData/Antialiasing http://en.flossmanuals.net/PureData/GeneratingWaveforms
Frank Barknecht has some spliced-transition trick he uses as well, I'm sure it will come up in a reply or two on this thread as well...
D.
On 3/31/10 6:27 PM, Pierre Massat wrote:
Hi!
I ve been reading the on-going debate about interpolation for a few days, and it just occured to me that i don't how go about avoiding aliasing more generally than with band-limited wavetables. If i wanted to play a sample at a pitch higher than the original, or if i wanted to use a karplus-strong resonator to generate notes, what would be the proper way of ensuring that no aliasing occurs? Do people generally use low-pass filters with a cut-off somewhere below the Nyquist frequency? Or is there a trick that one can use earlier on in the signal path of a patch?
I m not sure i understand aliasing well... So anything that's sampled and played back without altering the pitch would not suffer from aliasing? When exactly does aliasing occur? during the DAC conversion, or before that? Let's say i set a karplus-strong resonator to a frequency of 30 KHz (assuming i'm a dog and i can hear a pitch that high), at a 44.1 KHz sampling rate, than what happens? No aliasing at all?
2010/3/31 Derek Holzer derek@umatic.nl
I was thinking about this the other day.... is it possible to have aliasing with Karplus-Strong? Because it's a delay line, nothing is being played back at any higher rate than it was sampled at, so no aliasing should be possible. Right? Math-gurus correct me if I'm wrong.
Otherwise, any signal generator needs to be bandlimited or oversampled:
http://en.flossmanuals.net/PureData/Antialiasing http://en.flossmanuals.net/PureData/GeneratingWaveforms
Frank Barknecht has some spliced-transition trick he uses as well, I'm sure it will come up in a reply or two on this thread as well...
D.
On 3/31/10 6:27 PM, Pierre Massat wrote:
Hi!
I ve been reading the on-going debate about interpolation for a few days, and it just occured to me that i don't how go about avoiding aliasing more generally than with band-limited wavetables. If i wanted to play a sample at a pitch higher than the original, or if i wanted to use a karplus-strong resonator to generate notes, what would be the proper way of ensuring that no aliasing occurs? Do people generally use low-pass filters with a cut-off somewhere below the Nyquist frequency? Or is there a trick that one can use earlier on in the signal path of a patch?
-- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 139: "Revaluation (a warm feeling)"
Correct, nothing played back at original sampling rate will alias. If you speed that sample up, then some of the recorded harmonics will go over the Nyquist number and alias.
Please read the page I sent you on aliasing:
http://en.flossmanuals.net/PureData/Antialiasing
and also
http://en.flossmanuals.net/PureData/WhatIsDigitalAudio
Aliasing happens when you try to synthesize or play back a frequency higher than 1/2 the sampling rate (this is called the Nyquist number). In non-sine wave oscillators, it often comes from the highest harmonics. In samples, it comes from playing them back faster than the original sampling rate. It happens at the moment those frequencies are synthesized, and cannot be removed later. Thus the oversampling approach documented in the FLOSS Manual (and taken directly from Miller's Pd manual patches).
A Karplus-Strong resonator is a delay line and as I understand it, so long as no pitch shifting is going on then it can't alias. You would not be able to create a Karplus-Strong resonator at 30KHz unless you have a sampling rate of 60KHz, because the shortest delay time you can get is still one sample (1/44100 of one second at normal sampling rate). Again, math gurus are welcome to correct my calculations.
D.
On 3/31/10 6:39 PM, Pierre Massat wrote:
I m not sure i understand aliasing well... So anything that's sampled and played back without altering the pitch would not suffer from aliasing? When exactly does aliasing occur? during the DAC conversion, or before that? Let's say i set a karplus-strong resonator to a frequency of 30 KHz (assuming i'm a dog and i can hear a pitch that high), at a 44.1 KHz sampling rate, than what happens? No aliasing at all?
2010/3/31 Derek Holzer <derek@umatic.nl mailto:derek@umatic.nl>
I was thinking about this the other day.... is it possible to have aliasing with Karplus-Strong? Because it's a delay line, nothing is being played back at any higher rate than it was sampled at, so no aliasing should be possible. Right? Math-gurus correct me if I'm wrong. Otherwise, any signal generator needs to be bandlimited or oversampled: http://en.flossmanuals.net/PureData/Antialiasing http://en.flossmanuals.net/PureData/GeneratingWaveforms Frank Barknecht has some spliced-transition trick he uses as well, I'm sure it will come up in a reply or two on this thread as well... D. On 3/31/10 6:27 PM, Pierre Massat wrote: Hi! I ve been reading the on-going debate about interpolation for a few days, and it just occured to me that i don't how go about avoiding aliasing more generally than with band-limited wavetables. If i wanted to play a sample at a pitch higher than the original, or if i wanted to use a karplus-strong resonator to generate notes, what would be the proper way of ensuring that no aliasing occurs? Do people generally use low-pass filters with a cut-off somewhere below the Nyquist frequency? Or is there a trick that one can use earlier on in the signal path of a patch? -- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 139: "Revaluation (a warm feeling)"
That sounds like a sensible reason why a karplus-strong resonator could not alias. That's good news, although i suppose it isn't new at all to most people on the list... By the way i had read the FLOSS pages before... Thanks Derek!
Pierre
2010/3/31 Derek Holzer derek@umatic.nl
Correct, nothing played back at original sampling rate will alias. If you speed that sample up, then some of the recorded harmonics will go over the Nyquist number and alias.
Please read the page I sent you on aliasing:
http://en.flossmanuals.net/PureData/Antialiasing
and also
http://en.flossmanuals.net/PureData/WhatIsDigitalAudio
Aliasing happens when you try to synthesize or play back a frequency higher than 1/2 the sampling rate (this is called the Nyquist number). In non-sine wave oscillators, it often comes from the highest harmonics. In samples, it comes from playing them back faster than the original sampling rate. It happens at the moment those frequencies are synthesized, and cannot be removed later. Thus the oversampling approach documented in the FLOSS Manual (and taken directly from Miller's Pd manual patches).
A Karplus-Strong resonator is a delay line and as I understand it, so long as no pitch shifting is going on then it can't alias. You would not be able to create a Karplus-Strong resonator at 30KHz unless you have a sampling rate of 60KHz, because the shortest delay time you can get is still one sample (1/44100 of one second at normal sampling rate). Again, math gurus are welcome to correct my calculations.
D.
On 3/31/10 6:39 PM, Pierre Massat wrote:
I m not sure i understand aliasing well... So anything that's sampled and played back without altering the pitch would not suffer from aliasing? When exactly does aliasing occur? during the DAC conversion, or before that? Let's say i set a karplus-strong resonator to a frequency of 30 KHz (assuming i'm a dog and i can hear a pitch that high), at a 44.1 KHz sampling rate, than what happens? No aliasing at all?
2010/3/31 Derek Holzer <derek@umatic.nl mailto:derek@umatic.nl>
I was thinking about this the other day.... is it possible to have aliasing with Karplus-Strong? Because it's a delay line, nothing is being played back at any higher rate than it was sampled at, so no aliasing should be possible. Right? Math-gurus correct me if I'm wrong.
Otherwise, any signal generator needs to be bandlimited or oversampled:
http://en.flossmanuals.net/PureData/Antialiasing http://en.flossmanuals.net/PureData/GeneratingWaveforms
Frank Barknecht has some spliced-transition trick he uses as well, I'm sure it will come up in a reply or two on this thread as well...
D.
On 3/31/10 6:27 PM, Pierre Massat wrote:
Hi! I ve been reading the on-going debate about interpolation for a few days, and it just occured to me that i don't how go about avoiding aliasing more generally than with band-limited wavetables. If i wanted to play a sample at a pitch higher than the original, or if i wanted to use a karplus-strong resonator to generate notes, what would be the proper way of ensuring that no aliasing occurs? Do people generally use low-pass filters with a cut-off somewhere below the Nyquist frequency? Or is there a trick that one can use earlier on in the signal path of a patch?
-- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 139: "Revaluation (a warm feeling)"
-- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 151: "Take away the important parts"
On Wed, Mar 31, 2010 at 06:32:04PM +0200, Derek Holzer wrote:
I was thinking about this the other day.... is it possible to have
aliasing with Karplus-Strong? Because it's a delay line, nothing is
being played back at any higher rate than it was sampled at, so no
aliasing should be possible. Right? Math-gurus correct me if I'm wrong.Otherwise, any signal generator needs to be bandlimited or oversampled:
http://en.flossmanuals.net/PureData/Antialiasing http://en.flossmanuals.net/PureData/GeneratingWaveforms
Frank Barknecht has some spliced-transition trick he uses as well, I'm
sure it will come up in a reply or two on this thread as well...
"My" trick is from Miller's book and also part of the docs shipped with Pd. Just read the last (?, from memory) chapter in the book about classical waveforms for a lot of valuable insight in the aliasing problem.
Frank