Introduce basic Euclidean Rhythm #9

Merged
awonak merged 8 commits from refs/pull/9/head into main 2025-06-30 17:23:56 +00:00
6 changed files with 185 additions and 24 deletions
Showing only changes of commit bdb981dc43 - Show all commits

View File

@ -60,12 +60,39 @@ class Channel {
// Setters (Set the BASE value) // Setters (Set the BASE value)
void setClockMod(int index) { void setClockMod(int index) {
if (index >= 0 && index < MOD_CHOICE_SIZE) base_clock_mod_index = index; base_clock_mod_index = constrain(index, 0, MOD_CHOICE_SIZE - 1);
if (!isCvModActive()) {
cvmod_clock_mod_index = base_clock_mod_index;
} }
void setProbability(int prob) { base_probability = constrain(prob, 0, 100); } }
void setDutyCycle(int duty) { base_duty_cycle = constrain(duty, 1, 99); }
void setOffset(int off) { base_offset = constrain(off, 0, 99); } void setProbability(int prob) {
void setSwing(int val) { base_swing = constrain(val, 50, 95); } base_probability = constrain(prob, 0, 100);
if (!isCvModActive()) {
cvmod_probability = base_probability;
}
}
void setDutyCycle(int duty) {
base_duty_cycle = constrain(duty, 1, 99);
if (!isCvModActive()) {
cvmod_duty_cycle = base_duty_cycle;
}
}
void setOffset(int off) {
base_offset = constrain(off, 0, 99);
if (!isCvModActive()) {
cvmod_offset = base_offset;
}
}
void setSwing(int val) {
base_swing = constrain(val, 50, 95);
if (!isCvModActive()) {
cvmod_swing = base_swing;
}
}
void setCvSource(CvSource source) { cv_source = source; } void setCvSource(CvSource source) { cv_source = source; }
void setCvDestination(CvDestination dest) { cv_destination = dest; } void setCvDestination(CvDestination dest) { cv_destination = dest; }