diff --git a/CHANGELOG.md b/CHANGELOG.md index c5dea78..cc9a59e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ Sizzletracker for Android (`cc.tiredsysadmin.android.sizzle`). One entry per version in `versions.properties`; versions before 0.28.0 are described in the git log (one commit per version). +## 0.29.2 (versionCode 60) + +- While Sizzle runs as a MIDI sound module, another app's clock Start/Stop no + longer starts or stops Sizzle's own song (tempo is still followed). Before, a + song opened from Mikro Seq played along with Mikro Seq's live notes, doubling + parts that Mikro Seq's mutes couldn't silence. + ## 0.29.1 (versionCode 59) - **MIDI trace** for checking what reaches Sizzle and what it plays: every diff --git a/app/src/main/java/cc/tiredsysadmin/android/sizzle/SizzleApp.kt b/app/src/main/java/cc/tiredsysadmin/android/sizzle/SizzleApp.kt index 562a10d..8a60c97 100644 --- a/app/src/main/java/cc/tiredsysadmin/android/sizzle/SizzleApp.kt +++ b/app/src/main/java/cc/tiredsysadmin/android/sizzle/SizzleApp.kt @@ -168,13 +168,26 @@ class SizzleApp : Application() { midiClock.playingProvider = { audioEngine.transport.value.isPlaying } midiClock.bpmProvider = { project.tempoBpm } midiClock.noteSource = { audioEngine.pollMidiOut() } // forward sequenced notes out + // As a sound module, Sizzle plays the notes another app sends; if that app's + // clock Start also started Sizzle's own song, the song would play along + // (doubled parts that the sender's mutes can't reach). So Start/Stop drive + // the transport only while sound-module mode is off. Tempo is still followed + // (tempo-synced LFOs, delays and arpeggiators use it). midiClock.onReceiveStart = { - if (MidiTrace.on) MidiTrace.log("clock Start -> Sizzle's own sequencer plays the loaded song") - main.post { if (!audioEngine.transport.value.isPlaying) audioEngine.play() } + if (_soundModuleEnabled.value) { + if (MidiTrace.on) MidiTrace.log("clock Start ignored: sound-module mode is on") + } else { + if (MidiTrace.on) MidiTrace.log("clock Start -> Sizzle's own sequencer plays the loaded song") + main.post { if (!audioEngine.transport.value.isPlaying) audioEngine.play() } + } } midiClock.onReceiveStop = { - if (MidiTrace.on) MidiTrace.log("clock Stop -> Sizzle's own sequencer pauses") - main.post { audioEngine.pause() } + if (_soundModuleEnabled.value) { + if (MidiTrace.on) MidiTrace.log("clock Stop ignored: sound-module mode is on") + } else { + if (MidiTrace.on) MidiTrace.log("clock Stop -> Sizzle's own sequencer pauses") + main.post { audioEngine.pause() } + } } midiClock.onReceiveTempo = { bpm -> main.post { project.tempoBpm = bpm.coerceIn(20f, 300f) } } val s = runBlocking { settingsStore.load() } diff --git a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/settings/SettingsScreen.kt b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/settings/SettingsScreen.kt index 62183b9..96d8c1f 100644 --- a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/settings/SettingsScreen.kt @@ -518,8 +518,8 @@ private fun MidiSyncCard(vm: AppViewModel) { HorizontalDivider() ToggleRow( "Receive MIDI clock", - "Follow an external clock's tempo, and start/stop Sizzle's own song with it. " + - "Its song then plays along with any notes the other app sends.", + "Follow an external clock's tempo, and start/stop Sizzle's own song with it " + + "(tempo only while Sizzle runs as a MIDI sound module).", vm.receiveMidiClock, ) { vm.updateReceiveMidiClock(it) } HorizontalDivider() @@ -527,7 +527,8 @@ private fun MidiSyncCard(vm: AppViewModel) { ToggleRow( "Keep running as MIDI sound module", "Keep playing incoming MIDI with Sizzle in the background (another app can " + - "use it as its synth), with a notification while on.", + "use it as its synth), with a notification while on. Sizzle's own song " + + "doesn't start from the other app's clock meanwhile.", module, ) { vm.updateSoundModuleMode(it) } HorizontalDivider() diff --git a/docs/DEVELOPER_HANDOVER.md b/docs/DEVELOPER_HANDOVER.md index 2c23ee7..14b522d 100644 --- a/docs/DEVELOPER_HANDOVER.md +++ b/docs/DEVELOPER_HANDOVER.md @@ -345,6 +345,10 @@ foreground on pause, and its notification manager re-derives that state from - The MIDI clock follow (Start/Stop/tempo) and the clock sender's providers are wired in `SizzleApp.wireMidi`, not the ViewModel, and the clock toggles are restored there; the ViewModel only redraws on `MidiClock.followedTempo`. + While sound-module mode is on, clock Start/Stop are ignored (0.29.2): the + sender's notes already play, and starting Sizzle's own song too doubled them + (e.g. a song just imported from Mikro Seq) out of reach of the sender's mutes. + Tempo is still followed. - Punch-in recording stays UI-driven: the module mirrors notes onto `InputRouter` as `NoteOn(…, sounded = true)`, which the ViewModel records but does not play again. With no UI collecting, the router drops them. diff --git a/versions.properties b/versions.properties index 24078da..10762c6 100644 --- a/versions.properties +++ b/versions.properties @@ -8,8 +8,8 @@ # or polish. android.versionCode is monotonic and bumps by 1 on every release, # because F-Droid and the Android package manager order installs by it alone. -android.versionName = 0.29.1 -android.versionCode = 59 +android.versionName = 0.29.2 +android.versionCode = 60 # No desktop builds exist yet. These lines are the agreed slots so a port starts # with a version instead of inventing one; `-` means "not built on this