Skip to content

Commit

Permalink
Rebase on the new modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfd committed Apr 7, 2020
1 parent 12a8379 commit 7af1951
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sfizz/Region.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ uint64_t sfz::Region::getOffset(Oversampling factor) const noexcept
std::uniform_int_distribution<int64_t> offsetDistribution { 0, offsetRandom };
uint64_t finalOffset = offset + offsetDistribution(Random::randomGenerator);
for (const auto& mod: offsetCC)
finalOffset += static_cast<uint64_t>(mod.value * midiState.getCCValue(mod.cc));
finalOffset += static_cast<uint64_t>(mod.data * midiState.getCCValue(mod.cc));
return Default::offsetCCRange.clamp(offset + offsetDistribution(Random::randomGenerator)) * static_cast<uint64_t>(factor);
}

Expand Down
2 changes: 1 addition & 1 deletion src/sfizz/Synth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ bool sfz::Synth::loadSfzFile(const fs::path& file)
const auto maxOffset = [region]() {
uint64_t sumOffsetCC = region->offset + region->offsetRandom;
for (const auto& offsets: region->offsetCC)
sumOffsetCC += offsets.value;
sumOffsetCC += offsets.data;
return Default::offsetCCRange.clamp(sumOffsetCC);
}();

Expand Down

0 comments on commit 7af1951

Please sign in to comment.