Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
chore: the Karaoke name is used throughout the app and docs
My-Name-Is-Jeff4aa3f9b53074
diff --git a/docs/tweaks.md b/docs/tweaks.mdindex 3cef7cac..bef3b894 100644--- a/docs/tweaks.md+++ b/docs/tweaks.md@@ -174,7 +174,7 @@ Shared:per unit (its own mixer, sample time, largest slice and formats; AudioOutputUnitStop andAudioComponentInstanceDispose rebound too, a disposed unit forgotten after its render in progress)and names one the music's (SGPlayerMusicOutput), the one Spotify started or connected last, or- one with sound when that one has had none for a second; speed and pitch, Sing's stage, the audio+ one with sound when that one has had none for a second; speed and pitch, Karaoke's stage, the audioeffects and Music Haptics follow it (SGPlayerWatchMusicOutput), and the other plays as Spotifymade it. A connection whose formats the callback cannot take (not float with a buffer per channel,more than two channels, or a mixer at another rate than the unit) gets Spotify's own connection@@ -228,8 +228,8 @@ Shared:never touched. Checked on the Mac by `harness/audio-effects/build.sh route`.Tested on the Mac against harness/audio-effects/ and harness/autoeq/, the hook in the simulatoragainst its sim/, the page against harness/audio-effects-page/- Sing/ Sing, a song's vocals turned down while it plays (Sing.h lists its files): the voice model (Mel-Band- RoFormer, MIT, from Hugging Face) downloaded and checked file by file over Wi-Fi unless cellular is allowed,+ Sing/ Karaoke (Sing in the code and its keys), a song's vocals turned down while it plays (Sing.h lists+ its files): the voice model (Mel-Band RoFormer, MIT, from Hugging Face) downloaded and checked file by file over Wi-Fi unless cellular is allowed,a stop keeping what came in for the next download to carry on from; loaded only while Spotify is active(SGSingLoader.m), a CPU copy first and warmed, then a faster one beside it for the foreground, each loadwith a deadline and kept a minute after the mic goes off; the STFT around it on Accelerate,@@ -244,7 +244,7 @@ Shared:standing aside), the engine plays the lead it holds on as it is, dry, the clock still corrected, so nopart of the song is skipped; it lets it go at a pause, where Sing.x seeks Spotify back to what washeard, or with a seek, a skip or the output stopping, and builds one only when it separates. From the- thermal state Serious up Sing is held and lets the model go,+ thermal state Serious up Karaoke is held and lets the model go,unless Ignore heat warnings is on, and runs again at Fair. Spatialvoice holds the separated vocals in front as the head turns: HeadGestures' motion gives the yaw off afront that follows the head over 20 s, and the render thread pans the vocals' middle at equal power,@@ -284,7 +284,7 @@ Shared:what landed, with Redo last; the threshold kept is the one that fires on all five but one at least, the nodstored before the shakes begin, so Cancel keeps it. Forget shows only while something is learned.The one CMHeadphoneMotionManager is lent to other features- (SGHeadMotionListen: Sing's spatial voice), and runs for them with the switch off, the detector then+ (SGHeadMotionListen: Karaoke's spatial voice), and runs for them with the switch off, the detector thenunfed. The detector istested on the Mac against harness/head-gestures/, the hook and the page in the simulator against its sim/LiveActivity/ a Live Activity on the lock screen and in the Dynamic Island in one of three views, the line being@@ -303,12 +303,12 @@ Shared:while suspended, Spotify cannot end it, so each state goes stale a minute on (an unchanged card issent again every 20 s) and a launch ends any left over before it starts a new one. The same foldergives Siri, the Shortcuts app and the Action button Like This Song, Play or Pause, Next and Previous- Track, Sing and Sleep Timer (AppShortcuts.swift lists them as Spotify's App Shortcuts), and iOS 18- controls for Control Center and the lock screen of Like, Sing and the sleep timer- (extension/LiveActivity/Controls.swift), buttons, as the extension cannot read Sing's state. Each is+ Track, Karaoke and Sleep Timer (AppShortcuts.swift lists them as Spotify's App Shortcuts), and iOS 18+ controls for Control Center and the lock screen of Like, Karaoke and the sleep timer+ (extension/LiveActivity/Controls.swift), buttons, as the extension cannot read Karaoke's state. Each isa LiveActivityIntent or AudioPlaybackIntent, so it runs inside Spotify, launched in the backgroundwhen needed, and LiveActivity.x answers it with the activity on or off, Like through- HeadGestures.x's collection platform and Sing through SGSetSingOn; the sleep timer (15 min, 30 min,+ HeadGestures.x's collection platform and Karaoke through SGSetSingOn; the sleep timer (15 min, 30 min,1 hour, End of track, End of album or Off) is the card's own, Player/SleepTimer.m, which keeps itsown clock with the activity off. The intent asks again for 8 s while the player is not up,then tells Siri to open Spotify. Checked in the simulator against harness/shortcuts/@@ -525,7 +525,7 @@ setting by the part of Spotify it changes, so a part's glass, its hide switchesone page, the mod's own rows first and Spotify's flags below them or on a sub page named after whatthey change. Its main page groups the rows by what they are, in cards with no headings as Settings has its own,under the signing and environment warnings: Redesigned UI, Appearance and Tab bar; Player, Lyrics and Albums &-artists (Home & Library in the native look); Sing, Spatial voice (where the iPhone reads headphone motion), Audio+artists (Home & Library in the native look); Karaoke, Spatial voice (where the iPhone reads headphone motion), Audioeffects, Vibrations, Live Activity, AirPods gestures and Listening stats; Lock screen and Premium, ads & privacy; Labs and All flags; Mod. It is checked in the simulatoragainst harness/mod-settings/. The Appearance page has, in the native look, AMOLED (the redesign is always black), then the stored look's Accent colourpreset, a pull-down of Spotify, Apple Music and Custom read off the colour stored (a colour set before the presets@@ -540,17 +540,17 @@ it changes, and flipping it offers to restart Spotify. The pages show only whatafter flipping the switch already shows what the restart will bring, and the main page swaps Home & Library andAlbums & artists as it is flipped. Tab bar: the tab editor of the stored look, each withits own list of tabs. Lyrics, on the main page of its own: in the redesign a live preview of the lyrics first, with the presets of their look-under it and their sliders in a sheet (Text size, Line spacing, Blur, Glow, Wave), applying at once; then Sing, then the ordered list of lyrics sources,+under it and their sliders in a sheet (Text size, Line spacing, Blur, Glow, Wave), applying at once; then Karaoke, then the ordered list of lyrics sources,lyrics for every track, naming the source in the redesign, the lock screen, and glass lyrics in the native look; inthe redesign also which of the lyrics, their pronunciation and their translation is set largest, Romanised lyrics-(applied at once), and the translation's language. Sing, under either look, on the main page and as Lyrics' first row, the row reading out On,-Off or how far the voice model's download has come, kept up to date while the page shows: Sing's switch, which turns-the mic on and off at once, a card at its top (SGSingCard.m: the song, what Sing is doing, a tap saying more, the vocals+(applied at once), and the translation's language. Karaoke, under either look, on the main page and as Lyrics' first row, the row reading out On,+Off or how far the voice model's download has come, kept up to date while the page shows: Karaoke's switch, which turns+the mic on and off at once, a card at its top (SGSingCard.m: the song, what Karaoke is doing, a tap saying more, the vocalsand the rest traced live from the engine's loudness, still under Reduce Motion, play and pause, and a tall Vocals sliderfrom gone through as sung to the vocals alone, with Sing along, Original and Vocals only under it), Spatial voice(where the iPhone reads headphone motion; a page of its own, reading out On or Off, with a live preview at its top thatfollows the head through AirPods, or sways gently without them and holds still under Reduce Motion, a line under it-saying which, then the switch; its row is on the main page too, under Sing's), the voice model's download (Paused and+saying which, then the switch; its row is on the main page too, under Karaoke's), the voice model's download (Paused andChecking among its states) and its removal, Ignore heat warnings, and under Advanced Runs on (Automatic, CPU only, GPU,Neural Engine, GPU and Neural Engine: the faster copy's), all applying straight away. Lock screen, on the mainpage under either look, opens the lock screen widget's page, titled Lock screen (Moving artwork, Lyrics or Every song, and the lyrics' style,diff --git a/extension/LiveActivity/Controls.swift b/extension/LiveActivity/Controls.swiftindex 5070f83a..9e97bedb 100644--- a/extension/LiveActivity/Controls.swift+++ b/extension/LiveActivity/Controls.swift@@ -28,12 +28,12 @@ struct SGSingControl: ControlWidget {var body: some ControlWidgetConfiguration {StaticControlConfiguration(kind: "spotifyglass.control.sing") {ControlWidgetButton(action: SGSingIntent(.toggle)) {- Label("Sing", systemImage: "music.mic")- .controlWidgetActionHint("Turn Sing On or Off")+ Label("Karaoke", systemImage: "music.mic")+ .controlWidgetActionHint("Turn Karaoke On or Off")}.tint(green)}- .displayName("Sing")+ .displayName("Karaoke").description("Turns the vocals down in Spotify so you can sing along, or brings them back.")}}diff --git a/harness/shortcuts/README.md b/harness/shortcuts/README.mdindex 90dce29e..8a9a9aa7 100644--- a/harness/shortcuts/README.md+++ b/harness/shortcuts/README.md@@ -5,7 +5,7 @@ for real in the simulator against `observer.m`, a stand-in for `LiveActivity.x`'registered the same way:- Like with the player not up for three posts: asked again every 250 ms and done on the fourth.-- Sing on refused: thrown at once, the message read out as the observer wrote it.+- Karaoke on refused: thrown at once, the message read out as the observer wrote it.- Sleep timer, Next and Play or pause: each answered on the first post.- Sleep timer at End of album: posted as `timer:album`, the Live Activity's own action.- Previous never answered: given up after 32 posts, about 8 s, with "Spotify isn't ready yet".diff --git a/harness/shortcuts/main.swift b/harness/shortcuts/main.swiftindex 062bc59b..8cb05d9d 100644--- a/harness/shortcuts/main.swift+++ b/harness/shortcuts/main.swift@@ -28,7 +28,7 @@ struct Harness {_ = try await SGSingIntent(.on).perform()check(false, "sing:on should fail")} catch let error as SGShortcutError {- check(error.message == "Sing needs its voice model." && SGHarnessPosts == 1, "a failure is thrown at once with its message")+ check(error.message == "Karaoke needs its voice model." && SGHarnessPosts == 1, "a failure is thrown at once with its message")check(String(localized: error.localizedStringResource) == error.message, "the message reads out as it is")} catch {check(false, "sing threw \(error)")diff --git a/harness/shortcuts/observer.m b/harness/shortcuts/observer.mindex fd776996..4cedd4b3 100644--- a/harness/shortcuts/observer.m+++ b/harness/shortcuts/observer.m@@ -19,7 +19,7 @@ void SGHarnessObserve(NSInteger waitPosts) {static NSInteger total;// The player not up for the first posts: no answer, as runShortcut gives none without a track.if (++total <= waitPosts ||[action isEqualToString:@"previous"]) return;- if ([action isEqualToString:@"sing:on"]) reply[@"failed"] = @"Sing needs its voice model.";+ if ([action isEqualToString:@"sing:on"]) reply[@"failed"] = @"Karaoke needs its voice model.";else reply[@"said"] = [action isEqualToString:@"like"] ? @"Added Song to Liked Songs." : @"";}];}diff --git a/harness/sing/button/sing-stubs.m b/harness/sing/button/sing-stubs.mindex 73e6cf67..27dfbdd1 100644--- a/harness/sing/button/sing-stubs.m+++ b/harness/sing/button/sing-stubs.m@@ -26,7 +26,7 @@ NSString *SGSingStatusText(void) {}NSString *SGSingStatusDetail(void) { return SGSingStatusText(); }-NSString *SGSingMissing(void) { return @"Sing needs iOS 18, the first its voice model runs on."; }+NSString *SGSingMissing(void) { return @"Karaoke needs iOS 18, the first its voice model runs on."; }BOOL SGSingOn(void) { return SGSingCurrentState() >= SGSingStatePreparing; }void SGSetSingOn(BOOL on) {diff --git a/harness/spatial-page/stubs.m b/harness/spatial-page/stubs.mindex 1104793c..29bb92fe 100644--- a/harness/spatial-page/stubs.m+++ b/harness/spatial-page/stubs.m@@ -23,7 +23,7 @@ NSString *SGSingStatusText(void) {NSString *SGSingStatusDetail(void) {SGSingState state = SGSingCurrentState();return state == SGSingStateFailed ? @"The voice model did not load in 120 s, so that load was given up. Switch Sing off and on again to try again."- : state == SGSingStateSinging ? @"Sing runs on the GPU while Spotify is open, and on the CPU in the background." : nil;+ : state == SGSingStateSinging ? @"Karaoke runs on the GPU while Spotify is open, and on the CPU in the background." : nil;}NSString *SGSingMissing(void) { return nil; }BOOL SGSingOn(void) { return SGHidden(SGKeySing); }diff --git a/tweak/Sources/App/About/Licenses.m b/tweak/Sources/App/About/Licenses.mindex 653c6bbb..83b5a259 100644--- a/tweak/Sources/App/About/Licenses.m+++ b/tweak/Sources/App/About/Licenses.m@@ -38,7 +38,7 @@ UIViewController *SGLicensesPage(void) {// Not shipped: the Headphones page downloads its results when asked, but they are AutoEq's work all the same.SGModRow *autoEq = SGLinkRow(@"AutoEq", @"Headphone corrections · MIT License", @"https://github.com/jaakkopasanen/AutoEq");// Sing's voice model is downloaded rather than built in, and its NOTICE travels with it here all the same.- SGModRow *voice = SGLinkRow(@"Sing's voice model", @"Mel-Band RoFormer · MIT License", @"https://huggingface.co/My-Name-Is-Jeff/vitrine-sing");+ SGModRow *voice = SGLinkRow(@"Karaoke's voice model", @"Mel-Band RoFormer · MIT License", @"https://huggingface.co/My-Name-Is-Jeff/vitrine-sing");return [[SGModPage alloc] initWithTitle:@"Licenses" intro:@"The mod's own license, and the code from others it includes." sections:@[SGSection(nil, @[mod]),SGNotedSection(nil, @[eevee], @"By whoeevee (whoeevee/EeveeSpotify), under the GNU General Public License v3.0, as Vitrine is.\n\n"diff --git a/tweak/Sources/App/ModSettings.x b/tweak/Sources/App/ModSettings.xindex f24c8206..cc507966 100644--- a/tweak/Sources/App/ModSettings.x+++ b/tweak/Sources/App/ModSettings.x@@ -78,7 +78,7 @@ static UIViewController *modSettingsPage(void) {// Sing and the audio effects work on the sound, so both looks have them, each saying beside the chevron// whether it is on, how far Sing's voice model has come or how many effects are on.- SGModRow *sing = pageRow(@"Sing", @"music.mic", UIColor.systemRedColor, ^UIViewController *{ return SGSingSettingsPage(); });+ SGModRow *sing = pageRow(@"Karaoke", @"music.mic", UIColor.systemRedColor, ^UIViewController *{ return SGSingSettingsPage(); });sing.value = ^NSString *{ return SGSingSummary(); };SGModRow *audioEffects = pageRow(@"Audio effects", @"slider.vertical.3", UIColor.systemOrangeColor, ^UIViewController *{ return SGDSPSettingsPage(); });audioEffects.value = ^NSString *{ return SGDSPSummary(); };diff --git a/tweak/Sources/App/Pages.m b/tweak/Sources/App/Pages.mindex 706c8ada..7c69980c 100644--- a/tweak/Sources/App/Pages.m+++ b/tweak/Sources/App/Pages.m@@ -107,7 +107,7 @@ static UIViewController *lyricsPage(void) {BOOL redesigned = SGRedesignedUIStored();NSMutableArray<SGModRow *> *more = [NSMutableArray arrayWithObject:SGLockScreenLyricsRow()];if (!redesigned) [more insertObject:SGGlassLyricsRow() atIndex:0];- SGModRow *sing = SGPageRow(@"Sing", ^UIViewController *{ return SGSingSettingsPage(); });+ SGModRow *sing = SGPageRow(@"Karaoke", ^UIViewController *{ return SGSingSettingsPage(); });sing.value = ^NSString *{ return SGSingSummary(); };NSMutableArray<SGModSection *> *sections = [NSMutableArray arrayWithObjects:SGSection(nil, @[SGWithTile(sing, @"music.mic", UIColor.systemRedColor)]),SGLyricsSourcesSection(redesigned), nil];diff --git a/tweak/Sources/Redesigned/Lyrics/SGRSingButton.m b/tweak/Sources/Redesigned/Lyrics/SGRSingButton.mindex fa1eebee..1cbeff3f 100644--- a/tweak/Sources/Redesigned/Lyrics/SGRSingButton.m+++ b/tweak/Sources/Redesigned/Lyrics/SGRSingButton.m@@ -52,7 +52,7 @@ static char kButtonGlassKey, kPanelGlassKey;// VoiceOver has the mic itself as one adjustable button: the slider shows only for a held finger and// goes again on a timer, which a swipe up or down never holds open.self.isAccessibilityElement = YES;- self.accessibilityLabel = @"Sing";+ self.accessibilityLabel = @"Karaoke";self.accessibilityHint = @"Turns the vocals down";self.accessibilityTraits = UIAccessibilityTraitButton | UIAccessibilityTraitAdjustable;@@ -218,7 +218,7 @@ static char kButtonGlassKey, kPanelGlassKey;#pragma mark - the tapstatic void tell(NSString *message, NSString *action, void (^then)(void)) {- UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Sing" message:message preferredStyle:UIAlertControllerStyleAlert];+ UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Karaoke" message:message preferredStyle:UIAlertControllerStyleAlert];// Over the player, which is dark whatever the system's appearance.alert.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;if (action) [alert addAction:[UIAlertAction actionWithTitle:action style:UIAlertActionStyleDefault handler:^(UIAlertAction *a) { then(); }]];@@ -232,7 +232,7 @@ static void tell(NSString *message, NSString *action, void (^then)(void)) {tell(SGSingMissing(), nil, nil);return;case SGSingStateNoModel:- tell([NSString stringWithFormat:@"Sing turns the vocals down with a voice model that runs on this iPhone. Download it now (%@)? It is best over Wi-Fi.%@",+ tell([NSString stringWithFormat:@"Karaoke turns the vocals down with a voice model that runs on this iPhone. Download it now (%@)? It is best over Wi-Fi.%@",SGSingModelSizeText(), SGSingModelError() ? [NSString stringWithFormat:@"\n\nThe last try failed: %@", SGSingModelError()] : @""],@"Download", ^{SGSingDownloadModel();@@ -244,7 +244,7 @@ static void tell(NSString *message, NSString *action, void (^then)(void)) {tell(SGSingStatusDetail(), @"Stop the download", ^{ SGSingCancelModelDownload(); });return;case SGSingStateFailed:- tell(SGSingStatusDetail(), @"Turn Sing off", ^{ SGSetSingOn(NO); });+ tell(SGSingStatusDetail(), @"Turn Karaoke off", ^{ SGSetSingOn(NO); });return;default:SGSetSingOn(!SGSingOn());diff --git a/tweak/Sources/Shared/LiveActivity/AppShortcuts.swift b/tweak/Sources/Shared/LiveActivity/AppShortcuts.swiftindex 17a75f5c..f6d238ec 100644--- a/tweak/Sources/Shared/LiveActivity/AppShortcuts.swift+++ b/tweak/Sources/Shared/LiveActivity/AppShortcuts.swift@@ -23,9 +23,9 @@ struct SGAppShortcuts: AppShortcutsProvider {"Previous track in \(.applicationName)",], shortTitle: "Previous Track", systemImageName: "backward")AppShortcut(intent: SGSingIntent(), phrases: [- "\(\.$mode) Sing in \(.applicationName)",+ "\(\.$mode) Karaoke in \(.applicationName)","Sing along in \(.applicationName)",- ], shortTitle: "Sing", systemImageName: "music.mic")+ ], shortTitle: "Karaoke", systemImageName: "music.mic")AppShortcut(intent: SGSleepTimerIntent(), phrases: ["Set a sleep timer in \(.applicationName)","Sleep timer \(\.$length) in \(.applicationName)",diff --git a/tweak/Sources/Shared/LiveActivity/LiveActivity.x b/tweak/Sources/Shared/LiveActivity/LiveActivity.xindex 9382727e..1050d3aa 100644--- a/tweak/Sources/Shared/LiveActivity/LiveActivity.x+++ b/tweak/Sources/Shared/LiveActivity/LiveActivity.x@@ -374,7 +374,7 @@ static void runShortcut(NSString *action, NSMutableDictionary *reply) API_AVAILAreply[@"failed"] = missing;} else {if (on != SGSingOn()) SGSetSingOn(on);- reply[@"said"] = on ? @"Sing is on." : @"Sing is off.";+ reply[@"said"] = on ? @"Karaoke is on." : @"Karaoke is off.";}} else if (!title.length) {SGLog(@"shortcut: %@ waits for the player", action);diff --git a/tweak/Sources/Shared/LiveActivity/LiveActivityShared.swift b/tweak/Sources/Shared/LiveActivity/LiveActivityShared.swiftindex a7cc8c36..3fae1c4f 100644--- a/tweak/Sources/Shared/LiveActivity/LiveActivityShared.swift+++ b/tweak/Sources/Shared/LiveActivity/LiveActivityShared.swift@@ -160,7 +160,7 @@ enum SGSleepTimerLength: String, AppEnum {enum SGSingMode: String, AppEnum {case toggle, on, off- static let typeDisplayRepresentation: TypeDisplayRepresentation = "Sing"+ static let typeDisplayRepresentation: TypeDisplayRepresentation = "Karaoke"static let caseDisplayRepresentations: [SGSingMode: DisplayRepresentation] = [.toggle: "Toggle",.on: "Turn On",@@ -221,10 +221,10 @@ struct SGPreviousTrackIntent: AudioPlaybackIntent {@available(iOS 17.0, *)struct SGSingIntent: LiveActivityIntent {- static let title: LocalizedStringResource = "Sing"+ static let title: LocalizedStringResource = "Karaoke"static let description = IntentDescription("Turns the vocals down in Spotify so you can sing along, or brings them back.")- @Parameter(title: "Sing", default: .toggle)+ @Parameter(title: "Karaoke", default: .toggle)var mode: SGSingModeinit() {}@@ -234,7 +234,7 @@ struct SGSingIntent: LiveActivityIntent {}static var parameterSummary: some ParameterSummary {- Summary("\(\.$mode) Sing")+ Summary("\(\.$mode) Karaoke")}func perform() async throws -> some IntentResult & ProvidesDialog {diff --git a/tweak/Sources/Shared/Sing/SGSingCard.m b/tweak/Sources/Shared/Sing/SGSingCard.mindex d136ac3b..c108c02a 100644--- a/tweak/Sources/Shared/Sing/SGSingCard.m+++ b/tweak/Sources/Shared/Sing/SGSingCard.m@@ -286,7 +286,7 @@ static CGFloat height(float rms) {_shown = SGShownTrackNow();}NSString *title = _shown.title ?: @"Not Playing";- NSString *artist = _shown ? _shown.artist ?: @"" : @"Play a song to hear Sing";+ NSString *artist = _shown ? _shown.artist ?: @"" : @"Play a song to hear Karaoke";_title.text = title;_artist.text = artist;SGSingState state = SGSingCurrentState();@@ -316,8 +316,8 @@ static CGFloat height(float rms) {if (_stops.selectedSegmentIndex != stop) _stops.selectedSegmentIndex = stop;_song.accessibilityLabel = _shown.artist.length ? [NSString stringWithFormat:@"%@, %@", title, artist] : title;- _song.accessibilityValue = [NSString stringWithFormat:@"Sing: %@. Vocals: %@", SGSingStatusText(), SGSingLevelText(level)];- _song.accessibilityHint = SGSingStatusDetail() ? @"Double-tap for more about Sing's state." : nil;+ _song.accessibilityValue = [NSString stringWithFormat:@"Karaoke: %@. Vocals: %@", SGSingStatusText(), SGSingLevelText(level)];+ _song.accessibilityHint = SGSingStatusDetail() ? @"Double-tap for more about Karaoke's state." : nil;_song.accessibilityTraits = SGSingStatusDetail() ? UIAccessibilityTraitButton : UIAccessibilityTraitStaticText;_song.accessibilityFrameInContainerSpace = CGRectMake(0, 0, CGRectGetMinX(_column.frame), CGRectGetMinY(_play.frame));}@@ -431,7 +431,7 @@ static CGFloat height(float rms) {- (void)explainState {NSString *detail = SGSingStatusDetail();if (!detail) return;- UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Sing" message:detail preferredStyle:UIAlertControllerStyleAlert];+ UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Karaoke" message:detail preferredStyle:UIAlertControllerStyleAlert];if (SGSingCurrentState() == SGSingStateFailed) {[alert addAction:[UIAlertAction actionWithTitle:@"Try again" style:UIAlertActionStyleDefault handler:^(UIAlertAction *a) {SGSetSingOn(NO);diff --git a/tweak/Sources/Shared/Sing/SGSingLoader.m b/tweak/Sources/Shared/Sing/SGSingLoader.mindex 98cfed5a..5889a462 100644--- a/tweak/Sources/Shared/Sing/SGSingLoader.m+++ b/tweak/Sources/Shared/Sing/SGSingLoader.m@@ -169,7 +169,7 @@ static void startCPU(void) {sg_state = SGSingLoaderReady;} else {sg_state = SGSingLoaderFailed;- sg_error = model ? @"Sing could not set aside memory for the voice model."+ sg_error = model ? @"Karaoke could not set aside memory for the voice model.": [NSString stringWithFormat:@"The voice model did not load: %@", error.localizedDescription ?: @"Core ML gave no reason."];}changed();diff --git a/tweak/Sources/Shared/Sing/SGSingModel.m b/tweak/Sources/Shared/Sing/SGSingModel.mindex 482f58cd..f208cf2d 100644--- a/tweak/Sources/Shared/Sing/SGSingModel.m+++ b/tweak/Sources/Shared/Sing/SGSingModel.m@@ -264,7 +264,7 @@ static BOOL sg_checking; // the weights' checksum is being readSGLog(@"sing: %@ came in, %ld, %lld bytes", file.path, (long)status, size);if (!answered || size != file.size || ![hash isEqualToString:@(file.sha256)]) {self.error = !answered ? [NSString stringWithFormat:@"The server answered %ld for %@", (long)status, file.path]- : [NSString stringWithFormat:@"%@ is not the file Sing expects (%lld bytes%@)", file.path, size, hash ? @", another checksum" : @""];+ : [NSString stringWithFormat:@"%@ is not the file Karaoke expects (%lld bytes%@)", file.path, size, hash ? @", another checksum" : @""];return;}NSURL *target = [stagingFolder() URLByAppendingPathComponent:file.path];diff --git a/tweak/Sources/Shared/Sing/SGSingSeparator.m b/tweak/Sources/Shared/Sing/SGSingSeparator.mindex e8e84f7a..e18d94eb 100644--- a/tweak/Sources/Shared/Sing/SGSingSeparator.m+++ b/tweak/Sources/Shared/Sing/SGSingSeparator.m@@ -209,7 +209,7 @@ static BOOL predict(MLModel *model, MLDictionaryFeatureProvider *features, floatid<MLFeatureProvider> result = [model predictionFromFeatures:features error:error];MLMultiArray *output = [result featureValueForName:kOutput].multiArrayValue;if (output && readOutput(output, into)) return YES;- if (error && !*error) *error = [NSError errorWithDomain:@"SGSing" code:1 userInfo:@{NSLocalizedDescriptionKey: @"The model answered in a shape Sing does not read"}];+ if (error && !*error) *error = [NSError errorWithDomain:@"SGSing" code:1 userInfo:@{NSLocalizedDescriptionKey: @"The model answered in a shape Karaoke does not read"}];return NO;}diff --git a/tweak/Sources/Shared/Sing/Sing.x b/tweak/Sources/Shared/Sing/Sing.xindex 126b011a..cfe37415 100644--- a/tweak/Sources/Shared/Sing/Sing.x+++ b/tweak/Sources/Shared/Sing/Sing.x@@ -151,11 +151,11 @@ static BOOL sg_sangThisTrack; // the vocals were down at some point of the tstatic BOOL readRefusal(void) {NSString *refused = nil;for (AVAudioSessionPortDescription *port in AVAudioSession.sharedInstance.currentRoute.outputs) {- if ([port.portType isEqualToString:AVAudioSessionPortAirPlay]) refused = @"Sing does not run over AirPlay, whose delay changes as it plays, so the song plays as it is.";+ if ([port.portType isEqualToString:AVAudioSessionPortAirPlay]) refused = @"Karaoke does not run over AirPlay, whose delay changes as it plays, so the song plays as it is.";}NSString *uri = SGURIString(SGPlayerState().track.URI);if (!refused && uri && ![uri hasPrefix:@"spotify:track:"] && ![uri hasPrefix:@"spotify:local:"]) {- refused = @"Sing turns down the vocals of songs, and what plays now is not one, so it plays as it is.";+ refused = @"Karaoke turns down the vocals of songs, and what plays now is not one, so it plays as it is.";}if (refused == sg_refused || [refused isEqualToString:sg_refused]) return NO;sg_refused = refused;@@ -289,7 +289,7 @@ static void apply(void) {if (on && !engine) {engine = SGSingEngineCreate();if (!engine) {- sg_setupError = @"Sing could not set aside memory for the song.";+ sg_setupError = @"Karaoke could not set aside memory for the song.";return;}SGSingEngineSetLevel(engine, SGSingLevel());@@ -402,9 +402,9 @@ void SGSetSingIgnoresHeat(BOOL ignores) {}NSString *SGSingMissing(void) {- if (!SGSingOSSupported()) return [NSString stringWithFormat:@"Sing needs iOS 18, the first its voice model runs on. This iPhone has iOS %@.", UIDevice.currentDevice.systemVersion];- if (!SGSingDeviceSupported()) return @"Sing needs an iPhone with 6 GB of memory or more, which the voice model was built for. This one has less.";- if (SGSingModelCurrentState() != SGSingModelReady) return [NSString stringWithFormat:@"Sing needs its voice model, which is downloaded from Mod Settings > Sing (%@).", SGSingModelSizeText()];+ if (!SGSingOSSupported()) return [NSString stringWithFormat:@"Karaoke needs iOS 18, the first its voice model runs on. This iPhone has iOS %@.", UIDevice.currentDevice.systemVersion];+ if (!SGSingDeviceSupported()) return @"Karaoke needs an iPhone with 6 GB of memory or more, which the voice model was built for. This one has less.";+ if (SGSingModelCurrentState() != SGSingModelReady) return [NSString stringWithFormat:@"Karaoke needs its voice model, which is downloaded from Mod Settings > Karaoke (%@).", SGSingModelSizeText()];return nil;}@@ -462,16 +462,16 @@ static NSString *runsOnNote(void) {MLComputeUnits units = SGSingLoaderFastUnits();NSString *name = SGSingUnitsName(units);if (units == MLComputeUnitsCPUOnly) {- return runsOn() == 0 ? @"The GPU did not load on this iOS before, so Sing runs on the CPU alone. Choosing GPU under Runs on tries it again."- : @"Sing runs on the CPU alone, as Runs on says.";+ return runsOn() == 0 ? @"The GPU did not load on this iOS before, so Karaoke runs on the CPU alone. Choosing GPU under Runs on tries it again."+ : @"Karaoke runs on the CPU alone, as Runs on says.";}switch (SGSingLoaderFastState()) {- case SGSingFastNone: return [NSString stringWithFormat:@"Sing runs on the CPU; a copy for the %@ loads once Spotify is open.", name];- case SGSingFastLoading: return [NSString stringWithFormat:@"Sing runs on the CPU while a copy for the %@ loads.", name];- case SGSingFastReady: return [NSString stringWithFormat:@"Sing runs on the %@ while Spotify is open, and on the CPU in the background.", name];- case SGSingFastSkipped: return [NSString stringWithFormat:@"Too little memory is left for a copy on the %@, so Sing runs on the CPU alone.", name];- case SGSingFastFailed: return [NSString stringWithFormat:@"The %@ could not load the voice model, so Sing runs on the CPU alone.", name];- case SGSingFastTimedOut: return [NSString stringWithFormat:@"The %@ did not load the voice model in %.0f minutes, so Sing runs on the CPU alone.", name, SGSingLoaderFastDeadline / 60];+ case SGSingFastNone: return [NSString stringWithFormat:@"Karaoke runs on the CPU; a copy for the %@ loads once Spotify is open.", name];+ case SGSingFastLoading: return [NSString stringWithFormat:@"Karaoke runs on the CPU while a copy for the %@ loads.", name];+ case SGSingFastReady: return [NSString stringWithFormat:@"Karaoke runs on the %@ while Spotify is open, and on the CPU in the background.", name];+ case SGSingFastSkipped: return [NSString stringWithFormat:@"Too little memory is left for a copy on the %@, so Karaoke runs on the CPU alone.", name];+ case SGSingFastFailed: return [NSString stringWithFormat:@"The %@ could not load the voice model, so Karaoke runs on the CPU alone.", name];+ case SGSingFastTimedOut: return [NSString stringWithFormat:@"The %@ did not load the voice model in %.0f minutes, so Karaoke runs on the CPU alone.", name, SGSingLoaderFastDeadline / 60];}return nil;}@@ -485,25 +485,25 @@ NSString *SGSingStatusDetail(void) {if (SGSingModelWaitingForNetwork()) {if (!SGSingModelOverCellular()) {return [NSString stringWithFormat:@"The voice model's download waits for Wi-Fi, as %@ is a lot of a cellular plan, and carries on from %.0f%% once "- @"the iPhone is on Wi-Fi. The Voice model row on the Sing page can let it use cellular.",+ @"the iPhone is on Wi-Fi. The Voice model row on the Karaoke page can let it use cellular.",SGSingModelSizeText(), SGSingModelProgress() * 100];}return [NSString stringWithFormat:@"The iPhone is offline. The voice model's download carries on from %.0f%% of %@ once it is online again.",SGSingModelProgress() * 100, SGSingModelSizeText()];}- return [NSString stringWithFormat:@"The voice model is coming in, %.0f%% of %@. Sing starts once it is checked.", SGSingModelProgress() * 100, SGSingModelSizeText()];+ return [NSString stringWithFormat:@"The voice model is coming in, %.0f%% of %@. Karaoke starts once it is checked.", SGSingModelProgress() * 100, SGSingModelSizeText()];case SGSingStateWaiting:if (sg_resting) {- return @"The vocals are as sung and Spatial voice is off, so the song plays as it is and the voice model rests. Sing starts again "- @"when the level moves, Spatial voice goes on, or the Sing page opens.";+ return @"The vocals are as sung and Spatial voice is off, so the song plays as it is and the voice model rests. Karaoke starts again "+ @"when the level moves, Spatial voice goes on, or the Karaoke page opens.";}- return [NSString stringWithFormat:@"The voice model is ready, and Sing starts once Spotify plays a song. %@", runsOnNote()];+ return [NSString stringWithFormat:@"The voice model is ready, and Karaoke starts once Spotify plays a song. %@", runsOnNote()];case SGSingStatePreparing:if (SGSingLoaderCurrentState() == SGSingLoaderIdle) return @"The voice model loads once Spotify is open.";- return [NSString stringWithFormat:@"Core ML prepares the voice model for this iPhone's CPU, %.0f s so far, then Sing starts. The first time, that can take a minute.",+ return [NSString stringWithFormat:@"Core ML prepares the voice model for this iPhone's CPU, %.0f s so far, then Karaoke starts. The first time, that can take a minute.",SGSingLoaderSeconds()];case SGSingStateBuffering:- return @"Sing listens a few seconds ahead of what plays, so the vocals are separated before you hear them. Until then the song plays as it is.";+ return @"Karaoke listens a few seconds ahead of what plays, so the vocals are separated before you hear them. Until then the song plays as it is.";case SGSingStateSinging:return runsOnNote();case SGSingStateBehind: {@@ -513,16 +513,16 @@ NSString *SGSingStatusDetail(void) {ms / 1000, runsOnNote()];}case SGSingStateHot:- return @"The iPhone is hot, so Sing has let go of the voice model and the song plays as it is. Sing loads it again once the iPhone cools. "- @"Ignore heat warnings keeps Sing going.";+ return @"The iPhone is hot, so Karaoke has let go of the voice model and the song plays as it is. Karaoke loads it again once the iPhone cools. "+ @"Ignore heat warnings keeps Karaoke going.";case SGSingStateFailed: {SGSingEngine *engine = atomic_load(&sg_engine);if (sg_stopped ?: sg_refused) return sg_stopped ?: sg_refused;NSString *error = SGSingLoaderError() ?: (engine ? SGSingEngineError(engine) : sg_setupError);- if (SGSingLoaderError()) return [error stringByAppendingString:@" Switch Sing off and on again to try again."];+ if (SGSingLoaderError()) return [error stringByAppendingString:@" Switch Karaoke off and on again to try again."];if (error) return error;if (!sg_outputReachable) return @"Spotify's output could not be reached.";- if (!atomic_load(&sg_staged) && !SGPlayerSpeedAllowed()) return @"Spotify's output could not be taken over, so Sing cannot reach its sound.";+ if (!atomic_load(&sg_staged) && !SGPlayerSpeedAllowed()) return @"Spotify's output could not be taken over, so Karaoke cannot reach its sound.";return @"Spotify's output is not 44.1 kHz stereo, which the voice model needs, so the song plays as it is.";}default:@@ -709,9 +709,9 @@ static void tick(void) {if (engine && SGSingOn() && !sg_stopped && SGSingEngineGaveUp(engine)) {BOOL forGood = ++sg_giveUps >= kGiveUpsKept;sg_stopKind = forGood ? SGSingStopForGood : SGSingStopBehind;- sg_stopped = forGood ? [NSString stringWithFormat:@"Sing could not keep up on this iPhone %d times in a row, so it stopped and songs play as they are. "- @"Switch Sing off and on, or choose another Runs on, to try again.", sg_giveUps]- : @"Sing could not keep up with this song on this iPhone, so it plays as it is. Sing tries again with the next song.";+ sg_stopped = forGood ? [NSString stringWithFormat:@"Karaoke could not keep up on this iPhone %d times in a row, so it stopped and songs play as they are. "+ @"Switch Karaoke off and on, or choose another Runs on, to try again.", sg_giveUps]+ : @"Karaoke could not keep up with this song on this iPhone, so it plays as it is. Karaoke tries again with the next song.";SGLog(@"sing: stopped, the vocals fell short for 8 s, %d in a row%@; %@", sg_giveUps, forGood ? @", so until switched off and on" : @"",SGSingStatusDetail());apply();@@ -934,8 +934,8 @@ static void readHeat(void) {// Over a stop for falling behind, which would load the model again with the next track whatever the memory.if (!SGSingOn() || (sg_stopped && sg_stopKind != SGSingStopBehind)) return;sg_stopKind = SGSingStopMemory;- sg_stopped = @"Sing stopped to free memory, so the song plays as it is. It loads the voice model again with the next song if there is room, "- @"or switch Sing off and on.";+ sg_stopped = @"Karaoke stopped to free memory, so the song plays as it is. It loads the voice model again with the next song if there is room, "+ @"or switch Karaoke off and on.";apply();announce();}];diff --git a/tweak/Sources/Shared/Sing/SingSettings.m b/tweak/Sources/Shared/Sing/SingSettings.mindex 2aaadb85..7b062fc0 100644--- a/tweak/Sources/Shared/Sing/SingSettings.m+++ b/tweak/Sources/Shared/Sing/SingSettings.m@@ -73,7 +73,7 @@ static void modelTapped(UITableViewController *page) {ask(@"Stop the download?", @"What has come in is kept, so the next download carries on from it.", @"Stop", YES, ^{ SGSingCancelModelDownload(); });break;case SGSingModelReady:- ask(@"Delete the voice model?", [NSString stringWithFormat:@"It frees %@. Sing needs it again to turn the vocals down.", SGSingModelSizeText()],+ ask(@"Delete the voice model?", [NSString stringWithFormat:@"It frees %@. Karaoke needs it again to turn the vocals down.", SGSingModelSizeText()],@"Delete", YES, ^{SGSetSingOn(NO);SGSingDeleteModel();@@ -119,7 +119,7 @@ UIViewController *SGSpatialVoiceSettingsPage(void) {};SGSpatialVoicePage *made = [[SGSpatialVoicePage alloc] initWithTitle:@"Spatial voice" intro:nil sections:@[SGNotedSection(nil, @[spatial],- @"Sing's voice keeps its place in front of you as you turn your head, while the rest of the song turns with "+ @"The singer's voice keeps its place in front of you as you turn your head, while the rest of the song turns with "@"you; stay turned, and it comes round in front again. It follows your head through headphones that "@"track it: AirPods Pro, AirPods 3 or later, AirPods Max, and asks for Motion & Fitness the first time. "@"While iOS's own Spatialize Stereo is on, which already holds the whole song in place, the voice is left to it."),@@ -155,9 +155,9 @@ UIViewController *SGSpatialVoiceSettingsPage(void) {@endUIViewController *SGSingSettingsPage(void) {- SGModRow *sing = SGOptionRow(@"Sing", nil, SGKeySing);+ SGModRow *sing = SGOptionRow(@"Karaoke", nil, SGKeySing);sing.changed = ^(BOOL on) { SGSetSingOn(on); };- SGModRow *heat = SGOptionRow(@"Ignore heat warnings", @"Keeps Sing going on a hot iPhone, which then gets hotter", SGKeySingIgnoreHeat);+ SGModRow *heat = SGOptionRow(@"Ignore heat warnings", @"Keeps Karaoke going on a hot iPhone, which then gets hotter", SGKeySingIgnoreHeat);heat.changed = ^(BOOL on) { SGSetSingIgnoresHeat(on); };__block __weak SGModPage *page;SGModRow *model = SGStatActionRow(@"Voice model", nil, ^NSString *{ return modelValue(); }, ^{ modelTapped(page); });@@ -165,7 +165,7 @@ UIViewController *SGSingSettingsPage(void) {BOOL partial = SGSingModelCurrentState() != SGSingModelReady;ask(partial ? @"Remove the paused download?" : @"Remove the voice model?",partial ? [NSString stringWithFormat:@"It frees %@. A new download starts from the beginning.", bytes(SGSingModelPausedBytes())]- : [NSString stringWithFormat:@"It frees %@. Sing needs it again to turn the vocals down.", SGSingModelSizeText()],+ : [NSString stringWithFormat:@"It frees %@. Karaoke needs it again to turn the vocals down.", SGSingModelSizeText()],@"Remove", YES, ^{SGSetSingOn(NO);SGSingDeleteModel();@@ -182,14 +182,14 @@ UIViewController *SGSingSettingsPage(void) {SGModRow *units = SGChoiceRow(@"Runs on", nil, SGKeySingComputeUnits, SGSingComputeUnitNames(), 0);units.choiceNotes = @[@"The GPU, unless it did not load on this iOS before", @"Slower, and the least memory", @"Tried every time, even after it did not load",@"Experimental: slower than the CPU on a Mac", @"Experimental"];- units.choiceFooter = @"Sing loads the voice model on the CPU first and starts with it. A second copy then loads for the windows "+ units.choiceFooter = @"Karaoke loads the voice model on the CPU first and starts with it. A second copy then loads for the windows "@"played while Spotify is open; in the background they run on the CPU.";units.chosen = ^(NSInteger index) { SGSingComputeUnitsChanged(); };- SGSingPage *made = [[SGSingPage alloc] initWithTitle:@"Sing" intro:nil sections:@[+ SGSingPage *made = [[SGSingPage alloc] initWithTitle:@"Karaoke" intro:nil sections:@[SGSection(nil, @[sing, heat, model, remove]),SGSection(nil, @[spatial]),SGNotedSection(@"Advanced", @[units],- @"Sing turns a song's vocals down to sing over, or the rest down to hear the vocals alone, with a voice model that "+ @"Karaoke turns a song's vocals down to sing over, or the rest down to hear the vocals alone, with a voice model that "@"runs only on this iPhone: no audio leaves it. It listens a few seconds ahead of what plays, so the vocals change a "@"few seconds after a song starts or after a seek."),] footer:nil];