diff options
author | Jeremy O'Brien <neutral@fastmail.com> | 2023-06-10 11:55:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 11:55:09 -0400 |
commit | c1580b356d16cc49db873b020d72465a5f8b3a45 (patch) | |
tree | e57168f9fab17fadb0f1b2d52fb1cae0f85e9f62 /movement | |
parent | d348482759bcd53cd59b40cdc3930c15f6f9f634 (diff) | |
download | Sensor-Watch-c1580b356d16cc49db873b020d72465a5f8b3a45.tar.gz Sensor-Watch-c1580b356d16cc49db873b020d72465a5f8b3a45.tar.bz2 Sensor-Watch-c1580b356d16cc49db873b020d72465a5f8b3a45.zip |
movement: add custom hourly chime tunes (#209)
* movement: add custom hourly chime tunes
* slightly tweak note timings
* add kim possible ringtone
Diffstat (limited to 'movement')
-rw-r--r-- | movement/movement.c | 4 | ||||
-rw-r--r-- | movement/movement_config.h | 4 | ||||
-rw-r--r-- | movement/movement_custom_signal_tunes.h | 87 |
3 files changed, 92 insertions, 3 deletions
diff --git a/movement/movement.c b/movement/movement.c index 902bc4d5..40247c65 100644 --- a/movement/movement.c +++ b/movement/movement.c @@ -292,9 +292,7 @@ void movement_request_wake() { } void movement_play_signal(void) { - watch_buzzer_play_note(BUZZER_NOTE_C8, 75); - watch_buzzer_play_note(BUZZER_NOTE_REST, 100); - watch_buzzer_play_note(BUZZER_NOTE_C8, 100); + watch_buzzer_play_sequence(signal_tune, NULL); } void movement_play_alarm(void) { diff --git a/movement/movement_config.h b/movement/movement_config.h index 9e446d4d..b1410a8b 100644 --- a/movement/movement_config.h +++ b/movement/movement_config.h @@ -46,4 +46,8 @@ const watch_face_t watch_faces[] = { */ #define MOVEMENT_SECONDARY_FACE_INDEX 0 // or (MOVEMENT_NUM_FACES - 2) +/* Custom hourly chime tune. Check movement_custom_signal_tunes.h for options */ +#define SIGNAL_TUNE_DEFAULT +#include "movement_custom_signal_tunes.h" + #endif // MOVEMENT_CONFIG_H_ diff --git a/movement/movement_custom_signal_tunes.h b/movement/movement_custom_signal_tunes.h new file mode 100644 index 00000000..cc21a5a8 --- /dev/null +++ b/movement/movement_custom_signal_tunes.h @@ -0,0 +1,87 @@ +/* + * MIT License + * + * Copyright (c) 2023 Jeremy O'Brien + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef MOVEMENT_CUSTOM_SIGNAL_TUNES_H_ +#define MOVEMENT_CUSTOM_SIGNAL_TUNES_H_ + +#ifdef SIGNAL_TUNE_DEFAULT +int8_t signal_tune[] = { + BUZZER_NOTE_C8, 5, + BUZZER_NOTE_REST, 6, + BUZZER_NOTE_C8, 5, + 0 +}; +#endif // SIGNAL_TUNE_DEFAULT + +#ifdef SIGNAL_TUNE_ZELDA_SECRET +int8_t signal_tune[] = { + BUZZER_NOTE_G5, 8, + BUZZER_NOTE_F5SHARP_G5FLAT, 8, + BUZZER_NOTE_D5SHARP_E5FLAT, 8, + BUZZER_NOTE_A4, 8, + BUZZER_NOTE_G4SHARP_A4FLAT, 8, + BUZZER_NOTE_E5, 8, + BUZZER_NOTE_G5SHARP_A5FLAT, 8, + BUZZER_NOTE_C6, 20, + 0 +}; +#endif // SIGNAL_TUNE_ZELDA_SECRET + +#ifdef SIGNAL_TUNE_MARIO_THEME +int8_t signal_tune[] = { + BUZZER_NOTE_E6, 7, + BUZZER_NOTE_REST, 2, + BUZZER_NOTE_E6, 7, + BUZZER_NOTE_REST, 10, + BUZZER_NOTE_E6, 7, + BUZZER_NOTE_REST, 11, + BUZZER_NOTE_C6, 7, + BUZZER_NOTE_REST, 1, + BUZZER_NOTE_E6, 7, + BUZZER_NOTE_REST, 10, + BUZZER_NOTE_G6, 8, + BUZZER_NOTE_REST, 30, + BUZZER_NOTE_G5, 8, + 0 +}; +#endif // SIGNAL_TUNE_MARIO_THEME + +#ifdef SIGNAL_TUNE_KIM_POSSIBLE +int8_t signal_tune[] = { + BUZZER_NOTE_G7, 6, + BUZZER_NOTE_REST, 1, + BUZZER_NOTE_G4, 3, + BUZZER_NOTE_REST, 5, + BUZZER_NOTE_G7, 6, + BUZZER_NOTE_REST, 1, + BUZZER_NOTE_G4, 3, + BUZZER_NOTE_REST, 5, + BUZZER_NOTE_A7SHARP_B7FLAT, 6, + BUZZER_NOTE_REST, 2, + BUZZER_NOTE_G7, 6, + 0 +}; +#endif // SIGNAL_TUNE_KIM_POSSIBLE + +#endif // MOVEMENT_CUSTOM_SIGNAL_TUNES_H_ |