forked from mirrors/qmk_userspace
Adds support for Planck Rev 6 (#2666)
* initial files for rev 6 with encoder * music map init, dip scan added * adds ws2812 driver for arm * flesh out dip and encoder support * adds default encoder res * adds default encoder res * start muse implementation * muse working with encoder as control * flip direction * try mouse wheel again * dont break other revs * dont break other revs * conditional autio * pwm ws driver (not working) * update build includes for chibios * update ws2812 driver/config * last commit for glasser code * working example * remove rgb for now * finish up rev6 * working encoder keycodes * add warnings to planck keymaps about the LAYOUT
This commit is contained in:
parent
96cb9f4661
commit
ade22f8e2c
122 changed files with 4141 additions and 688 deletions
|
@ -197,17 +197,26 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
}
|
||||
|
||||
uint8_t note;
|
||||
if (music_mode == MUSIC_MODE_CHROMATIC)
|
||||
note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_GUITAR)
|
||||
note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_VIOLIN)
|
||||
note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_MAJOR)
|
||||
note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row);
|
||||
else
|
||||
note = music_starting_note;
|
||||
uint8_t note = 36;
|
||||
#ifdef MUSIC_MAP
|
||||
if (music_mode == MUSIC_MODE_CHROMATIC) {
|
||||
note = music_starting_note + music_offset + 36 + music_map[record->event.key.row][record->event.key.col];
|
||||
} else {
|
||||
uint8_t position = music_map[record->event.key.row][record->event.key.col];
|
||||
note = music_starting_note + music_offset + 36 + SCALE[position % 12] + (position / 12)*12;
|
||||
}
|
||||
#else
|
||||
if (music_mode == MUSIC_MODE_CHROMATIC)
|
||||
note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_GUITAR)
|
||||
note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_VIOLIN)
|
||||
note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row);
|
||||
else if (music_mode == MUSIC_MODE_MAJOR)
|
||||
note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row);
|
||||
else
|
||||
note = music_starting_note;
|
||||
#endif
|
||||
|
||||
if (record->event.pressed) {
|
||||
music_noteon(note);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue