weixin_39987138 2020-11-20 21:02
浏览 0

Incorrect Pitch When Alternate Values Used for “Scale Tune”

Originally created by: Mr_Bumpy

The pitch of samples scaled with an alternate "scale tune" setting should have their pitch calculated based on their root key instead of middle-C. This file contains a test SoundFont and audio examples, as well as more details on the bug.

From the included documentation:

The SoundFont “Scale Tune” feature allows the distance between notes to be less than a full half-step (0-100 cents). A scale tune setting of 0 means that every note is the same pitch, and this is the setting used for my tests. I have noticed that while the Creative sound cards calculate the resulting pitch based on the root key assigned to the sample, FluidSynth seems to always calculate based on middle C (note 60). This causes FluidSynth to play many non-pitched presets such as sound effects at the wrong pitch.

The sample used for patches 4 and 5 is of a synth playing a high F#.
Patch 4 (scale tune rk90) has the sample's root key set to note 90 (three F#'s above middle C). With scale tune set to 0, the Audigy plays all notes as a high F#, whereas FluidSynth plays all notes as middle C.

Patch 5 (scale tune rk60) has the sample's root key set to note 60 (middle C). With scale tune set to 0, both the Audigy and FluidSynth play all notes as a high F#.

Reported by: *anonymous

Original Ticket: fluidsynth/tickets/26

该提问来源于开源项目:FluidSynth/fluidsynth

  • 写回答

6条回答 默认 最新

  • weixin_39987138 2020-11-20 21:02
    关注

    Original comment author: diwic

    I think I've found the source of this bug, in fluid_voice.c around row 920, it says:

    • Note about SCALETUNE: SF2.01 8.1.3 says, that this generator is a
    • non-realtime parameter. So we don't allow modulation (as opposed
    • to _GEN(voice, GEN_SCALETUNE) When the scale tuning is varied,
    • one key remains fixed. Here C3 (MIDI number 60) is used.

    So we need to change C3/60 to something else; if I could just figure out what...

    Original comment by: elementgreen

    评论

报告相同问题?