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,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTD/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>Platforms</key>
<array>
<string>com.apple.platform.macosx</string>
<string>com.apple.platform.iphoneos</string>
</array>
<key>Description</key>
<string>A SynthesizerBase subclass with @UIParam slots — exposes parameters that bind to ParameterKnob / ParameterSlider in SwiftUI. Includes a starter build() with sine + Pan2. Pair with a SwiftUI view that takes the synth and reads synth.$paramName for each control. Requires LyrebirdUI module.</string>
<key>Summary</key>
<string>Lyrebird Synthesizer (UI-bindable @UIParam)</string>
<key>SortOrder</key>
<string>22</string>
<key>AllowedTypes</key>
<array>
<string>public.swift-source</string>
</array>
<key>DefaultCompletionName</key>
<string>MyUISynth</string>
<key>MainTemplateFile</key>
<string>___FILEBASENAME___.swift</string>
<key>Options</key>
<array>
<dict>
<key>Identifier</key>
<string>productName</string>
<key>Required</key>
<true/>
<key>Name</key>
<string>Synthesizer name:</string>
<key>Description</key>
<string>Name of the Synthesizer subclass (also used as the file name).</string>
<key>Type</key>
<string>text</string>
<key>Default</key>
<string>MyUISynth</string>
</dict>
</array>
</dict>
</plist>
@@ -0,0 +1,49 @@
//___FILEHEADER___
import Foundation
import LyrebirdSynth
import LyrebirdUI
// MARK: - ___FILEBASENAMEASIDENTIFIER___
/// One-line description of ___FILEBASENAMEASIDENTIFIER___.
///
/// `@UIParam` slots expose both an atomic RT-safe parameter (like `@LiveParam`)
/// AND a `UIParamNode` projected value that binds directly to SwiftUI controls
/// in the LyrebirdUI module — `ParameterKnob`, `ParameterSlider`, `ParameterXY`.
///
/// ## Usage
/// ```swift
/// let synth = ___FILEBASENAMEASIDENTIFIER___()
/// try engine.add(synth)
///
/// // In a SwiftUI View:
/// VStack {
/// ParameterKnob("Freq", node: synth.$frequency, range: 110...880)
/// ParameterKnob("Amp", node: synth.$amplitude, range: 0...1)
/// ParameterKnob("Pan", node: synth.$pan, range: -1...1)
/// }
///
/// // From code, mutate directly — atomic, RT-safe:
/// synth.frequency = 660.0
/// ```
public final class ___FILEBASENAMEASIDENTIFIER___: SynthesizerBase {
// MARK: - Parameters
/// Fundamental frequency in Hz.
@UIParam public var frequency: Double = 440.0
/// Output amplitude (linear gain). `0.0` = silence, `1.0` = unity.
@UIParam public var amplitude: Double = 0.25
/// Stereo pan. `-1` = hard left, `0` = center, `+1` = hard right.
@UIParam public var pan: Double = 0.0
// MARK: - Build
public override func build() {
let osc = OscSin.Audio(freq: $frequency)
output(bus: 0, source: Pan2(input: osc * $amplitude, pan: $pan))
}
}