From dfc21369731bb38c23004ba41c85125797969fe9 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 17 Jul 2026 01:29:18 +0200 Subject: improve beeps a bit --- src/c/config.c | 2 +- src/c/metronome.c | 13 ++----------- src/pkjs/config.json | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/c/config.c b/src/c/config.c index 0791b85..4f8884c 100644 --- a/src/c/config.c +++ b/src/c/config.c @@ -27,7 +27,7 @@ static void config_load_defaults() { configuration.version = CONFIG_VERSION; configuration.bpm = 90; configuration.beats = 4; - configuration.volume = 100; + configuration.volume = 50; configuration.beat_indicators = 0xff; } diff --git a/src/c/metronome.c b/src/c/metronome.c index 58fdf18..14e6ed6 100644 --- a/src/c/metronome.c +++ b/src/c/metronome.c @@ -18,9 +18,6 @@ static AppTimer *beat_timer; #define COLOR_BG_INV GColorBlack #define COLOR_FG GColorBlack -#define NOTE_C4 60 -#define NOTE_C5 72 - static int current_beat = -1; static bool playing = true; @@ -55,14 +52,8 @@ static void metronome_beep() { if (!config_is_indicator_enabled(BEEP) || speaker_is_muted()) { return; } - const SpeakerNote note = { - .midi_note = IS_FIRST_BEAT() ? NOTE_C5 : NOTE_C4, - .waveform = SpeakerWaveformSquare, - .duration_ms = 150, - .velocity = 0, - }; - - speaker_play_notes(¬e, 1, config_get_volume()); + int tone = IS_FIRST_BEAT() ? 880 : 440; + speaker_play_tone(tone, 150, config_get_volume(), SpeakerWaveformSine); #endif } diff --git a/src/pkjs/config.json b/src/pkjs/config.json index d672ea7..7abe349 100644 --- a/src/pkjs/config.json +++ b/src/pkjs/config.json @@ -35,7 +35,7 @@ "type": "slider", "messageKey": "volume", "label": "Volume", - "defaultValue": 100, + "defaultValue": 50, "min": 1, "max": 100, "capabilities": [ -- cgit v1.2.3