|
|
@ -6,10 +6,14 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
float voice_change_song[][2] = VOICE_CHANGE_SONG; |
|
|
|
float voice_change_song[][2] = VOICE_CHANGE_SONG; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PITCH_STANDARD_A |
|
|
|
|
|
|
|
#define PITCH_STANDARD_A 440.0f |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
static float compute_freq_for_midi_note(uint8_t note) |
|
|
|
static float compute_freq_for_midi_note(uint8_t note) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
|
|
|
|
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
|
|
|
|
return pow(2.0, (note - 69) / 12.0) * 440.0f; |
|
|
|
return pow(2.0, (note - 69) / 12.0) * PITCH_STANDARD_A; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool process_audio(uint16_t keycode, keyrecord_t *record) { |
|
|
|
bool process_audio(uint16_t keycode, keyrecord_t *record) { |
|
|
|