diff --git a/README.md b/README.md index 98e18ce..af64591 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ signal (no hardware needed) or on live guitar through an audio input. | Modulation | Tremolo, Phaser, Script Phaser, Modulation, Chorus, Flanger, Vibrato, Vibe, Rotary, Ring Modulator | | Pitch | Bass Octaver, Octave Splitter, Harmonizer, Whammy, Poly Octave | | Delay | Delay, Feedback Delay, Multi-Tap Delay, Ping-Pong, Reverse Delay, DL4 | -| Reverb | Reverb, Shimmer Reverb, Plate Reverb, Room Reverb, Spring Reverb, Reverse Reverb, Granular Reverb, Freeze Reverb, FreezVerb | +| Reverb | Reverb, Shimmer Reverb, Plate Reverb, Room Reverb, Spring Reverb, Reverse Reverb, Granular Reverb, Freeze, FreezVerb | | Texture | Diffuser, Bitcrusher, Granulator, Auto Granulator, Karplus Resonator, Looper, Tape Looper | | Amp Model | Fullerton Reverb / Deluxe / Ivy League / Drive, California, Jazz Clean, British / Plexi / JTM / Bluesbreaker / Master / Dual, Chime / Chime Top Boost / 15 / Normal / Baby, Boutique Lead / OD, Cali Hi-Gain, Modern High-Gain, Command, Citrus, Sixties Combo, Magna Vibrato, Anaheim | | Cabinet | Cabinet (speaker-voice + microphone modeling) | diff --git a/Sources/LyrebirdShoeGaze/PedalType.swift b/Sources/LyrebirdShoeGaze/PedalType.swift index 888225a..02e4e74 100644 --- a/Sources/LyrebirdShoeGaze/PedalType.swift +++ b/Sources/LyrebirdShoeGaze/PedalType.swift @@ -123,7 +123,7 @@ public extension PedalType { static let springReverb = PedalType("Spring Reverb") static let reverseReverb = PedalType("Reverse Reverb") static let granularReverb = PedalType("Granular Reverb") - static let freezeReverb = PedalType("Freeze Reverb") + static let freeze = PedalType("Freeze") static let freezVerb = PedalType("FreezVerb") // Pitch & octave diff --git a/Sources/LyrebirdShoeGaze/Pedals/FreezVerbPedal.swift b/Sources/LyrebirdShoeGaze/Pedals/FreezVerbPedal.swift index 5f11add..9a7d267 100644 --- a/Sources/LyrebirdShoeGaze/Pedals/FreezVerbPedal.swift +++ b/Sources/LyrebirdShoeGaze/Pedals/FreezVerbPedal.swift @@ -11,7 +11,7 @@ import LyrebirdUI /// at that instant is locked in as a fixed filter, and everything you play afterwards is poured /// through that frozen spectral shape into a big reverb. /// -/// Where ``FreezeReverbPedal`` holds a snapshot as a *sounding* pad, this holds a snapshot as a +/// Where ``FreezePedal`` holds a snapshot as a *sounding* pad, this holds a snapshot as a /// *filter*. A `SpectralCrossMap` masks the live spectrum bin-by-bin against a template taken from a /// side-chain analysis of the input: while live, the template tracks what you play; press Capture and /// the template freezes, so the captured moment becomes a fixed formant mask on your ongoing signal. diff --git a/Sources/LyrebirdShoeGaze/Pedals/FreezeReverbPedal.swift b/Sources/LyrebirdShoeGaze/Pedals/FreezePedal.swift similarity index 95% rename from Sources/LyrebirdShoeGaze/Pedals/FreezeReverbPedal.swift rename to Sources/LyrebirdShoeGaze/Pedals/FreezePedal.swift index df04166..2eba51a 100644 --- a/Sources/LyrebirdShoeGaze/Pedals/FreezeReverbPedal.swift +++ b/Sources/LyrebirdShoeGaze/Pedals/FreezePedal.swift @@ -1,4 +1,4 @@ -// FreezeReverbPedal.swift +// FreezePedal.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound @@ -8,7 +8,7 @@ import Foundation import LyrebirdSynth import LyrebirdUI -/// A true freeze / snapshot reverb — press **Freeze** and the sound playing at that instant is +/// A true freeze-and-hold — press **Freeze** and the sound playing at that instant is /// captured and held as an infinite, smoothly-sustaining pad while you keep playing over it. /// /// Unlike a feedback-tank "infinite reverb" (which just pushes a reverb's decay toward forever and @@ -30,7 +30,7 @@ import LyrebirdUI /// /// ## Transport /// - `Freeze`: latching footswitch — press to snapshot and hold, press again to release. -public final class FreezeReverbPedal: Pedal { +public final class FreezePedal: Pedal { /// One-line description shown in the picker and info panel. public override var summary: String { @@ -136,7 +136,7 @@ public final class FreezeReverbPedal: Pedal { frozen = 0.0 releaseGeneration += 1 let generation: Int = releaseGeneration - let fadeSeconds: Double = max(rise, FreezeReverbPedal.minReleaseDefer) + let fadeSeconds: Double = max(rise, FreezePedal.minReleaseDefer) DispatchQueue.main.asyncAfter(deadline: .now() + fadeSeconds) { [weak self] in self?.completeRelease(generation: generation) } @@ -157,7 +157,7 @@ public final class FreezeReverbPedal: Pedal { // MARK: - Init - /// Creates a freeze / snapshot reverb pedal. + /// Creates a freeze-and-hold pedal. /// /// - Parameters: /// - inputBus: Audio bus index to read the dry input from. Defaults to `0`. @@ -167,7 +167,7 @@ public final class FreezeReverbPedal: Pedal { outputBus: Int = 0 ) { super.init( - name: "Freeze Reverb", + name: "Freeze", inputBus: inputBus, outputBus: outputBus, initialMix: 1.0 @@ -183,12 +183,12 @@ public final class FreezeReverbPedal: Pedal { // Phase-vocoder spectral freeze: live analysis until `freeze()` captures the current spectrum, // then an infinite, naturally-rotating held pad regardless of further input. - let freeze: SpectralFreeze = SpectralFreeze(fftSize: FreezeReverbPedal.fftSize) + let freeze: SpectralFreeze = SpectralFreeze(fftSize: FreezePedal.fftSize) freezeProcessor = freeze let pad: SpectralChain.Audio = SpectralChain.Audio( input: dry, - fftSize: FreezeReverbPedal.fftSize, - hopSize: FreezeReverbPedal.hopSize, + fftSize: FreezePedal.fftSize, + hopSize: FreezePedal.hopSize, stages: [.mono(freeze)] ) diff --git a/Sources/LyrebirdShoeGaze/Presets/PedalRegistry.swift b/Sources/LyrebirdShoeGaze/Presets/PedalRegistry.swift index fe46d6a..8da513a 100644 --- a/Sources/LyrebirdShoeGaze/Presets/PedalRegistry.swift +++ b/Sources/LyrebirdShoeGaze/Presets/PedalRegistry.swift @@ -91,7 +91,7 @@ public enum PedalRegistry { "Spring Reverb": { SpringReverbPedal() }, "Reverse Reverb": { ReverseReverbPedal() }, "Granular Reverb": { GranularReverbPedal() }, - "Freeze Reverb": { FreezeReverbPedal() }, + "Freeze": { FreezePedal() }, "FreezVerb": { FreezVerbPedal() }, "Limiter": { LimiterPedal() }, "Cabinet": { CabinetPedal() }, diff --git a/Sources/LyrebirdShoeGazeUI/PedalCategory.swift b/Sources/LyrebirdShoeGazeUI/PedalCategory.swift index d766666..d802887 100644 --- a/Sources/LyrebirdShoeGazeUI/PedalCategory.swift +++ b/Sources/LyrebirdShoeGazeUI/PedalCategory.swift @@ -60,7 +60,7 @@ public enum PedalCategory: String, CaseIterable, Identifiable, Sendable { "Reverse Delay": .delay, "DL4": .delay, "Reverb": .reverb, "Shimmer Reverb": .reverb, "Plate Reverb": .reverb, "Room Reverb": .reverb, "Spring Reverb": .reverb, - "Reverse Reverb": .reverb, "Granular Reverb": .reverb, "Freeze Reverb": .reverb, "FreezVerb": .reverb, + "Reverse Reverb": .reverb, "Granular Reverb": .reverb, "Freeze": .reverb, "FreezVerb": .reverb, "Diffuser": .texture, "Bitcrusher": .texture, "Granulator": .texture, "Auto Granulator": .texture, "Karplus Resonator": .texture, "Tape Looper": .texture, ] diff --git a/Tests/LyrebirdShoeGazeTests/FreezeReverbPedalTests.swift b/Tests/LyrebirdShoeGazeTests/FreezePedalTests.swift similarity index 92% rename from Tests/LyrebirdShoeGazeTests/FreezeReverbPedalTests.swift rename to Tests/LyrebirdShoeGazeTests/FreezePedalTests.swift index 2c434bd..41313ef 100644 --- a/Tests/LyrebirdShoeGazeTests/FreezeReverbPedalTests.swift +++ b/Tests/LyrebirdShoeGazeTests/FreezePedalTests.swift @@ -1,4 +1,4 @@ -// FreezeReverbPedalTests.swift +// FreezePedalTests.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound @@ -31,8 +31,8 @@ private final class GatedSineSource: SynthesizerBase { } @MainActor -@Suite("FreezeReverbPedal") -struct FreezeReverbPedalTests { +@Suite("FreezePedal") +struct FreezePedalTests { private let sampleRate: Double = 44_100.0 private let sineHz: Double = 220.0 @@ -41,7 +41,7 @@ struct FreezeReverbPedalTests { private func render( duration: Double, - configure: (FreezeReverbPedal) -> Void + configure: (FreezePedal) -> Void ) throws -> [Float] { let numAudioBuses: Int = 64 let (engine, url): (SynthesisEngine, URL) = makeNRTEngine( @@ -58,7 +58,7 @@ struct FreezeReverbPedalTests { } let source: GatedSineSource = GatedSineSource(targetBus: srcBus.index, freq: sineHz) - let pedal: FreezeReverbPedal = FreezeReverbPedal(inputBus: srcBus.index, outputBus: dstBus.index) + let pedal: FreezePedal = FreezePedal(inputBus: srcBus.index, outputBus: dstBus.index) configure(pedal) let master: TestRouteMaster = TestRouteMaster(inputBusIndex: dstBus.index) @@ -77,8 +77,8 @@ struct FreezeReverbPedalTests { private func stepRender( totalFrames: Int, blockSize: Int, - configure: (FreezeReverbPedal) -> Void, - onFrame: (_ frame: Int, _ source: GatedSineSource, _ pedal: FreezeReverbPedal) -> Void + configure: (FreezePedal) -> Void, + onFrame: (_ frame: Int, _ source: GatedSineSource, _ pedal: FreezePedal) -> Void ) throws -> [Float] { let numAudioBuses: Int = 64 let numControlBuses: Int = 512 @@ -101,7 +101,7 @@ struct FreezeReverbPedalTests { } let source: GatedSineSource = GatedSineSource(targetBus: srcBus.index, freq: sineHz) - let pedal: FreezeReverbPedal = FreezeReverbPedal(inputBus: srcBus.index, outputBus: dstBus.index) + let pedal: FreezePedal = FreezePedal(inputBus: srcBus.index, outputBus: dstBus.index) configure(pedal) let master: TestRouteMaster = TestRouteMaster(inputBusIndex: dstBus.index) @@ -156,7 +156,7 @@ struct FreezeReverbPedalTests { // Unfrozen, the dry signal passes straight through — output is never silent. let out: [Float] = try render(duration: 1.0) { _ in } #expect(!out.isEmpty) - #expect(hasNonSilentOutput(out), "freeze reverb output was silent") + #expect(hasNonSilentOutput(out), "Freeze output was silent") } @Test func renderIsDeterministic() throws { @@ -255,7 +255,7 @@ struct FreezeReverbPedalTests { // MARK: - Wiring @Test func exposesControls() throws { - let pedal: FreezeReverbPedal = FreezeReverbPedal() + let pedal: FreezePedal = FreezePedal() #expect(pedal.effectKnobs.map { $0.label } == ["Verb", "Tone", "Rise"]) #expect(pedal.effectTransportButtons.map { $0.label } == ["Freeze"]) #expect(pedal.showsMixControl == false) @@ -263,7 +263,7 @@ struct FreezeReverbPedalTests { @Test func freezeTogglesHoldState() throws { // The transport latch flips the held state without needing a running engine. - let pedal: FreezeReverbPedal = FreezeReverbPedal() + let pedal: FreezePedal = FreezePedal() #expect(pedal.holding == false) pedal.toggleFreeze() #expect(pedal.holding == true) @@ -274,13 +274,13 @@ struct FreezeReverbPedalTests { } @Test func presetRoundTripPreservesControls() throws { - let pedal: FreezeReverbPedal = FreezeReverbPedal() + let pedal: FreezePedal = FreezePedal() pedal.verb = 0.33 pedal.tone = 0.8 pedal.rise = 1.5 let state: PedalState = pedal.captureState() - let restored: FreezeReverbPedal = FreezeReverbPedal() + let restored: FreezePedal = FreezePedal() restored.applyState(state) #expect(restored.verb == 0.33) @@ -291,14 +291,14 @@ struct FreezeReverbPedalTests { @Test func heldSnapshotIsNotPersisted() throws { // `frozen` is transport state, not a preset control: a pedal captured mid-freeze must restore // released, with no phantom pad blooming on load. - let pedal: FreezeReverbPedal = FreezeReverbPedal() + let pedal: FreezePedal = FreezePedal() pedal.verb = 0.4 pedal.toggleFreeze() #expect(pedal.holding == true) #expect(pedal.frozen == 1.0) let state: PedalState = pedal.captureState() - let restored: FreezeReverbPedal = FreezeReverbPedal() + let restored: FreezePedal = FreezePedal() restored.applyState(state) #expect(restored.frozen == 0.0, "a held snapshot must not persist into a preset") @@ -307,7 +307,7 @@ struct FreezeReverbPedalTests { } @Test func registeredInBuiltInRegistry() throws { - let pedal: Pedal? = PedalRegistry.makePedal(type: "Freeze Reverb") - #expect(pedal is FreezeReverbPedal) + let pedal: Pedal? = PedalRegistry.makePedal(type: "Freeze") + #expect(pedal is FreezePedal) } }