From 0c09c3a0f3d9b838c55dd6ef2514455e05901025 Mon Sep 17 00:00:00 2001 From: Reactorcoremeltdown Date: Sat, 14 Nov 2026 05:46:00 +0100 Subject: [PATCH] Instrument editors pin the keyboard / sampler pads on the right in landscape (0.36.2) Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 8 ++ .../android/sizzle/ui/toolbox/Panels.kt | 3 +- .../sizzle/ui/toolbox/ToolboxScreen.kt | 120 ++++++++++-------- docs/DEVELOPER_HANDOVER.md | 6 +- versions.properties | 4 +- 5 files changed, 87 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bfd9ab..d72cf3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ 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.36.2 (versionCode 70) + +- **Instrument editors in landscape:** the audition keyboard (or the Sampler's + pads) is now pinned on the right at the same width as on the Toolbox and + Tracker tabs, with the controls scrolling on the left, instead of being stacked + below the controls. Tab labels shrink when there are more than five, so the + Wavetable's FILTER tab isn't cut off in the narrower column. + ## 0.36.1 (versionCode 69) - **Wavetable editor fits without scrolling:** tabs are now OSC 1 · OSC 2 · VOICE diff --git a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/Panels.kt b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/Panels.kt index 31a3e41..53808e4 100644 --- a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/Panels.kt +++ b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/Panels.kt @@ -150,7 +150,8 @@ private fun PageTabs(pages: List, selected: Int, onSelect: (Int) -> Unit) contentAlignment = Alignment.Center, ) { Text(p.title.uppercase(), color = if (on) tone else c.textDim, - fontFamily = FontFamily.Monospace, fontSize = 12.sp, maxLines = 1, softWrap = false) + fontFamily = FontFamily.Monospace, fontSize = if (pages.size > 5) 10.sp else 12.sp, + maxLines = 1, softWrap = false) } } } diff --git a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/ToolboxScreen.kt b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/ToolboxScreen.kt index b2d630b..00fec88 100644 --- a/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/ToolboxScreen.kt +++ b/app/src/main/java/cc/tiredsysadmin/android/sizzle/ui/toolbox/ToolboxScreen.kt @@ -324,60 +324,80 @@ private fun ParamEditor(vm: AppViewModel, slot: ToolboxSlot, onClose: () -> Unit // Whether the MIDI-learn popup (map controls to this device's parameters) is open. var showMidiLearn by remember(slot.index) { mutableStateOf(false) } - Box(Modifier.fillMaxSize().background(c.background.copy(alpha = 0.96f))) { - Column(Modifier.fillMaxSize()) { - Column( - Modifier - .weight(if (pinnedBottom) 1.7f else 1f) - .fillMaxWidth() - .padding(12.dp) - .verticalScroll(rememberScrollState()), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { - Text(slot.name, color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 15.sp) - // Right-side toolbar: MIDI-learn (map controls to params) + close. - Row(horizontalArrangement = Arrangement.spacedBy(14.dp)) { - Text("⇄ MIDI", color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 13.sp, - modifier = Modifier.pointerInput(Unit) { detectTapGestures { showMidiLearn = true } }) - Text("CLOSE ✕", color = c.textDim, fontFamily = FontFamily.Monospace, fontSize = 13.sp, - modifier = Modifier.pointerInput(Unit) { detectTapGestures { onClose() } }) - } - } + // The playable part pinned beside the controls: the Sampler's pads, else an + // audition keyboard. + val pinned: @Composable (Modifier) -> Unit = { mod -> + if (type == ToolboxType.SAMPLER) { + SamplerPadBank(vm, slot, samplerPad, onSelect = { samplerPad = it }, mod) + } else { + SlotAuditionKeyboard(vm, slot, mod) + } + } + // Landscape: controls on the left, keyboard / pads pinned on the right at the + // same 1 : 1.3 split as the Toolbox tab. Portrait: controls above, 1.7 : 1. + val sideBySide = pinnedBottom && isLandscape() - // Preset browser: load / save / import / share for this device. - PresetBar(vm, slot) - - // The Synth / Sampler / SoundFont / Delay / tape and glitch effects have - // bespoke editors; everything else is grouped cards ([DevicePanels]), with - // a source strip on top for the Grain Cloud and the LFO's - // target picker below. - when (type) { - ToolboxType.NES_SYNTH -> NesSynthEditor(vm, slot) - ToolboxType.MIX_TIGHTENER -> MixTightenerEditor(vm, slot) - ToolboxType.TAPE_ENGINE -> TapeEngineEditor(vm, slot) - ToolboxType.GRANULAR -> GranularEditor(vm, slot) - ToolboxType.SAMPLER -> SamplerEditor(vm, slot, samplerPad, onSelectPad = { samplerPad = it }) - ToolboxType.SOUNDFONT -> SoundFontEditor(vm, slot) - ToolboxType.DELAY -> DelayEditor(vm, slot) - ToolboxType.GRAIN_CLOUD -> { - GrainCloudEditor(vm, slot) - DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) - } - ToolboxType.LFO -> { - DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) - LfoTargetPicker(vm, slot) - } - else -> DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) + // Header, presets and the device's own controls (scrolls on its own). + val controls: @Composable (Modifier) -> Unit = { mod -> + Column( + Modifier + .then(mod) + .padding(12.dp) + .verticalScroll(rememberScrollState()), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { + Text(slot.name, color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 15.sp) + // Right-side toolbar: MIDI-learn (map controls to params) + close. + Row(horizontalArrangement = Arrangement.spacedBy(14.dp)) { + Text("⇄ MIDI", color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 13.sp, + modifier = Modifier.pointerInput(Unit) { detectTapGestures { showMidiLearn = true } }) + Text("CLOSE ✕", color = c.textDim, fontFamily = FontFamily.Monospace, fontSize = 13.sp, + modifier = Modifier.pointerInput(Unit) { detectTapGestures { onClose() } }) } } - if (pinnedBottom) { - Box(Modifier.fillMaxWidth().height(2.dp).background(c.accent)) // fixed divider - if (type == ToolboxType.SAMPLER) { - SamplerPadBank(vm, slot, samplerPad, onSelect = { samplerPad = it }, Modifier.weight(1f)) - } else { - SlotAuditionKeyboard(vm, slot, Modifier.weight(1f)) + // Preset browser: load / save / import / share for this device. + PresetBar(vm, slot) + + // The Synth / Sampler / SoundFont / Delay / tape and glitch effects have + // bespoke editors; everything else is grouped cards ([DevicePanels]), with + // a source strip on top for the Grain Cloud and the LFO's + // target picker below. + when (type) { + ToolboxType.NES_SYNTH -> NesSynthEditor(vm, slot) + ToolboxType.MIX_TIGHTENER -> MixTightenerEditor(vm, slot) + ToolboxType.TAPE_ENGINE -> TapeEngineEditor(vm, slot) + ToolboxType.GRANULAR -> GranularEditor(vm, slot) + ToolboxType.SAMPLER -> SamplerEditor(vm, slot, samplerPad, onSelectPad = { samplerPad = it }) + ToolboxType.SOUNDFONT -> SoundFontEditor(vm, slot) + ToolboxType.DELAY -> DelayEditor(vm, slot) + ToolboxType.GRAIN_CLOUD -> { + GrainCloudEditor(vm, slot) + DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) + } + ToolboxType.LFO -> { + DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) + LfoTargetPicker(vm, slot) + } + else -> DevicePanels(vm, slot, DeviceLayouts.pagesFor(type)) + } + } + } + + Box(Modifier.fillMaxSize().background(c.background.copy(alpha = 0.96f))) { + if (sideBySide) { + Row(Modifier.fillMaxSize()) { + controls(Modifier.weight(1f).fillMaxHeight()) + Box(Modifier.width(2.dp).fillMaxHeight().background(c.accent)) // fixed divider + pinned(Modifier.weight(1.3f).fillMaxHeight()) + } + } else { + Column(Modifier.fillMaxSize()) { + controls(Modifier.weight(if (pinnedBottom) 1.7f else 1f).fillMaxWidth()) + if (pinnedBottom) { + Box(Modifier.fillMaxWidth().height(2.dp).background(c.accent)) // fixed divider + pinned(Modifier.weight(1f)) } } } diff --git a/docs/DEVELOPER_HANDOVER.md b/docs/DEVELOPER_HANDOVER.md index 250476f..4e49a3c 100644 --- a/docs/DEVELOPER_HANDOVER.md +++ b/docs/DEVELOPER_HANDOVER.md @@ -354,7 +354,8 @@ leaves the editor about 460 dp on a 20:9 phone, of which the title, preset bar a tab strip take about 170. A page should therefore stay under ~290 dp (one card with a drawing, a choice row and a knob row is ~230; two such cards don't fit). That is why the Wavetable has one oscillator per tab and separate AMP and MOD -tabs. Its table drawing is a `Viz.Wavetable(osc)` inside each oscillator card +tabs (with more than five tabs the labels drop to 10 sp, so they fit the narrower +landscape column). Its table drawing is a `Viz.Wavetable(osc)` inside each oscillator card (`WavetablePreview`), and LOAD TABLE is a `Panel.action` in Oscillator 1's title (`LoadTableAction`, WavetableEditor.kt). Tabs share the strip's width (up to seven fit) instead of scrolling sideways. @@ -820,6 +821,9 @@ polish and interchange niceties, not functional gaps. the same sum). - **Responsive landscape layout** ✓ (`ui/Responsive.kt`): nav rail, side-by-side screens, two-column mixer/editors, wider on-screen keyboards for tablets/handhelds. + Instrument editors (`ParamEditor` in ToolboxScreen.kt) pin their audition + keyboard, or the Sampler's pads, on the right in landscape at the Toolbox tab's + 1 : 1.3 split, and below the controls in portrait (1.7 : 1) (0.36.2). - **Arrangement niceties** ✓: 256-bar canvas with viewport-culled drawing, per-lane mutes, and centre-follow scrolling. - **Per-bus soft-clip limiter** ✓, sampler QoL (fire-on-tap, clear, normalize), diff --git a/versions.properties b/versions.properties index 8d2efea..1d31cd6 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.36.1 -android.versionCode = 69 +android.versionName = 0.36.2 +android.versionCode = 70 # 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