[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Question about how tuning works

From: Marcus Weseloh
Subject: Re: [fluid-dev] Question about how tuning works
Date: Mon, 20 Jan 2020 20:15:53 +0100

Hi Forrest,

Am Mo., 20. Jan. 2020 um 04:20 Uhr schrieb Forrest Cahoon
> My hypothesis is that when fluidsynth maps samples to midi note numbers when 
> tuning, it uses samples near the note number being mapped to, perhaps 
> altering the frequency a lot, to get to the desired tuning. I would have 
> instead expected that samples near the desired tuning were used to generate 
> the note, chosen so as to only have to alter the frequency a minimal amount, 
> and that is triggered by the arbitrary MIDI note number it's mapped to (which 
> should play no role in the choice of samples).

Your hypothesis is correct. FluidSynth chooses the sample based on the
MIDI note number and then pitches that sample according to the values
set via the tuning API. As far as I know, there is currently no way to
achieve the behavior you expect, at least not without some external

You could do this mapping of frequencies to fitting notes (and
therefore samples) yourself, though. Create a lookup table of the
normal MIDI note values to their standard frequencies. Then if you
want to hear a sound at 6kHz, lookup up the closest MIDI note number.
Then issue tuning API call for that note, but make sure it's
non-real-time so it doesn't affect any sounding notes. Then send the
note on.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]