Instrument editors pin the keyboard / sampler pads on the right in landscape (0.36.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-14 05:46:00 +01:00
co-authored by Claude Opus 5.5
parent bc257203e3
commit 0c09c3a0f3
5 changed files with 87 additions and 54 deletions
+8
View File
@@ -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 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.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) ## 0.36.1 (versionCode 69)
- **Wavetable editor fits without scrolling:** tabs are now OSC 1 · OSC 2 · VOICE - **Wavetable editor fits without scrolling:** tabs are now OSC 1 · OSC 2 · VOICE
@@ -150,7 +150,8 @@ private fun PageTabs(pages: List<Page>, selected: Int, onSelect: (Int) -> Unit)
contentAlignment = Alignment.Center, contentAlignment = Alignment.Center,
) { ) {
Text(p.title.uppercase(), color = if (on) tone else c.textDim, 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)
} }
} }
} }
@@ -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. // Whether the MIDI-learn popup (map controls to this device's parameters) is open.
var showMidiLearn by remember(slot.index) { mutableStateOf(false) } var showMidiLearn by remember(slot.index) { mutableStateOf(false) }
Box(Modifier.fillMaxSize().background(c.background.copy(alpha = 0.96f))) { // The playable part pinned beside the controls: the Sampler's pads, else an
Column(Modifier.fillMaxSize()) { // audition keyboard.
Column( val pinned: @Composable (Modifier) -> Unit = { mod ->
Modifier if (type == ToolboxType.SAMPLER) {
.weight(if (pinnedBottom) 1.7f else 1f) SamplerPadBank(vm, slot, samplerPad, onSelect = { samplerPad = it }, mod)
.fillMaxWidth() } else {
.padding(12.dp) SlotAuditionKeyboard(vm, slot, mod)
.verticalScroll(rememberScrollState()), }
verticalArrangement = Arrangement.spacedBy(8.dp), }
) { // Landscape: controls on the left, keyboard / pads pinned on the right at the
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { // same 1 : 1.3 split as the Toolbox tab. Portrait: controls above, 1.7 : 1.
Text(slot.name, color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 15.sp) val sideBySide = pinnedBottom && isLandscape()
// 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() } })
}
}
// Preset browser: load / save / import / share for this device. // Header, presets and the device's own controls (scrolls on its own).
PresetBar(vm, slot) val controls: @Composable (Modifier) -> Unit = { mod ->
Column(
// The Synth / Sampler / SoundFont / Delay / tape and glitch effects have Modifier
// bespoke editors; everything else is grouped cards ([DevicePanels]), with .then(mod)
// a source strip on top for the Grain Cloud and the LFO's .padding(12.dp)
// target picker below. .verticalScroll(rememberScrollState()),
when (type) { verticalArrangement = Arrangement.spacedBy(8.dp),
ToolboxType.NES_SYNTH -> NesSynthEditor(vm, slot) ) {
ToolboxType.MIX_TIGHTENER -> MixTightenerEditor(vm, slot) Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
ToolboxType.TAPE_ENGINE -> TapeEngineEditor(vm, slot) Text(slot.name, color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 15.sp)
ToolboxType.GRANULAR -> GranularEditor(vm, slot) // Right-side toolbar: MIDI-learn (map controls to params) + close.
ToolboxType.SAMPLER -> SamplerEditor(vm, slot, samplerPad, onSelectPad = { samplerPad = it }) Row(horizontalArrangement = Arrangement.spacedBy(14.dp)) {
ToolboxType.SOUNDFONT -> SoundFontEditor(vm, slot) Text("⇄ MIDI", color = c.accent, fontFamily = FontFamily.Monospace, fontSize = 13.sp,
ToolboxType.DELAY -> DelayEditor(vm, slot) modifier = Modifier.pointerInput(Unit) { detectTapGestures { showMidiLearn = true } })
ToolboxType.GRAIN_CLOUD -> { Text("CLOSE ✕", color = c.textDim, fontFamily = FontFamily.Monospace, fontSize = 13.sp,
GrainCloudEditor(vm, slot) modifier = Modifier.pointerInput(Unit) { detectTapGestures { onClose() } })
DevicePanels(vm, slot, DeviceLayouts.pagesFor(type))
}
ToolboxType.LFO -> {
DevicePanels(vm, slot, DeviceLayouts.pagesFor(type))
LfoTargetPicker(vm, slot)
}
else -> DevicePanels(vm, slot, DeviceLayouts.pagesFor(type))
} }
} }
if (pinnedBottom) { // Preset browser: load / save / import / share for this device.
Box(Modifier.fillMaxWidth().height(2.dp).background(c.accent)) // fixed divider PresetBar(vm, slot)
if (type == ToolboxType.SAMPLER) {
SamplerPadBank(vm, slot, samplerPad, onSelect = { samplerPad = it }, Modifier.weight(1f)) // The Synth / Sampler / SoundFont / Delay / tape and glitch effects have
} else { // bespoke editors; everything else is grouped cards ([DevicePanels]), with
SlotAuditionKeyboard(vm, slot, Modifier.weight(1f)) // 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))
} }
} }
} }
+5 -1
View File
@@ -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 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). 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 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 (`WavetablePreview`), and LOAD TABLE is a `Panel.action` in Oscillator 1's title
(`LoadTableAction`, WavetableEditor.kt). Tabs share the strip's width (up to (`LoadTableAction`, WavetableEditor.kt). Tabs share the strip's width (up to
seven fit) instead of scrolling sideways. seven fit) instead of scrolling sideways.
@@ -820,6 +821,9 @@ polish and interchange niceties, not functional gaps.
the same sum). the same sum).
- **Responsive landscape layout** ✓ (`ui/Responsive.kt`): nav rail, side-by-side - **Responsive landscape layout** ✓ (`ui/Responsive.kt`): nav rail, side-by-side
screens, two-column mixer/editors, wider on-screen keyboards for tablets/handhelds. 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, - **Arrangement niceties** ✓: 256-bar canvas with viewport-culled drawing,
per-lane mutes, and centre-follow scrolling. per-lane mutes, and centre-follow scrolling.
- **Per-bus soft-clip limiter** ✓, sampler QoL (fire-on-tap, clear, normalize), - **Per-bus soft-clip limiter** ✓, sampler QoL (fire-on-tap, clear, normalize),
+2 -2
View File
@@ -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.36.1 android.versionName = 0.36.2
android.versionCode = 69 android.versionCode = 70
# 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