From 6f8c131006faf6c033213280077ce943d0469b51 Mon Sep 17 00:00:00 2001 From: crylent Maxim Belkovsky Date: Tue, 4 Jun 2024 17:42:26 +0300 Subject: [PATCH] Fixed copyAssetToRange --- library/src/main/cpp/instrument/Sampler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/cpp/instrument/Sampler.cpp b/library/src/main/cpp/instrument/Sampler.cpp index 8257d64..1d1549b 100644 --- a/library/src/main/cpp/instrument/Sampler.cpp +++ b/library/src/main/cpp/instrument/Sampler.cpp @@ -27,7 +27,7 @@ void Sampler::loadSample(int8_t note, vector& 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);