muse working with encoder as control
This commit is contained in:
parent
edb4460e64
commit
e0e5efbead
8 changed files with 210 additions and 51 deletions
|
@ -10,7 +10,7 @@ float voice_change_song[][2] = VOICE_CHANGE_SONG;
|
|||
#define PITCH_STANDARD_A 440.0f
|
||||
#endif
|
||||
|
||||
static float compute_freq_for_midi_note(uint8_t note)
|
||||
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) * PITCH_STANDARD_A;
|
||||
|
@ -65,4 +65,4 @@ void process_audio_all_notes_off(void) {
|
|||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void audio_on_user() {}
|
||||
void audio_on_user() {}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef PROCESS_AUDIO_H
|
||||
#define PROCESS_AUDIO_H
|
||||
|
||||
float compute_freq_for_midi_note(uint8_t note);
|
||||
|
||||
bool process_audio(uint16_t keycode, keyrecord_t *record);
|
||||
void process_audio_noteon(uint8_t note);
|
||||
void process_audio_noteoff(uint8_t note);
|
||||
|
@ -8,4 +10,4 @@ void process_audio_all_notes_off(void);
|
|||
|
||||
void audio_on_user(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue