Sound-module mode ignores clock Start/Stop for Sizzle's own song (v0.29.2)
With "Receive MIDI clock" on, Mikro Seq's Start also started Sizzle's sequencer, so a song imported from Mikro Seq played along with the live notes, doubling parts that Mikro Seq's mutes could not reach. While sound-module mode is on, Start/Stop are now ignored (traced as such); tempo is still followed. Verified on the emulator with MidiTrace, plus a control run with the mode off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3c248028c9
commit
dae8ac46ac
@@ -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
|
version in `versions.properties`; versions before 0.28.0 are described in the git
|
||||||
log (one commit per version).
|
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)
|
## 0.29.1 (versionCode 59)
|
||||||
|
|
||||||
- **MIDI trace** for checking what reaches Sizzle and what it plays: every
|
- **MIDI trace** for checking what reaches Sizzle and what it plays: every
|
||||||
|
|||||||
@@ -168,14 +168,27 @@ class SizzleApp : Application() {
|
|||||||
midiClock.playingProvider = { audioEngine.transport.value.isPlaying }
|
midiClock.playingProvider = { audioEngine.transport.value.isPlaying }
|
||||||
midiClock.bpmProvider = { project.tempoBpm }
|
midiClock.bpmProvider = { project.tempoBpm }
|
||||||
midiClock.noteSource = { audioEngine.pollMidiOut() } // forward sequenced notes out
|
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 = {
|
midiClock.onReceiveStart = {
|
||||||
|
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")
|
if (MidiTrace.on) MidiTrace.log("clock Start -> Sizzle's own sequencer plays the loaded song")
|
||||||
main.post { if (!audioEngine.transport.value.isPlaying) audioEngine.play() }
|
main.post { if (!audioEngine.transport.value.isPlaying) audioEngine.play() }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
midiClock.onReceiveStop = {
|
midiClock.onReceiveStop = {
|
||||||
|
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")
|
if (MidiTrace.on) MidiTrace.log("clock Stop -> Sizzle's own sequencer pauses")
|
||||||
main.post { audioEngine.pause() }
|
main.post { audioEngine.pause() }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
midiClock.onReceiveTempo = { bpm -> main.post { project.tempoBpm = bpm.coerceIn(20f, 300f) } }
|
midiClock.onReceiveTempo = { bpm -> main.post { project.tempoBpm = bpm.coerceIn(20f, 300f) } }
|
||||||
val s = runBlocking { settingsStore.load() }
|
val s = runBlocking { settingsStore.load() }
|
||||||
midiClock.sendEnabled = s.sendMidiClock
|
midiClock.sendEnabled = s.sendMidiClock
|
||||||
|
|||||||
@@ -518,8 +518,8 @@ private fun MidiSyncCard(vm: AppViewModel) {
|
|||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
ToggleRow(
|
ToggleRow(
|
||||||
"Receive MIDI clock",
|
"Receive MIDI clock",
|
||||||
"Follow an external clock's tempo, and start/stop Sizzle's own song with it. " +
|
"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.",
|
"(tempo only while Sizzle runs as a MIDI sound module).",
|
||||||
vm.receiveMidiClock,
|
vm.receiveMidiClock,
|
||||||
) { vm.updateReceiveMidiClock(it) }
|
) { vm.updateReceiveMidiClock(it) }
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
@@ -527,7 +527,8 @@ private fun MidiSyncCard(vm: AppViewModel) {
|
|||||||
ToggleRow(
|
ToggleRow(
|
||||||
"Keep running as MIDI sound module",
|
"Keep running as MIDI sound module",
|
||||||
"Keep playing incoming MIDI with Sizzle in the background (another app can " +
|
"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,
|
module,
|
||||||
) { vm.updateSoundModuleMode(it) }
|
) { vm.updateSoundModuleMode(it) }
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
|
|||||||
@@ -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
|
- 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
|
wired in `SizzleApp.wireMidi`, not the ViewModel, and the clock toggles are
|
||||||
restored there; the ViewModel only redraws on `MidiClock.followedTempo`.
|
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
|
- Punch-in recording stays UI-driven: the module mirrors notes onto
|
||||||
`InputRouter` as `NoteOn(…, sounded = true)`, which the ViewModel records but
|
`InputRouter` as `NoteOn(…, sounded = true)`, which the ViewModel records but
|
||||||
does not play again. With no UI collecting, the router drops them.
|
does not play again. With no UI collecting, the router drops them.
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@
|
|||||||
# or polish. android.versionCode is monotonic and bumps by 1 on every release,
|
# 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.
|
# because F-Droid and the Android package manager order installs by it alone.
|
||||||
|
|
||||||
android.versionName = 0.29.1
|
android.versionName = 0.29.2
|
||||||
android.versionCode = 59
|
android.versionCode = 60
|
||||||
|
|
||||||
# No desktop builds exist yet. These lines are the agreed slots so a port starts
|
# 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
|
# with a version instead of inventing one; `-` means "not built on this
|
||||||
|
|||||||
Reference in New Issue
Block a user