diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-07-24 12:44:03 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-24 12:45:34 -0400 |
commit | cefc09ae7dd88cd6b92412881888404da1abdfcb (patch) | |
tree | d19e222daf3aa1e2a1c7341ace677c5b2a86c770 /quantum/process_keycode | |
parent | a543ad4c1d2c9782b779d63e3eef8d39370441af (diff) | |
download | qmk_firmware-cefc09ae7dd88cd6b92412881888404da1abdfcb.tar.gz |
adds option for alt pitch standards
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r-- | quantum/process_keycode/process_audio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index eb74796fa..32057ae8d 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -6,10 +6,14 @@ #endif 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) { // 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) { |