[linux-audio-dev] Tuning

Jan Depner eviltwin69 at cableone.net
Fri Jan 28 23:11:12 UTC 2005


On Fri, 2005-01-28 at 09:52, Alfons Adriaensen wrote:
> On Fri, Jan 28, 2005 at 02:57:31PM +0000, james at dis-dot-dat.net wrote:
>  
> > One thing I haven't been able to replace so far is the Oberheim
> > OB-Tune plug-in.  This was an amazingly useful plug-in that would take
> > an audio input and make sure it stayed in tune.  It worked on guitars,
> > vocals, synths, whatever.
> > ...
> > Is there anything like this out there at the moment for Linux?
> 
> Not that I know.
>  
> > Operate in smallish chunks.  Find the most intense frequency (FFT or
> > such) and decide how far that is from the desired frequency.  Scale
> > accordingly, preferably with as little distortion as possible, so pack
> > and crossfade sections.
> 
> You'll need two algorithms:
> 
> 1. Pitch estimation
> 2. Granular resampling.
> 
> In fact the pitch estimation could be a simplified version of the real
> thing. One common problem with pitch estimators is that they sometimes
> lock to an harmonic or subharmonic of the real pitch. Suppose you allow
> all notes on an equally tempered scale, then the 2nd, 3rd, 4th or 6th
> harmonic will do as well as the fundamental when compared to the nearest
> available note (the fifth would have an error of 0.8%, but it is rather
> unlikely a pitch detector would ever pick it out).
> 
> A windowed FFT with interpolation will work except for low notes where
> you would need a rather long transform, or use the phase information
> from the succesive transforms in order to find the correct frequency.
> 
> Once you have the relative error, a small pitch shift can be made by
> resampling small (25ms) overlapping chunks of the input. A raised cosine
> window with 50 percent overlap will work fine in most cases. To avoid
> some artefacts, add a little random variation to the window positions.
> 
    If you're actually going to do this (argh) take a look at Tom's TAP
Fractal Doubler and use midpoint displacement fractal approximation to
add the randomness.

Jan





More information about the Linux-audio-dev mailing list