minor cleanup

This commit is contained in:
2025-06-21 22:23:44 -07:00
parent afcda2d911
commit 05b0989f91
2 changed files with 21 additions and 17 deletions

View File

@ -129,25 +129,30 @@ class Channel {
// Calculate and store cv modded values using bipolar mapping. // Calculate and store cv modded values using bipolar mapping.
// Default to base value if not the current CV destination. // Default to base value if not the current CV destination.
cvmod_clock_mod_index = (cv_destination == CV_DEST_MOD) cvmod_clock_mod_index =
? constrain(base_clock_mod_index + map(value, -512, 512, -10, 10), 0, MOD_CHOICE_SIZE - 1) (cv_destination == CV_DEST_MOD)
: base_clock_mod_index; ? constrain(base_clock_mod_index + map(value, -512, 512, -10, 10), 0, MOD_CHOICE_SIZE - 1)
: base_clock_mod_index;
cvmod_probability = (cv_destination == CV_DEST_PROB) cvmod_probability =
? constrain(base_probability + map(value, -512, 512, -50, 50), 0, 100) (cv_destination == CV_DEST_PROB)
: base_probability; ? constrain(base_probability + map(value, -512, 512, -50, 50), 0, 100)
: base_probability;
cvmod_duty_cycle = (cv_destination == CV_DEST_DUTY) cvmod_duty_cycle =
? constrain(base_duty_cycle + map(value, -512, 512, -50, 50), 1, 99) (cv_destination == CV_DEST_DUTY)
: base_duty_cycle; ? constrain(base_duty_cycle + map(value, -512, 512, -50, 50), 1, 99)
: base_duty_cycle;
cvmod_offset = (cv_destination == CV_DEST_OFFSET) cvmod_offset =
? constrain(base_offset + map(value, -512, 512, -50, 50), 0, 99) (cv_destination == CV_DEST_OFFSET)
: base_offset; ? constrain(base_offset + map(value, -512, 512, -50, 50), 0, 99)
: base_offset;
cvmod_swing = (cv_destination == CV_DEST_SWING)
? constrain(base_swing + map(value, -512, 512, -25, 25), 50, 95) cvmod_swing =
: base_swing; (cv_destination == CV_DEST_SWING)
? constrain(base_swing + map(value, -512, 512, -25, 25), 50, 95)
: base_swing;
} }
private: private:

View File

@ -161,7 +161,6 @@ void swingDivisionMark() {
gravity.display.drawBox(56, 4, 4, 4); gravity.display.drawBox(56, 4, 4, 4);
gravity.display.drawBox(57, 5, 2, 2); gravity.display.drawBox(57, 5, 2, 2);
break; break;
} }
} }