Skip to content

Commit

Permalink
[kyma] Fix sub-octave switch direction
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed May 19, 2023
1 parent 00bfd70 commit 7fe8b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kyma/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ auto audioCallback(daisy::AudioHandle::InputBuffer in, daisy::AudioHandle::Outpu
auto const note = etl::clamp(pitch + voltsPerOctave, 0.0F, 127.0F);
auto const morph = etl::clamp(morphKnob + morphCV, 0.0F, 1.0F);

auto const subOffset = subOctaveToggle.Pressed() ? 24.0F : 12.0F;
auto const subOffset = subOctaveToggle.Pressed() ? 12.0F : 24.0F;
auto const subNoteNumber = etl::clamp(note - subOffset, 0.0F, 127.0F);
auto const subMorph = etl::clamp(subMorphCV, 0.0F, 1.0F);
auto const subGain = etl::audio::mapToRange(subGainCV, 0.0F, 1.0F);
Expand Down Expand Up @@ -94,6 +94,6 @@ auto main() -> int
{
subOctaveToggle.Debounce();
envTriggerButton.Debounce();
patch.SetLed(subOctaveToggle.Pressed());
patch.SetLed(not subOctaveToggle.Pressed());
}
}

0 comments on commit 7fe8b94

Please sign in to comment.