|
From: | David Henningsson |
Subject: | Re: [fluid-dev] pitch shifting |
Date: | Mon, 21 Nov 2011 08:57:21 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 11/21/2011 07:30 AM, Michael Geis wrote:
Hi, I am trying to understand how fluidsynth performs pitch shifting when the pitch to be played differs from the rootkey of the sample used to synthesize the sound. To me it looks like this happens in src/rvoice/fluid_rvoice_dsp.c (with another implementation in unused/fluid_dsp_float.c). Are these the right locations or should I be looking somewhere else?
It's in src/rvoice/fluid_rvoice_dsp.c. Unsurprisingly, the code in the "unused" directory is not used. :-)
What is the difference between these approaches? Also, which of the 4 interpolation methods (none, linear, cubic, 7th order) is used by default and why (i.e. what do the performance vs accuracy considerations look like)?
Cubic is used by default. You can change this if you use the "interp" (or "interpc" for an individual channel) command in a FluidSynth shell.
It's a tradeoff between performance and quality: 7th order would give the highest quality, but also the highest CPU consumption. "None" is the fastest, and the lowest quality.
As this is the algorithm that consumes the most time when rendering a song (at least at cubic and 7th order levels), feel free to analyse and suggest optimisations (unless they're too ugly)! :-)
// David
[Prev in Thread] | Current Thread | [Next in Thread] |