Re: [linux-audio-dev] How hard is it to write a pitch shifter?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] How hard is it to write a pitch shifter?
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Wed Apr 07 2004 - 08:42:25 EEST


On Wed, 7 Apr 2004 14:29:25 +1000
"Earle" <earle_AT_ezi123.com> wrote:

> But ST doesnt support plugins, and I need to be able to do a "quick and
> dirty" pitchshift on the samples to see if it's gunna fit musically in the
> track.
>
> I tracked down a bit of code in ST that does a simple fade of the currently
> selected data. I want to change this to do a basic pitchshift.

Most tracker style programs do not do real pitch shifting. Real pitch shifting
(tm) modifies the pitch without affecting the playback duration.

Tracker style pitch shifting (which is more accurately called vari-speed) uses
a faster or slower playback speed to vary the pitch. Playing a sample back slower
drops the pitch; faster raises the pitch.

Varispeed, can be very easily implemented using a sample rate converter such
as Secret Rabbit Code :

    http://www.mega-nerd.com/SRC/

In fact, in the examples directory of the source code tarball there is an
example program called varispeed-play.

> But I cant find out how to deal with the missing data that is removed - to
> keep the original length.

Changing the pitch without changing the length is true pitch shifting. The
code and concepts required to do this well is extremely complicated.

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"If you are going to SCO to license superior driver technology,
 you need to reevaluate your product."
  -- Comment about SUN and SCO on Linuxtoday.com


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 07 2004 - 08:45:25 EEST