Skip to content

Commit 315d2d8

Browse files
committed
Add TODOs for self
1 parent da87201 commit 315d2d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

firmware/src/gem_oscillator.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ static void calculate_pitch_cv_(struct GemOscillator* osc, struct GemOscillatorI
145145
fix16_t pitch_cv = fix16_add(osc->base_offset, fix16_mul(GEM_CV_INPUT_RANGE, cv));
146146

147147
if (osc->quantize) {
148+
// TODO: Move this code into a function in gem_quantizer.c
149+
// TODO: Add fast variant which just adds/subtracts 1 from bin number
150+
// instead of doing a binary search. This should converge very
151+
// fast anyway, due to moving by a bin per sample, while
152+
// significantly reducing the worst-case runtime
148153
const fix16_t hysteresis = gem_quantizer_config.hysteresis;
149154
const uint32_t notes_len = gem_quantizer_config.notes_len;
150155
const struct GemQuantizerTableEntry* notes = &gem_quantizer_config.notes[0];

0 commit comments

Comments
 (0)