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E(_B8 ) ,
}; };
float tone_rs[][2] = { float tone_rs[][2] = {
{440.0*pow(2.0,(59)/12.0), 8}, Q_NOTE(_F8 ) ,
{440.0*pow(2.0,(60)/12.0), 8}, Q_NOTE(_G8 ) ,
{0, 4}, Q_NOTE(_GS8 ) ,
{440.0*pow(2.0,(67)/12.0), 16}, Q_NOTE(_A8 ) ,
{0, 4}, Q_NOTE(_AS8 ) ,
{440.0*pow(2.0,(71)/12.0), 16} Q_NOTE(_B8 ) ,
}; };
float tone_fn[][2] = { float tone_fn[][2] = {
@ -119,23 +221,6 @@ float tone_fn[][2] = {
}; };
#endif #endif
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3)
{
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2))
{
#ifdef AUDIO_ENABLE
println("PlayNotes FN");
play_notes(&tone_fn, 8, false);
#endif
layer_on(layer3);
}
else
{
layer_off(layer3);
}
}
void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order) void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order)
{ {
if (order) if (order)
@ -179,7 +264,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
println("PlayNotes LW"); println("PlayNotes LW");
print_val_hex32(ARRAY_SIZE(tone_lw)); print_val_hex32(ARRAY_SIZE(tone_lw));
play_notes(&tone_lw, 12, false); play_notes(&tone_lw, 96, false);
#endif #endif
layer_on(_LW); layer_on(_LW);
update_tri_layer(_LW, _RS, _FN); update_tri_layer(_LW, _RS, _FN);
@ -209,18 +294,42 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
float start_up[][2] = { float start_up[][2] = {
{440.0*pow(2.0,(67)/12.0), 12}, Q_NOTE(_E4 ) ,
{440.0*pow(2.0,(64)/12.0), 8}, {0,1} ,
{440.0*pow(2.0,(55)/12.0), 8}, Q_NOTE(_E4 ) ,
{440.0*pow(2.0,(60)/12.0), 8}, {0,1} ,
{440.0*pow(2.0,(64)/12.0), 20} Q_NOTE(_F4 ) ,
{0,1} ,
Q_NOTE(_G4 ) ,
{0,1} ,
Q_NOTE(_G4 ) ,
{0,1} ,
Q_NOTE(_F4 ) ,
{0,1} ,
Q_NOTE(_E4 ) ,
{0,1} ,
Q_NOTE(_D4 ) ,
{0,1} ,
Q_NOTE(_C4 ) ,
{0,1} ,
Q_NOTE(_C4 ) ,
{0,1} ,
Q_NOTE(_D4 ) ,
{0,1} ,
Q_NOTE(_E4 ) ,
{0,1} ,
H_NOTE(_E4 ) ,
{0,1} ,
Q_NOTE(_D4 ) ,
{0,1} ,
H_NOTE(_D4 ) ,
}; };
#endif #endif
void matrix_init_user(void) { void matrix_init_user(void) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
init_notes(); init_notes();
play_notes(&start_up, 5, false); play_notes(&start_up, 29, false);
println("Matrix Init"); println("Matrix Init");
#endif #endif
} }