From 4bc9a52d1725c30155b9eca42c7b65595d32c1a8 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 18 Nov 2025 16:36:44 +0100 Subject: [PATCH 01/13] Make whistle-in optional in example song --- src/config.ts | 9 ++++++++- src/ui/listen/example-song-player.vue | 12 +++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/config.ts b/src/config.ts index bf4a97810..15e2480b0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -65,6 +65,11 @@ export type Config = { * The default speed to use for tunes that don't specify a separate default speed, in beats per minute. */ defaultSpeed: number; + + /** + * Whether to display a whistle-in block to start the example song on a song's main page. + */ + startSongWithWhistleIn: boolean; }; const config: Config = { @@ -304,7 +309,9 @@ const config: Config = { tuneOfTheYear: "The Roof Is on Fire", - defaultSpeed: 100 + defaultSpeed: 100, + + startSongWithWhistleIn: true, }; // Check some requirements for export so that we don't forget them at some point in the future diff --git a/src/ui/listen/example-song-player.vue b/src/ui/listen/example-song-player.vue index 42289b212..106f9a66a 100644 --- a/src/ui/listen/example-song-player.vue +++ b/src/ui/listen/example-song-player.vue @@ -53,10 +53,12 @@ })); const songParts = computed((): SongParts => { - let i = 1; - const result = { - 0: allInstruments([ "General Breaks", "Whistle in" ]) - } as SongParts; + const result = {} as SongParts; + let i = 0; + if (config.startSongWithWhistleIn) { + result[0] = allInstruments([ "General Breaks", "Whistle in" ]) + let i = 1; + } for(const part of normalizedSong.value) { result[i] = allInstruments([ part.tuneName, part.patternName ], part.instruments); i += part.length / 4; @@ -99,7 +101,7 @@