[linux-audio-dev] detune

Hans Fugal hans at fugal.net
Sun Jan 15 02:18:23 UTC 2006


On Sun, 15 Jan 2006 at 02:42 +0100, Jens M Andreasen wrote:
> On Sat, 2006-01-14 at 18:21 -0700, Hans Fugal wrote:
> > I'm about to write a DSSI/LADSPA plugin that among other things, detunes
> > the signal by up to 15 cents. My understanding is that detuning is
> > accomplished by resampling. If that's the case, what do you do
> > with the time difference? Do you pad/truncate to get the same number of
> > samples you started out with? Wouldn't that introduce undesirables?
> > 
> 
> Ehrmm ... perhaps I misunderstand you, but the art of resampling is all
> about keeping undesireable results at a minimum.
> 
> If you stretch your input, you'll end up with more samples ...
> But hey ... Could you rephrase the question? 

Happy to. I have no doubt that the resampling part will go smoothly,
just to clarify.

Unless I'm wrong (in which case I'd like to know), resampling
necessarily involves changing the duration if it's played back at the
original sample rate. In big numbers, when I resample 1 second of
44.1KHz audio to 22050Hz, I end up with 22050 samples. That means one
second of 22050Hz audio, or 1/2 second of 44.1KHz audio. This plugin
will take as input a block of n samples and return n samples, but if
downsampling reduces the number of samples, what am I to do with the
extra time? When we're only talking a few cents, there won't be a lot of
samples, but can't even a few 0s result in clicks?

You mentioned stretching, perhaps that's the solution. Is it better to
stretch to the original size after resampling, or to prestretch and then
resample?

If I've got pitch detuning all wrong, I'd like to know that too. :-)

-- 
Hans Fugal ; http://hans.fugal.net
 
There's nothing remarkable about it. All one has to do is hit the 
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20060114/824211d3/attachment.pgp>


More information about the Linux-audio-dev mailing list