Commit 55718174 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use floats in unison

detune arithmetic
parent 883a2bbc
......@@ -17,11 +17,11 @@ static uint16_t current_bend;
void mono_set_pitch(void);
const uint8_t detune_factor[NUM_VOICES] = {
10,
-10,
9,
-9,
const float detune_factor[NUM_VOICES] = {
2,
-2,
1,
-1,
};
static uint8_t detune_amount;
......@@ -65,7 +65,7 @@ mono_set_pitch(void)
uint8_t n = l_first(&notes);
for (uint8_t v = 0; v < NUM_VOICES; v++) {
int16_t detune = (detune_factor[v] * detune_amount)/128;
int16_t detune = (detune_factor[v] * detune_amount);
detune += vibrato;
dac_set_note2(v, n, detune, current_bend);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment