summaryrefslogtreecommitdiff
path: root/keyboard/planck/keymap_midi.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-08-29 11:54:38 -0400
committerJack Humbert <jack.humb@gmail.com>2015-08-29 11:54:38 -0400
commit91176d854b8c9e49e88d494ba02c8e9c54fec914 (patch)
treee21a68fbcd4e1d2c9d1b0d0d74d8ab47140d4847 /keyboard/planck/keymap_midi.c
parentd63c2e3995ae464c4266a7bd348ffb2f43cf7377 (diff)
speaker working, midi out
Diffstat (limited to 'keyboard/planck/keymap_midi.c')
-rw-r--r--keyboard/planck/keymap_midi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/keyboard/planck/keymap_midi.c b/keyboard/planck/keymap_midi.c
index a8913dc1d8..ddd8a4b682 100644
--- a/keyboard/planck/keymap_midi.c
+++ b/keyboard/planck/keymap_midi.c
@@ -50,7 +50,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) {
midi_send_noteon(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127);
+ play_note(((double)261.6)*pow(2.0, 2.0)*pow(2.0,SCALE[record->event.key.col]/12.0+(record->event.key.row)), 0xF);
} else {
midi_send_noteoff(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127);
+ stop_note(((double)261.6)*pow(2.0, 2.0)*pow(2.0,SCALE[record->event.key.col]/12.0+(record->event.key.row)));
}
} \ No newline at end of file