Compare commits
8 Commits
ebc660898d
...
v3.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fd7eaee57 | |||
| 654e80e9c8 | |||
| 292261a088 | |||
| a1ce308082 | |||
| 685bf5833e | |||
| 5a3cbeb372 | |||
| 11ce3f47d2 | |||
| da68864f36 |
@@ -4,6 +4,71 @@ All notable changes to ShoeGaze are recorded here. The format follows
|
||||
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
||||
[semantic versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [3.0.0] — 2026-08-04
|
||||
|
||||
The big one: ShoeGaze becomes an amp-modeling rig. This release adds a full lineup of
|
||||
tube-amp voices — each with its own tone stack, onboard effects, and control surface —
|
||||
plus a deep speaker-cabinet and microphone section. Everything is original DSP built in
|
||||
code from the Lyrebird engine; there are no third-party captures or IR packs.
|
||||
|
||||
### Added
|
||||
|
||||
- **26 amp-model pedals**, grouped in their own **Amp Model** palette category:
|
||||
- **Fullerton** blackface combos — Fullerton Reverb, Deluxe, Ivy League, Drive — with
|
||||
spring reverb, tremolo, and a Bright switch.
|
||||
- **California** and **Jazz Clean** clean machines.
|
||||
- **British** stack and combo voices — British, Plexi, JTM, Bluesbreaker, Master, Dual —
|
||||
from early crunch to hot-rodded master-volume lead.
|
||||
- **Chime** top-boost family — Chime, Chime 15, Chime Normal, Chime Baby, Chime Top
|
||||
Boost — with the classic Cut control.
|
||||
- **Boutique and high-gain** — Boutique Lead, Boutique OD, Cali Hi-Gain (with an onboard
|
||||
5-band graphic EQ), and Modern High-Gain (Sag + Tight).
|
||||
- **Character amps** — Command, Citrus, Sixties Combo, Magna Vibrato (true pitch
|
||||
vibrato), and Anaheim (a solid-state-preamp / tube-power-amp hybrid with a built-in
|
||||
limiter).
|
||||
|
||||
Each amp carries its own tone-stack voicing, a selectable speaker cabinet, and a real
|
||||
**master volume** that drives the power-amp stage — not just an output trim.
|
||||
- **Analog-style output limiting.** Every amp ends in a soft `tanh` saturation into a hard
|
||||
±1 ceiling, so a driven amp compresses like the real thing instead of digitally clipping.
|
||||
- **Power-amp feel controls**, tucked behind an advanced pop-over (the sliders button at the
|
||||
top-right of the amp card): **Sag** (power-supply droop and bloom), **Bias**, and **Bias X**
|
||||
(bias balance).
|
||||
- **A full speaker-cabinet and microphone section** on the Cabinet pedal, now in its own
|
||||
**Cabinet** palette category next to the amps:
|
||||
- **Cabinet voices** — eight synthesized speaker voicings.
|
||||
- **Microphone modeling** — No Mic / Dynamic / Ribbon / Condenser, folded into the cab
|
||||
response.
|
||||
- **Mic placement** — Position (on-axis ↔ cone edge) and Proximity (distance / bass lift).
|
||||
- **Dual-mic blend** — add a second mic with its own blend and spacing (comb) control,
|
||||
the classic two-mic technique.
|
||||
- A transparent look-ahead limiter on the cabinet output.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Gain and Drive now read 1–11** — yes, they go to eleven — with a musical taper: fine
|
||||
control at the bottom of the dial, full saturation at the top, instead of a raw internal
|
||||
number.
|
||||
- **The cabinet is now a separate pedal you place in the chain.** Amps keep a built-in cab,
|
||||
plus a **None (direct)** option so you can run a dedicated Cabinet block (and, later, your
|
||||
own impulse response) after the amp.
|
||||
- **Palette:** the Amp Model and Cabinet categories sit together, and the Cabinet card is
|
||||
double-width to fit its cab / mic / second-mic selectors.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Noise Gate no longer pops as a note decays.** The gate now opens fast and closes gently
|
||||
(a slow, tunable fade) instead of snapping shut when a sustained note falls through the
|
||||
threshold — previously that abrupt step, amplified by downstream gain (e.g. a fuzz), was
|
||||
audible as a pop / sudden tone change. New **Attack** and **Release** timing knobs (in the
|
||||
gate's advanced pop-over) dial the close from tight to a gradual swell.
|
||||
|
||||
### Notes
|
||||
|
||||
- All amp, cabinet, and microphone models are original DSP generated in code — not captures
|
||||
of any specific hardware, speaker, microphone, or IR pack. Tube tone stacks follow the
|
||||
published Yeh & Smith analysis of the classic passive tone-stack circuit.
|
||||
|
||||
## [2.1.3] — 2026-07-13
|
||||
|
||||
A tuner fix. Engaging the chromatic tuner could crackle or pop through the output —
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 14;
|
||||
CURRENT_PROJECT_VERSION = 15;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
@@ -175,7 +175,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.0;
|
||||
MARKETING_VERSION = 2.1.6;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeBuilder;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@@ -193,7 +193,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 14;
|
||||
CURRENT_PROJECT_VERSION = 15;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
INFOPLIST_FILE = ShoeGazeBuilder/Info.plist;
|
||||
@@ -204,7 +204,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.0;
|
||||
MARKETING_VERSION = 2.1.6;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeBuilder;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = ShoeGazeBuilderiOS/ShoeGazeBuilderiOS.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
INFOPLIST_FILE = ShoeGazeBuilderiOS/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = ShoeGaze;
|
||||
@@ -175,7 +175,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.0.0;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeBuilderiOS;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
@@ -194,7 +194,7 @@
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = ShoeGazeBuilderiOS/ShoeGazeBuilderiOS.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
INFOPLIST_FILE = ShoeGazeBuilderiOS/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = ShoeGaze;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
|
||||
@@ -203,7 +203,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.0.0;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeBuilderiOS;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
|
||||
@@ -143,8 +143,12 @@ open class Pedal: SynthesizerBase {
|
||||
open func rigWillTeardown() {}
|
||||
|
||||
/// Number of standard enclosure widths this pedal's card occupies in the UI. Defaults
|
||||
/// to `1`. A control-dense pedal (e.g. the looper) overrides to `2` for a wider card.
|
||||
/// The UI multiplies its base enclosure width by this factor; `1` is the normal stompbox.
|
||||
/// to `1`. This sets the card's **base width in knob columns**: `1` = a three-wide card, `≥ 2` =
|
||||
/// four-wide (and the knob grid packs that many across). It is both the grid's column count and
|
||||
/// the card's minimum width, so a `2` pedal is a four-wide card even with few knobs (e.g. the
|
||||
/// Cabinet, to keep its selector captions readable). A pedal whose selector/switch row is wider
|
||||
/// still pushes wider; values above `2` add nothing. (The looper is the sole exception: it
|
||||
/// overrides the UI to a fixed multi-column layout scaled by this value.)
|
||||
open var widthUnits: Int { 1 }
|
||||
|
||||
/// `true` when the board has placed this pedal in a stereo (width-2) region.
|
||||
|
||||
@@ -316,7 +316,8 @@ open class AmpVoicePedal: Pedal {
|
||||
/// The amp is fully wet (it replaces the dry signal); hide the Mix control.
|
||||
public override var showsMixControl: Bool { false }
|
||||
|
||||
/// Amp-head-style double-width card.
|
||||
/// Amps use a four-wide knob grid for their Gain/Bass/Mid/Treble + signature controls (the card
|
||||
/// width is sized to content — see `PedalView.enclosureWidth`).
|
||||
public override var widthUnits: Int { 2 }
|
||||
|
||||
public override var summary: String { summaryText }
|
||||
|
||||
@@ -75,9 +75,6 @@ public final class AnaheimAmpPedal: AmpVoicePedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the three switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
/// Creates an Anaheim amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
||||
@@ -70,9 +70,6 @@ open class BoutiqueAmpPedal: AmpVoicePedal {
|
||||
}
|
||||
public override var powerAmpOversample: Int { 4 }
|
||||
|
||||
/// Wider card for the Presence/Depth/Master/Drive knobs plus the Channel switch.
|
||||
public override var widthUnits: Int { 4 }
|
||||
|
||||
/// Clean preamp, plus a cascaded lead stage on the Lead channel. `channel` is read at
|
||||
/// board-build time (the switch is `rebuildsOnChange`), so only the selected channel is built.
|
||||
public override func preampStage(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
|
||||
@@ -36,9 +36,6 @@ public final class BritishBluesbreakerAmpPedal: BritishComboAmpPedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the extra tremolo knobs plus the Bright and Tremolo switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
/// The base Bright switch plus a Tremolo footswitch (compose `super` so Bright stays in sync).
|
||||
public override var effectSwitches: [PedalSwitch] {
|
||||
super.effectSwitches + [
|
||||
|
||||
@@ -63,9 +63,6 @@ public final class BritishDualAmpPedal: BritishComboAmpPedal {
|
||||
}
|
||||
public override var powerAmpOversample: Int { 4 }
|
||||
|
||||
/// Wider card for the extra Master/Drive/Reverb knobs plus the Bright and Channel switches.
|
||||
public override var widthUnits: Int { 4 }
|
||||
|
||||
/// Creates a British Dual amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
||||
@@ -34,9 +34,6 @@ public final class BritishMasterAmpPedal: BritishComboAmpPedal {
|
||||
}
|
||||
public override var powerAmpOversample: Int { 4 }
|
||||
|
||||
/// Wider card for the Presence/Master knobs plus the Bright switch.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
/// Creates a British Master amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
||||
@@ -51,8 +51,8 @@ public final class CabinetPedal: Pedal {
|
||||
"Speaker-cabinet impulse-response convolution with selectable built-in voicings."
|
||||
}
|
||||
|
||||
/// Double-width card — three selectors (Cab / Mic / Mic B) need the room; at single width the
|
||||
/// dials crowd and the leading selector's caption clips.
|
||||
/// Four-wide card (same as the amps), so the Cab / Mic / Mic B selector captions — cabinet and
|
||||
/// mic voice names — stay readable rather than crowding.
|
||||
public override var widthUnits: Int { 2 }
|
||||
|
||||
// MARK: - Parameters
|
||||
|
||||
@@ -65,9 +65,6 @@ public final class ChimeTopBoostAmpPedal: AmpVoicePedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the extra Cut/tremolo knobs plus the Brilliant and Tremolo switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a Chime Top Boost amp.
|
||||
|
||||
@@ -48,9 +48,6 @@ public final class FullertonDriveAmpPedal: AmpVoicePedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the Reverb/Drive knobs plus the Bright and Channel switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
public override var effectSwitches: [PedalSwitch] {
|
||||
[
|
||||
PedalSwitch(
|
||||
|
||||
@@ -68,9 +68,6 @@ open class FullertonReverbAmpPedal: AmpVoicePedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card to hold the extra reverb/tremolo knobs plus the Bright switch.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a Fullerton Reverb amp.
|
||||
|
||||
@@ -82,9 +82,6 @@ public final class JazzCleanAmpPedal: AmpVoicePedal {
|
||||
/// Stereo output — the chorus feeds two independent power-amp/cabinet channels.
|
||||
public override var channelKind: PedalChannelKind { .widener }
|
||||
|
||||
/// Wider card for the reverb/chorus knobs plus the Bright and Chorus switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a Jazz Clean amp.
|
||||
|
||||
@@ -57,9 +57,6 @@ public final class MagnaVibratoAmpPedal: AmpVoicePedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the vibrato knobs plus the Vibrato switch.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
/// Creates a Magna Vibrato amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
||||
@@ -31,10 +31,6 @@ public final class MutantPedal: Pedal {
|
||||
"Envelope-following auto-wah / funk filter that opens with your picking."
|
||||
}
|
||||
|
||||
/// Double-width so the two switches — Sweep (2-way) and the 3-way Mode — sit side by side
|
||||
/// without cramping now that switches lay out horizontally.
|
||||
public override var widthUnits: Int { 2 }
|
||||
|
||||
// MARK: - Parameters
|
||||
|
||||
/// Filter response selector. `0` = lowpass, `1` = bandpass, `2` = highpass. Driven by a three-state switch.
|
||||
|
||||
@@ -14,15 +14,17 @@ import LyrebirdUI
|
||||
/// dry ─┬─────────────────────────────────────────────────────────┐
|
||||
/// └→ AmplitudeFollower → Schmidt(lo: thr, hi: thr×ratio) │
|
||||
/// → LinLin(0…1 → floor…1) │
|
||||
/// → Lag(smooth) ───────────── × ──┴→ mono out
|
||||
/// → LagUpDown(fast open/slow close) × ─┴→ mono out
|
||||
/// ```
|
||||
///
|
||||
/// An `AmplitudeFollower` tracks the dry signal level. A Schmitt trigger turns that
|
||||
/// envelope into an open/closed gate with hysteresis (opens above `threshold × openRatio`,
|
||||
/// closes below `threshold`) so the gate does not chatter around the threshold. The 0/1
|
||||
/// gate is mapped to a gain in `[floor, 1]` and smoothed before multiplying the dry signal:
|
||||
/// when the gate is closed the signal is attenuated to `floor` rather than hard-muted, so
|
||||
/// `floor` sets how much of the quiet signal/noise tail bleeds through.
|
||||
/// gate is mapped to a gain in `[floor, 1]` and smoothed **asymmetrically** — opening fast so a
|
||||
/// note's attack isn't softened, closing slowly so the gate fades shut instead of snapping (a fast
|
||||
/// close popped audibly when heavy downstream gain amplified the step). When the gate is closed the
|
||||
/// signal is attenuated to `floor` rather than hard-muted, so `floor` sets how much of the quiet
|
||||
/// signal/noise tail bleeds through.
|
||||
///
|
||||
/// The wet/dry mix and bypass switching are handled by the `Pedal` base class.
|
||||
///
|
||||
@@ -35,6 +37,8 @@ import LyrebirdUI
|
||||
/// the gate. Range `[0, 0.2]`. Defaults to `0.02`.
|
||||
/// - floor: Residual gain applied while the gate is closed, in `[0, 1]`. `0` = full
|
||||
/// mute, `1` = no gating. Range `[0, 1]`. Defaults to `0.0`.
|
||||
/// - attack: Gate open time in seconds (advanced pop-over). Range `[0.001, 0.05]`. Defaults to `0.005`.
|
||||
/// - release: Gate close time in seconds (advanced pop-over). Range `[0.01, 0.5]`. Defaults to `0.08`.
|
||||
public final class NoiseGatePedal: Pedal {
|
||||
|
||||
/// One-line description shown in the picker and info panel.
|
||||
@@ -50,6 +54,15 @@ public final class NoiseGatePedal: Pedal {
|
||||
/// Residual gain while closed, [0, 1]. Range [0, 1].
|
||||
@UIParam public var floor: Double = 0.0
|
||||
|
||||
/// Gate **Attack** (open time) in seconds — how fast the gate opens on a note. Short keeps
|
||||
/// transients crisp. Range `[0.001, 0.05]`. Surfaced in the advanced pop-over.
|
||||
@UIParam public var attack: Double = 0.005
|
||||
|
||||
/// Gate **Release** (close time) in seconds — how gradually the gate fades shut as a note decays
|
||||
/// through the threshold. Short = a tight, fast gate; long = a gentle swell-down (and it rides
|
||||
/// out chatter at the threshold). Range `[0.01, 0.5]`. Surfaced in the advanced pop-over.
|
||||
@UIParam public var release: Double = 0.08
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
/// Default wet/dry blend — fully wet; the gate sits in-line.
|
||||
@@ -65,8 +78,11 @@ public final class NoiseGatePedal: Pedal {
|
||||
/// below `threshold`, giving hysteresis that prevents chatter near the threshold.
|
||||
private let openRatio: Double = 2.0
|
||||
|
||||
/// Gain-smoothing lag time, in seconds — removes the click of an instantaneous 0↔1 gate.
|
||||
private let gainSmoothTime: Double = 0.01
|
||||
// Gate-gain smoothing is **asymmetric** (``attack`` open / ``release`` close) so the gate opens
|
||||
// promptly (a new note's attack isn't softened) but closes gently. A fast symmetric close
|
||||
// snapped the gain from unity to `floor` in ~10 ms, which — with heavy downstream gain
|
||||
// (fuzz/boost) amplifying the step — read as an audible "pop" as a sustained note decayed
|
||||
// through the threshold. A slower `release` fades the gate shut instead and rides out chatter.
|
||||
|
||||
/// Gate signal bounds for the `LinLin` floor map.
|
||||
private let gateLo: Double = 0.0
|
||||
@@ -83,6 +99,12 @@ public final class NoiseGatePedal: Pedal {
|
||||
/// Floor knob range (residual gain).
|
||||
private let floorRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
|
||||
/// Attack (open-time) knob range, seconds.
|
||||
private let attackRange: ClosedRange<Double> = 0.001 ... 0.05
|
||||
|
||||
/// Release (close-time) knob range, seconds.
|
||||
private let releaseRange: ClosedRange<Double> = 0.01 ... 0.5
|
||||
|
||||
public override var effectKnobs: [PedalKnob] {
|
||||
[
|
||||
PedalKnob(label: "Threshold", node: $threshold, range: thresholdRange),
|
||||
@@ -90,6 +112,16 @@ public final class NoiseGatePedal: Pedal {
|
||||
]
|
||||
}
|
||||
|
||||
/// Timing controls, tucked behind the pedal card's advanced pop-over: **Attack** (open time) and
|
||||
/// **Release** (close time). Live nodes, append-only in `advancedValues` — a gate saved before
|
||||
/// these existed loads with them at their defaults, no migration.
|
||||
public override var advancedKnobs: [PedalKnob] {
|
||||
[
|
||||
PedalKnob(label: "Attack", node: $attack, range: attackRange),
|
||||
PedalKnob(label: "Release", node: $release, range: releaseRange),
|
||||
]
|
||||
}
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a noise-gate pedal.
|
||||
@@ -141,10 +173,12 @@ public final class NoiseGatePedal: Pedal {
|
||||
outHi: openGain
|
||||
)
|
||||
|
||||
// Smooth the gain to remove the click of an instantaneous gate transition.
|
||||
let smoothed: Lag.Audio = Lag.Audio(
|
||||
// Smooth the gain asymmetrically: open fast (prompt on a note), close slowly (gentle fade,
|
||||
// no pop, and it rides out chatter as the envelope hovers at the threshold).
|
||||
let smoothed: LagUpDown.Audio = LagUpDown.Audio(
|
||||
input: gain,
|
||||
time: gainSmoothTime
|
||||
lagUp: $attack,
|
||||
lagDown: $release
|
||||
)
|
||||
|
||||
return dry * smoothed
|
||||
|
||||
@@ -54,9 +54,6 @@ public final class SixtiesComboAmpPedal: AmpVoicePedal {
|
||||
public override var powerAmpOversample: Int { 4 }
|
||||
public override var powerAmpDriveInput: any ValidGeneratorInput { grittyPowerDrive }
|
||||
|
||||
/// Wider card for the tremolo knobs plus the Tremolo switch.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
/// Creates a Sixties Combo amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
||||
@@ -95,6 +95,57 @@ public struct HelpView: View {
|
||||
+ "the top ten map to ⌘⇧1–⌘⇧0.",
|
||||
]
|
||||
)
|
||||
topicSection(
|
||||
icon: "amplifier",
|
||||
title: "Amp Models",
|
||||
intro: "Amp Model pedals are complete guitar amplifiers — preamp, tone stack, power "
|
||||
+ "amp, and a built-in speaker cabinet in one pedal. They live in the Amp Model "
|
||||
+ "row of the palette.",
|
||||
steps: [
|
||||
"Pick an amp from the Amp Model category. Each has its own voice: Gain (preamp "
|
||||
+ "drive), a Bass / Mid / Treble tone stack, and a Cab selector for its "
|
||||
+ "built-in speaker. Full-surface amps add signature controls — Master, "
|
||||
+ "Presence, Reverb, Tremolo, a channel switch, and so on.",
|
||||
"Gain (and a drive channel's Drive) read 1–11 with a musical taper: most of the "
|
||||
+ "usable grit spreads across the dial, with full saturation at the top.",
|
||||
"Master vs Level: Master drives the power-amp stage — turning it up saturates the "
|
||||
+ "amp like a real master volume. Level is a clean output trim applied after "
|
||||
+ "the amp; it changes loudness, not tone.",
|
||||
"No digital clipping: every amp ends in an analog-style soft limiter, so a driven "
|
||||
+ "amp compresses toward its ceiling instead of clipping harshly.",
|
||||
"Advanced controls (the sliders button at the top-right of the amp card open a "
|
||||
+ "pop-over): Sag, Bias, and Bias X — power-amp \"feel\" controls kept off the "
|
||||
+ "main face. Sag models power-supply droop and bloom (compression and touch "
|
||||
+ "response as you dig in); Bias sets the power tubes' operating point (cold = "
|
||||
+ "tighter, more bite; hot = warmer, rounder); Bias X balances the push-pull "
|
||||
+ "pair to shift the harmonic character. All are subtle set-and-leave voicing "
|
||||
+ "controls that default to neutral.",
|
||||
]
|
||||
)
|
||||
topicSection(
|
||||
icon: "hifispeaker",
|
||||
title: "Cabinets & Microphones",
|
||||
intro: "Every amp has a built-in cabinet, but you can also run a dedicated Cabinet "
|
||||
+ "pedal for full speaker-and-microphone control.",
|
||||
steps: [
|
||||
"Built-in vs standalone: an amp's Cab selector picks its onboard speaker voicing "
|
||||
+ "— the quick path, one knob. For deeper control, set the amp's Cab to "
|
||||
+ "\"None (direct)\" and add a Cabinet pedal after it. (On \"None\" the amp "
|
||||
+ "sounds raw and fizzy by itself — expected; the Cabinet pedal is what "
|
||||
+ "supplies the speaker.)",
|
||||
"The Cabinet pedal's Cab selector chooses the speaker voicing, and Mic chooses the "
|
||||
+ "microphone — Dynamic, Ribbon, Condenser, or No Mic. The mic colour is baked "
|
||||
+ "into the same speaker response, so it costs nothing extra.",
|
||||
"Mic placement (the Cabinet's advanced pop-over, again via the top-right sliders "
|
||||
+ "button): Position moves the mic from on-axis (bright, on the dust cap) "
|
||||
+ "toward the cone edge (darker, smoother); Proximity runs from a distant, "
|
||||
+ "flat low end to a close-mic'd bass lift.",
|
||||
"Dual-mic (same pop-over): set Mic B to a second microphone to blend two mics. "
|
||||
+ "Mic Blend sets the A/B balance; Mic Offset spaces them apart for the comb "
|
||||
+ "colour of a real two-mic setup (a set-and-leave spacing control — sweeping "
|
||||
+ "it live acts like a flanger).",
|
||||
]
|
||||
)
|
||||
topicSection(
|
||||
icon: "repeat",
|
||||
title: "The Looper Pedal",
|
||||
|
||||
@@ -160,15 +160,21 @@ public struct PedalPaletteView: View {
|
||||
}
|
||||
|
||||
/// The `.amp` bucket on its own, or `nil` when no amp models are visible. Split out so the
|
||||
/// horizontal picker can drop the (large) amp list into the ROUTING row instead of letting it
|
||||
/// stretch the head of the effects row.
|
||||
/// horizontal picker can drop the (large) amp list into the second row (with Routing and the
|
||||
/// Cabinet) instead of letting it stretch the head of the effects row.
|
||||
private var ampGroup: (category: PedalCategory, names: [String])? {
|
||||
groupedVisiblePedals.first { $0.category == .amp }
|
||||
}
|
||||
|
||||
/// Visible pedal groups excluding the amp models — everything the effects row shows.
|
||||
/// The `.cabinet` bucket on its own, or `nil` when no cabinet is visible. Sits on the second row
|
||||
/// between Routing and the amp models (rig-structure controls grouped together).
|
||||
private var cabinetGroup: (category: PedalCategory, names: [String])? {
|
||||
groupedVisiblePedals.first { $0.category == .cabinet }
|
||||
}
|
||||
|
||||
/// Visible pedal groups excluding the amp models and the cabinet — the actual effects row (row 1).
|
||||
private var effectGroups: [(category: PedalCategory, names: [String])] {
|
||||
groupedVisiblePedals.filter { $0.category != .amp }
|
||||
groupedVisiblePedals.filter { $0.category != .amp && $0.category != .cabinet }
|
||||
}
|
||||
|
||||
// MARK: - Body
|
||||
@@ -232,6 +238,16 @@ public struct PedalPaletteView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
if let cabinet: (category: PedalCategory, names: [String]) = cabinetGroup {
|
||||
VStack(alignment: .leading, spacing: PedalPaletteView.rowSpacing) {
|
||||
categoryLabel(cabinet.category)
|
||||
HStack(alignment: .top, spacing: PedalPaletteView.rowSpacing) {
|
||||
ForEach(cabinet.names, id: \.self) { name in
|
||||
pedalRow(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if let amps: (category: PedalCategory, names: [String]) = ampGroup {
|
||||
VStack(alignment: .leading, spacing: PedalPaletteView.rowSpacing) {
|
||||
categoryLabel(amps.category)
|
||||
|
||||
@@ -422,9 +422,12 @@ public struct PedalView: View {
|
||||
|
||||
// MARK: - Layout constants
|
||||
|
||||
/// Wide enough for three ~55 pt knobs (dial + label + value) plus padding in a
|
||||
/// single row, so the effect controls never overlap.
|
||||
/// Base card width — used by the looper's fixed multi-unit layout. Other pedals size to content
|
||||
/// via ``enclosureColumnWidth`` (see `enclosureWidth(for:)`).
|
||||
private static let enclosureWidth: CGFloat = 220
|
||||
/// Per-column width for the content-sized enclosure — one knob/selector/switch slot (a ~50 pt
|
||||
/// dial plus its caption). Card width = `2·padding + columns·this + (columns−1)·knobSpacing`.
|
||||
private static let enclosureColumnWidth: CGFloat = 68
|
||||
private static let enclosureCornerRadius: CGFloat = 12
|
||||
private static let enclosurePadding: CGFloat = 14
|
||||
private static let screwInset: CGFloat = 6
|
||||
@@ -958,19 +961,35 @@ public struct PedalView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Enclosure width — the base stompbox width scaled by the pedal's `widthUnits`
|
||||
/// (a control-dense pedal such as the looper asks for a double-width card), widened
|
||||
/// further to fit a wide vertical-fader bank (e.g. a multi-band graphic EQ) so its
|
||||
/// faders are never clipped.
|
||||
/// Enclosure width, sized to the pedal's **content** rather than a flat `widthUnits × base`
|
||||
/// multiple (which left control-sparse multi-unit cards — amps, the Cabinet — mostly empty).
|
||||
///
|
||||
/// The card is `columns` wide, where `columns` is the pedal's base knob-grid width from
|
||||
/// `widthUnits` (`1` → `knobColumnCount`, `≥ 2` → `wideKnobColumnCount`) — so a `widthUnits: 2`
|
||||
/// pedal is always a four-wide card even if it carries fewer knobs (this is how the Cabinet
|
||||
/// matches the amps so its selector captions stay readable). A pedal whose selector or switch row
|
||||
/// is wider than that pushes wider still. It is widened further to fit a vertical-fader bank
|
||||
/// (e.g. a multi-band graphic EQ) so its faders are never clipped.
|
||||
///
|
||||
/// The looper is the exception: its bespoke three-column layout (timeline · knobs · transport)
|
||||
/// genuinely needs the full multi-unit width, so it keeps the flat multiple.
|
||||
private func enclosureWidth(for sliders: [PedalSlider]) -> CGFloat {
|
||||
let unitWidth: CGFloat = PedalView.enclosureWidth * CGFloat(max(1, pedal.widthUnits))
|
||||
if pedal is LooperPedal {
|
||||
return PedalView.enclosureWidth * CGFloat(max(1, pedal.widthUnits))
|
||||
}
|
||||
let gridColumns: Int = pedal.widthUnits >= 2 ? PedalView.wideKnobColumnCount : PedalView.knobColumnCount
|
||||
let columns: Int = max(gridColumns, inlineSelectors.count, pedal.effectSwitches.count)
|
||||
let contentWidth: CGFloat = 2 * PedalView.enclosurePadding
|
||||
+ CGFloat(columns) * PedalView.enclosureColumnWidth
|
||||
+ CGFloat(max(0, columns - 1)) * PedalView.knobSpacing
|
||||
|
||||
let sliderCount: Int = sliders.count
|
||||
guard sliderCount > 0 else { return unitWidth }
|
||||
guard sliderCount > 0 else { return contentWidth }
|
||||
let bankContentWidth: CGFloat =
|
||||
CGFloat(sliderCount) * PedalView.sliderBankItemWidth
|
||||
+ CGFloat(max(0, sliderCount - 1)) * PedalView.sliderBankSpacing
|
||||
let needed: CGFloat = bankContentWidth + 2 * PedalView.enclosurePadding
|
||||
return max(unitWidth, needed)
|
||||
return max(contentWidth, needed)
|
||||
}
|
||||
|
||||
/// Bottom control row: the `Level` knob, the bypass switch, and the `Mix` knob,
|
||||
|
||||
@@ -133,7 +133,7 @@ struct BoutiqueAmpPedalTests {
|
||||
#expect(lead.effectKnobs.map { $0.label }
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Presence", "Depth", "Master", "Drive"])
|
||||
#expect(lead.effectSwitches.map { $0.label } == ["Channel"])
|
||||
#expect(lead.widthUnits == 4)
|
||||
#expect(lead.widthUnits == 2)
|
||||
#expect(lead.toneStackModel == .soldano)
|
||||
#expect(lead.powerAmpOversample == 4)
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ struct BritishComboAmpPedalTests {
|
||||
let pedal: BritishBluesbreakerAmpPedal = BritishBluesbreakerAmpPedal()
|
||||
#expect(pedal.effectKnobs.map { $0.label } == ["Gain", "Bass", "Mid", "Treble", "Presence", "Speed", "Intensity"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Tremolo"])
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
}
|
||||
|
||||
@Test func bluesbreakerTremoloIntensityChangesOutput() throws {
|
||||
|
||||
@@ -92,7 +92,7 @@ struct BritishMasterAmpPedalTests {
|
||||
let pedal: BritishMasterAmpPedal = BritishMasterAmpPedal()
|
||||
#expect(pedal.effectKnobs.map { $0.label } == ["Gain", "Bass", "Mid", "Treble", "Presence", "Master"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright"])
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.toneStackModel == .marshall)
|
||||
#expect(pedal.powerAmpOversample == 4)
|
||||
}
|
||||
@@ -140,7 +140,7 @@ struct BritishMasterAmpPedalTests {
|
||||
#expect(pedal.effectKnobs.map { $0.label }
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Presence", "Master", "Drive", "Reverb"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Channel"])
|
||||
#expect(pedal.widthUnits == 4)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.toneStackModel == .marshall)
|
||||
#expect(pedal.powerAmpOversample == 4)
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ struct CaliHiGainAmpPedalTests {
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Presence", "Depth", "Master", "Drive"])
|
||||
#expect(pedal.effectSliders.map { $0.label } == ["80", "240", "750", "2.2k", "6.6k"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Channel"])
|
||||
#expect(pedal.widthUnits == 4)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.toneStackModel == .mesa)
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ struct ChimeTopBoostAmpPedalTests {
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Brilliant", "Tremolo"])
|
||||
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"])
|
||||
#expect(pedal.effectSelectors.first?.rebuildsOnChange == true)
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.showsMixControl == false)
|
||||
#expect(pedal.toneStackModel == .vox)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ struct FullertonDriveAmpPedalTests {
|
||||
#expect(pedal.effectKnobs.map { $0.label } == ["Gain", "Bass", "Mid", "Treble", "Reverb", "Drive"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Channel"])
|
||||
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"])
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.toneStackModel == .fender)
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ struct FullertonReverbAmpPedalTests {
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Reverb FX", "Vibrato"])
|
||||
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"])
|
||||
#expect(pedal.effectSelectors.first?.rebuildsOnChange == true)
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.showsMixControl == false)
|
||||
#expect(pedal.toneStackModel == .fender)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ struct FullertonVariantsTests {
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Reverb", "Speed", "Intensity"], "\(v.name) knobs")
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Reverb FX", "Vibrato"], "\(v.name) switches")
|
||||
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"], "\(v.name) selectors")
|
||||
#expect(pedal.widthUnits == 3, "\(v.name) width")
|
||||
#expect(pedal.widthUnits == 2, "\(v.name) width")
|
||||
#expect(pedal.toneStackModel == .fender, "\(v.name) tone stack")
|
||||
#expect(pedal.powerAmpOversample == 4, "\(v.name) should oversample the harder-driven power amp at 4×")
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ struct JazzCleanAmpPedalTests {
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Chorus", "Channel"])
|
||||
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"])
|
||||
#expect(pedal.effectSelectors.first?.rebuildsOnChange == true)
|
||||
#expect(pedal.widthUnits == 3)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.showsMixControl == false)
|
||||
#expect(pedal.channelKind == .widener, "Jazz Clean should be a stereo widener")
|
||||
#expect(pedal.toneStackModel == .fender)
|
||||
|
||||
@@ -103,7 +103,7 @@ struct ModernHighGainAmpPedalTests {
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Presence", "Depth", "Master", "Drive"])
|
||||
#expect(pedal.advancedKnobs.map { $0.label } == ["Sag", "Bias", "Bias X"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Channel", "Tight"])
|
||||
#expect(pedal.widthUnits == 4)
|
||||
#expect(pedal.widthUnits == 2)
|
||||
#expect(pedal.toneStackModel == .mesa)
|
||||
#expect(pedal.sag == 0.3, "Modern High-Gain keeps rectifier sag on by default")
|
||||
}
|
||||
|
||||
@@ -89,4 +89,85 @@ struct NoiseGatePedalTests {
|
||||
let samples: [Float] = try render(threshold: 0.95, floor: 1.0)
|
||||
#expect(hasNonSilentOutput(samples), "Unity-floor gate muted the signal")
|
||||
}
|
||||
|
||||
/// A sine that steps from loud (0.3, gate open) down to a constant below-threshold level (0.03)
|
||||
/// over 50 ms and holds there — so the gate opens, then closes, while the source level stays
|
||||
/// constant. That isolates the gate's close fade (release-dependent) from any source decay.
|
||||
/// `Line` holds its `end` value after `dur`, giving the sustained low tail.
|
||||
private final class DecaySineSource: SynthesizerBase {
|
||||
private let bus: Int
|
||||
init(bus: Int) { self.bus = bus; super.init() }
|
||||
override func build() {
|
||||
output(bus: bus, source: OscSin.Audio(freq: 220.0) * Line.Control(start: 0.3, end: 0.03, dur: 0.05))
|
||||
}
|
||||
}
|
||||
|
||||
/// Energy in the gate's *close window* — the source steps down through the threshold ~50 ms in
|
||||
/// then holds a constant below-threshold level, so the output energy after that reflects only how
|
||||
/// long the gate lingers before it finishes fading shut. A longer `release` = more lingering
|
||||
/// energy; a snap close = little. (floor 0, so once fully closed the tail is silent.)
|
||||
private func closeWindowEnergy(release: Double) throws -> Double {
|
||||
let sampleRate: Double = 48000.0
|
||||
let (engine, url): (SynthesisEngine, URL) = makeNRTEngine(duration: 0.6, sampleRate: sampleRate)
|
||||
defer { try? FileManager.default.removeItem(at: url) }
|
||||
let srcBus: AudioBus = try engine.busAllocator.allocateAudioBus(channelCount: 1)
|
||||
let dstBus: AudioBus = try engine.busAllocator.allocateAudioBus(channelCount: 1)
|
||||
defer { engine.busAllocator.releaseAudioBus(srcBus); engine.busAllocator.releaseAudioBus(dstBus) }
|
||||
let source: DecaySineSource = DecaySineSource(bus: srcBus.index)
|
||||
let gate: NoiseGatePedal = NoiseGatePedal(inputBus: srcBus.index, outputBus: dstBus.index)
|
||||
gate.sampleRate = sampleRate
|
||||
gate.threshold = 0.06
|
||||
gate.floor = 0.0
|
||||
gate.release = release
|
||||
let master: TestRouteMaster = TestRouteMaster(inputBusIndex: dstBus.index)
|
||||
try engine.add(source)
|
||||
try engine.add(gate, position: NodePosition.after(source))
|
||||
try engine.add(master, position: NodePosition.after(gate))
|
||||
try engine.start()
|
||||
let inter: [Float] = readStereoCAF(url: url, sampleRate: sampleRate)
|
||||
let mono: [Double] = stride(from: 0, to: inter.count, by: 2).map { Double(inter[$0]) }
|
||||
let start: Int = Int(0.12 * sampleRate) // after the step-down; the gate is closing/closed
|
||||
var energy: Double = 0.0
|
||||
for i: Int in start..<mono.count { energy += mono[i] * mono[i] }
|
||||
return energy
|
||||
}
|
||||
|
||||
@Test func releaseTunesCloseTime() throws {
|
||||
// A long Release lets the gate linger (more energy through the close) vs a short Release that
|
||||
// snaps shut — and the shipped default (0.08) lingers well past a near-instant close, so the
|
||||
// gate fades rather than pops. Guards both the Release control and the pop fix.
|
||||
let fast: Double = try closeWindowEnergy(release: 0.02)
|
||||
let slow: Double = try closeWindowEnergy(release: 0.4)
|
||||
let deflt: Double = try closeWindowEnergy(release: 0.08)
|
||||
#expect(slow > fast * 1.5, "long Release did not linger longer than short (fast=\(fast) slow=\(slow))")
|
||||
#expect(deflt > fast * 1.2, "default close is nearly as abrupt as the fast close (\(deflt) vs \(fast))")
|
||||
}
|
||||
|
||||
@Test func exposesAttackReleaseInAdvancedPopover() throws {
|
||||
#expect(NoiseGatePedal().advancedKnobs.map { $0.label } == ["Attack", "Release"])
|
||||
// Attack/Release are pop-over only — not on the face.
|
||||
let face: [String] = NoiseGatePedal().effectKnobs.map { $0.label }
|
||||
#expect(face == ["Threshold", "Floor"])
|
||||
}
|
||||
|
||||
@Test func attackReleaseRoundTripThroughState() throws {
|
||||
let pedal: NoiseGatePedal = NoiseGatePedal()
|
||||
pedal.attack = 0.02
|
||||
pedal.release = 0.3
|
||||
let restored: NoiseGatePedal = NoiseGatePedal()
|
||||
restored.applyState(pedal.captureState())
|
||||
#expect(restored.attack == 0.02 && restored.release == 0.3, "Attack/Release did not round-trip")
|
||||
}
|
||||
|
||||
@Test func legacyGateWithoutAdvancedValuesDefaultsTiming() throws {
|
||||
// A gate saved before Attack/Release existed has empty advancedValues → timing defaults, and
|
||||
// Threshold/Floor still restore correctly (append-only, no migration).
|
||||
let legacy: PedalState = PedalState(
|
||||
id: UUID(), type: "Noise Gate",
|
||||
knobValues: [0.03, 0.4, 1.0, 0.7], selectorValues: [], advancedValues: [], bypass: 0.0)
|
||||
let pedal: NoiseGatePedal = NoiseGatePedal()
|
||||
pedal.applyState(legacy)
|
||||
#expect(pedal.threshold == 0.03 && pedal.floor == 0.4, "legacy Threshold/Floor mis-mapped")
|
||||
#expect(pedal.attack == 0.005 && pedal.release == 0.08, "legacy gate should default Attack/Release")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user