Make getBendInCents actually return cents
This commit is contained in:
parent
e160e7592c
commit
48de65441b
3 changed files with 3 additions and 4 deletions
|
|
@ -1225,6 +1225,5 @@ float sfz::Region::getGainToEffectBus(unsigned number) 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 centsFactor(bendInCents);
|
||||
return bend > 0.0f ? bend * static_cast<float>(bendUp) : -bend * static_cast<float>(bendDown);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ struct Region {
|
|||
*/
|
||||
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
|
||||
* @return float
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ void sfz::Voice::pitchEnvelope(absl::Span<float> pitchSpan) noexcept
|
|||
|
||||
const auto events = resources.midiState.getPitchEvents();
|
||||
const auto bendLambda = [this](float bend) {
|
||||
return region->getBendInCents(bend);
|
||||
return centsFactor(region->getBendInCents(bend));
|
||||
};
|
||||
|
||||
if (region->bendStep > 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue