1.0.0 release

This commit is contained in:
2026-06-01 18:27:40 -07:00
parent b1ab0f102c
commit 1f20fcab20
1151 changed files with 230703 additions and 14 deletions
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>LyrebirdFM</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>AudioComponentBundle</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>AudioComponents</key>
<array>
<dict>
<key>name</key>
<string>Realized Sound: LyrebirdFM</string>
<key>description</key>
<string>Two-operator FM synthesizer (Lyrebird demo)</string>
<key>type</key>
<string>aumu</string>
<key>subtype</key>
<string>LBFM</string>
<key>manufacturer</key>
<string>RLZS</string>
<key>version</key>
<integer>65536</integer>
<key>sandboxSafe</key>
<true/>
<key>tags</key>
<array>
<string>Synth</string>
</array>
</dict>
</array>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.AudioUnit-UI</string>
<key>NSExtensionPrincipalClass</key>
<string>LyrebirdFMExtension.LyrebirdFMAudioUnitViewController</string>
</dict>
</dict>
</plist>
@@ -0,0 +1,44 @@
// LyrebirdFM.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Two-operator FM synthesizer used by the AUv3 demo extension.
///
/// Carrier and modulator are both `OscSin.Audio`. The modulator's output is
/// added to the carrier's frequency input; modulation depth is
/// `modIndex * carrierFreq` so the index reads as a unitless ratio (1.0 ≈
/// one octave of FM bandwidth at the carrier).
///
/// All four `@LiveParam`s map onto AU parameters in `LyrebirdFMAudioUnit`'s
/// `parameterMetadata()` table.
final class LyrebirdFM: SynthesizerBase {
/// Carrier frequency in Hz. Range [20, 8000]. Default 440 (A4).
@LiveParam var carrierFreq: Double = 440.0
/// Modulator-to-carrier frequency ratio. Range [0.25, 16]. Default 2.0
/// (one octave above carrier — produces an even-harmonic-rich timbre).
@LiveParam var modRatio: Double = 2.0
/// Modulation index (unitless). Range [0, 8]. Default 0.5 — mild
/// modulation; sounds close to a sine with extra brightness.
@LiveParam var modIndex: Double = 0.5
/// Output amplitude. Range [0, 1]. Default 0.3 — leaves headroom.
@LiveParam var amp: Double = 0.3
override func build() {
let modFreq = $carrierFreq * $modRatio
let modDepth = $modIndex * $carrierFreq
let modulator = OscSin.Audio(freq: modFreq, mul: modDepth)
let carrier = OscSin.Audio(freq: $carrierFreq + modulator)
let voice = carrier * $amp
// Mono → both stereo channels for AUv3 host compatibility.
output(bus: 0, source: voice)
output(bus: 1, source: voice)
}
}
@@ -0,0 +1,33 @@
// LyrebirdFMAudioUnit.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import AVFoundation
import AudioToolbox
/// AUv3 wrapper around `LyrebirdFM`. Subclasses ``LyrebirdAudioUnit`` and
/// only overrides the two required hooks: `makeSynthesizer()` and
/// `parameterMetadata()`.
///
/// The `AudioComponentDescription` (type `aumu`, subtype `LBFM`,
/// manufacturer `RLZS`) is declared in `Info.plist`'s `AudioComponents`
/// array; this class is instantiated by the AU host via
/// `NSExtensionPrincipalClass` resolution.
public final class LyrebirdFMAudioUnit: LyrebirdAudioUnit {
public override class func makeSynthesizer() -> SynthesizerBase {
LyrebirdFM()
}
public override class func parameterMetadata() -> [String: LyrebirdAUParameterInfo] {
[
"carrierFreq": .init(min: 20, max: 8000, unit: .hertz, displayName: "Carrier Freq"),
"modRatio": .init(min: 0.25, max: 16, unit: .generic, displayName: "Mod Ratio"),
"modIndex": .init(min: 0, max: 8, unit: .generic, displayName: "Mod Index"),
"amp": .init(min: 0, max: 1, unit: .linearGain, displayName: "Output Amp"),
]
}
}
@@ -0,0 +1,38 @@
// LyrebirdFMAudioUnitViewController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import CoreAudioKit
import AVFoundation
/// AUv3 view controller + factory.
///
/// `AUAudioUnitFactory` conformance is how AUv3 hosts instantiate the
/// underlying `AUAudioUnit` — the host loads this view controller as the
/// extension's `NSExtensionPrincipalClass`, calls
/// `createAudioUnit(with:)`, and the resulting AU is what handles render.
///
/// Ships an empty placeholder view. Drop in `LyrebirdSynthView` (from
/// `LyrebirdUI`) to get a Mirror-driven SwiftUI parameter grid.
public final class LyrebirdFMAudioUnitViewController: AUViewController, AUAudioUnitFactory {
/// Strong reference to the AU once `createAudioUnit(with:)` builds it.
/// The host keeps a separate reference; this is held so a SwiftUI view
/// added on top can read parameters from the same instance.
public private(set) var audioUnit: AUAudioUnit?
public override func viewDidLoad() {
super.viewDidLoad()
// Empty stub — install a SwiftUI host (e.g. `LyrebirdSynthView`) here.
}
public func createAudioUnit(
with componentDescription: AudioComponentDescription
) throws -> AUAudioUnit {
let au = try LyrebirdFMAudioUnit(componentDescription: componentDescription)
audioUnit = au
return au
}
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>