{440.0*pow(2.0,(23)/12.0), 8},
{440.0*pow(2.0,(24)/12.0), 8}
};
+float ode_to_joy[][2] = SONG(ODE_TO_JOY);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
case 9:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
- PLAY_NOTE_ARRAY(tone_music, false, 0);
+ init_notes();
+ set_tempo(150);
+ PLAY_NOTE_ARRAY(ode_to_joy, false, .25);
layer_on(_MUSIC);
#endif
}
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
init_notes();
- play_notes(&start_up, false, 0);
+ PLAY_NOTE_ARRAY(start_up, false, 0);
#endif
}
place = 0.0;
}
ICR3 = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)); // Set max to the period
- OCR3A = (int)((((double)F_CPU) / (note_frequency * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
+ OCR3A = (int)((((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
//OCR3A = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) >> 1 * duty_place; // Set compare to half the period
place++;
// if (duty_counter > (frequencies[voice_place] / 500)) {
if (note)
stop_all_notes();
+ notes = true;
notes_pointer = np;
notes_count = n_count;
TCCR3A |= _BV(COM3A1);
#endif
- notes = true;
}
}
if (notes)
stop_all_notes();
+ note = true;
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
TCCR3A |= _BV(COM3A1);
#endif
- note = true;
}
}