4 Commits

Author SHA1 Message Date
josh ca4cabb42f Merge pedal-colors: enclosure tints for the new pedals 2026-06-21 15:54:37 -07:00
josh 1ecacbfc21 Add enclosure tints for the four new pedals
Mu-Tron plum, Auto-Wah gold, Feedback Delay tape sepia, Multi-Tap Delay
cyan — distinct from the existing eight so they no longer fall through to
the default steel gray.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:54:37 -07:00
josh 79e200a61e Merge pedal-footer-symmetry: Level | bypass | Mix footer 2026-06-21 15:53:57 -07:00
josh b564b154a0 Flank bypass switch with Level and Mix for a symmetric pedal footer
Move the Mix knob out of the knob grid into the bottom control row, to the
right of the bypass footswitch, mirroring Level on the left. Every pedal
now shares a consistent knob-switch-knob footer. The knob grid drops the
trailing Mix and Level entries (was just Level).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:53:57 -07:00
+24 -8
View File
@@ -24,6 +24,10 @@ private func enclosureColor(for displayName: String) -> Color {
case "Tremolo": return Color(red: 0.20, green: 0.38, blue: 0.72) // cobalt blue case "Tremolo": return Color(red: 0.20, green: 0.38, blue: 0.72) // cobalt blue
case "Phaser": return Color(red: 0.60, green: 0.22, blue: 0.62) // violet case "Phaser": return Color(red: 0.60, green: 0.22, blue: 0.62) // violet
case "Compressor": return Color(red: 0.18, green: 0.42, blue: 0.32) // forest green case "Compressor": return Color(red: 0.18, green: 0.42, blue: 0.32) // forest green
case "Mu-Tron": return Color(red: 0.70, green: 0.12, blue: 0.48) // magenta / plum
case "Auto-Wah": return Color(red: 0.80, green: 0.62, blue: 0.10) // gold
case "Feedback Delay": return Color(red: 0.48, green: 0.30, blue: 0.14) // tape sepia
case "Multi-Tap Delay": return Color(red: 0.08, green: 0.48, blue: 0.68) // cyan
default: return Color(red: 0.36, green: 0.36, blue: 0.38) // steel gray default: return Color(red: 0.36, green: 0.36, blue: 0.38) // steel gray
} }
} }
@@ -278,13 +282,14 @@ public struct PedalView: View {
.clipShape(RoundedRectangle(cornerRadius: PedalView.namePlateCornerRadius)) .clipShape(RoundedRectangle(cornerRadius: PedalView.namePlateCornerRadius))
} }
/// Grid of the effect + `Mix` knobs, in rows of up to `knobColumnCount`. /// Grid of the effect knobs, in rows of up to `knobColumnCount`.
/// ///
/// The `Level` knob (the last entry of `pedal.knobs`) is dropped here and rendered in /// The trailing `Mix` and `Level` knobs (the last two entries of `pedal.knobs`) are
/// the bottom control row next to the bypass switch, leaving more room for the effect /// dropped here and rendered in the bottom control row flanking the bypass switch —
/// controls at the top. /// `Level` on the left, `Mix` on the right — leaving more room for the effect controls
/// at the top and giving every pedal a symmetric footer.
private var knobGrid: some View { private var knobGrid: some View {
let knobs: [PedalKnob] = Array(pedal.knobs.dropLast()) let knobs: [PedalKnob] = Array(pedal.knobs.dropLast(2))
let rows: [[PedalKnob]] = stride( let rows: [[PedalKnob]] = stride(
from: 0, from: 0,
to: knobs.count, to: knobs.count,
@@ -327,17 +332,18 @@ public struct PedalView: View {
} }
} }
/// Bottom control row: the `Level` knob and the bypass switch side-by-side, centred /// Bottom control row: the `Level` knob, the bypass switch, and the `Mix` knob,
/// with equal padding below. /// side-by-side and centred — a symmetric knob-switch-knob footer shared by all pedals.
private var bottomControls: some View { private var bottomControls: some View {
HStack(alignment: .center, spacing: PedalView.bottomControlsSpacing) { HStack(alignment: .center, spacing: PedalView.bottomControlsSpacing) {
levelControl levelControl
bypassControl bypassControl
mixControl
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} }
/// The `Level` knob — the last entry of `pedal.knobs`. /// The `Level` knob — the last entry of `pedal.knobs` — placed left of the bypass switch.
@ViewBuilder @ViewBuilder
private var levelControl: some View { private var levelControl: some View {
if let level: PedalKnob = pedal.knobs.last { if let level: PedalKnob = pedal.knobs.last {
@@ -346,6 +352,16 @@ public struct PedalView: View {
} }
} }
/// The `Mix` knob — the second-to-last entry of `pedal.knobs` — placed right of the
/// bypass switch to mirror `Level`.
@ViewBuilder
private var mixControl: some View {
if let mix: PedalKnob = pedal.knobs.dropLast().last {
ParameterKnob(mix.label, node: mix.node, range: mix.range)
.foregroundStyle(Color.white)
}
}
/// LED + footswitch bypass control, paired beside the Level knob. /// LED + footswitch bypass control, paired beside the Level knob.
private var bypassControl: some View { private var bypassControl: some View {
// Reading `pedal.$bypass.value` here registers this view for automatic // Reading `pedal.$bypass.value` here registers this view for automatic