Skip to content

Commit

Permalink
Fixed copyAssetToRange
Browse files Browse the repository at this point in the history
  • Loading branch information
crylent committed Jun 4, 2024
1 parent 15a3ef5 commit 6f8c131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/src/main/cpp/instrument/Sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void Sampler::loadSample(int8_t note, vector<uint8_t>& wavData) {
}

void Sampler::copySampleToRange(int8_t baseNote, int8_t min, int8_t max) {
for (int8_t note = min; note <= max && note > 0; note++) {
for (int8_t note = min; note <= max && note >= 0; note++) {
if (note == baseNote) continue;
double ratio = NoteFrequency::get(baseNote) / NoteFrequency::get(note);
resampleAndAssign(mSamples[baseNote], ratio, note);
Expand Down

0 comments on commit 6f8c131

Please sign in to comment.