31 lines
1.1 KiB
Swift
31 lines
1.1 KiB
Swift
// ScannedSynthesizerShape.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/// Initial displacement shape for a `ScannedSynthesizer` mass network.
|
|
///
|
|
/// Applied at `init` to seed the position array with energy so the network begins
|
|
/// resonating immediately. Use `.zeros` when you want the network to start silent
|
|
/// and rely entirely on excitation from the `excitation` input.
|
|
public enum ScannedSynthesizerShape: Sendable {
|
|
/// A Gaussian bell curve centred at mid-ring.
|
|
///
|
|
/// Produces a smooth, rounded initial profile that excites a broad range of modes.
|
|
case gaussian
|
|
|
|
/// One full sine cycle distributed around the ring.
|
|
///
|
|
/// Preferentially excites the fundamental mode of the network.
|
|
case sine
|
|
|
|
/// A single mass displaced by +1.0 at `excitationIndex`; all others at 0.
|
|
///
|
|
/// Produces an impulsive start that excites all modes equally.
|
|
case impulse
|
|
|
|
/// All masses at rest. Output is silent until energy arrives via the `excitation` input.
|
|
case zeros
|
|
}
|