Make getBendInCents actually return cents

This commit is contained in:
Jean Pierre Cimalando 2020-06-20 15:31:48 +02:00
parent e160e7592c
commit 48de65441b
3 changed files with 3 additions and 4 deletions

View file

@ -1225,6 +1225,5 @@ float sfz::Region::getGainToEffectBus(unsigned number) const noexcept
float sfz::Region::getBendInCents(float bend) const noexcept float sfz::Region::getBendInCents(float bend) const noexcept
{ {
const auto bendInCents = bend > 0.0f ? bend * static_cast<float>(bendUp) : -bend * static_cast<float>(bendDown); return bend > 0.0f ? bend * static_cast<float>(bendUp) : -bend * static_cast<float>(bendDown);
return centsFactor(bendInCents);
} }

View file

@ -197,7 +197,7 @@ struct Region {
*/ */
float velocityCurve(float velocity) const noexcept; float velocityCurve(float velocity) const noexcept;
/** /**
* @brief Get the cents factor for a given bend value between -1 and 1 * @brief Get the detuning in cents for a given bend value between -1 and 1
* *
* @param bend * @param bend
* @return float * @return float

View file

@ -821,7 +821,7 @@ void sfz::Voice::pitchEnvelope(absl::Span<float> pitchSpan) noexcept
const auto events = resources.midiState.getPitchEvents(); const auto events = resources.midiState.getPitchEvents();
const auto bendLambda = [this](float bend) { const auto bendLambda = [this](float bend) {
return region->getBendInCents(bend); return centsFactor(region->getBendInCents(bend));
}; };
if (region->bendStep > 1) if (region->bendStep > 1)