prep for 1.2.0 release updates
This commit is contained in:
Vendored
+44
@@ -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 ShoeGaze guitar pedal subclassing Pedal. Override effect(_:) to build the processed mono signal and effectKnobs to publish its knobs; the base class handles wet/dry mix, click-free bypass, and output level. Add it to a PedalBoard with board.add(_:).</string>
|
||||
<key>Summary</key>
|
||||
<string>ShoeGaze Pedal (Pedal subclass)</string>
|
||||
<key>SortOrder</key>
|
||||
<string>13</string>
|
||||
<key>AllowedTypes</key>
|
||||
<array>
|
||||
<string>public.swift-source</string>
|
||||
</array>
|
||||
<key>DefaultCompletionName</key>
|
||||
<string>MyPedal</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>Pedal name:</string>
|
||||
<key>Description</key>
|
||||
<string>Name of the Pedal subclass (also used as the file name).</string>
|
||||
<key>Type</key>
|
||||
<string>text</string>
|
||||
<key>Default</key>
|
||||
<string>MyPedal</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//___FILEHEADER___
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
import LyrebirdShoeGaze
|
||||
|
||||
// MARK: - ___FILEBASENAMEASIDENTIFIER___
|
||||
|
||||
/// One-line description of the ___FILEBASENAMEASIDENTIFIER___ pedal.
|
||||
///
|
||||
/// Subclasses `Pedal`: reads a mono dry signal from its input bus, processes it
|
||||
/// in `effect(_:)`, and lets the base class apply the wet/dry `mix`, click-free
|
||||
/// `bypass`, and output `level`. Publish the effect's knobs via `effectKnobs`
|
||||
/// so `PedalView` renders a control for each one.
|
||||
///
|
||||
/// ## Usage
|
||||
/// ```swift
|
||||
/// let board = try shoeGaze.addBoard()
|
||||
/// try board.add(___FILEBASENAMEASIDENTIFIER___())
|
||||
/// try shoeGaze.finalizeBoard(board)
|
||||
/// ```
|
||||
final class ___FILEBASENAMEASIDENTIFIER___: Pedal {
|
||||
|
||||
// MARK: - Parameters
|
||||
|
||||
/// Effect amount. Range [0, 1].
|
||||
@UIParam var amount: Double = 0.5
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
/// Knob range for `amount`.
|
||||
private let amountRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
init(
|
||||
inputBus: Int = 0,
|
||||
outputBus: Int = 0
|
||||
) {
|
||||
super.init(name: "___FILEBASENAMEASIDENTIFIER___", inputBus: inputBus, outputBus: outputBus)
|
||||
}
|
||||
|
||||
// MARK: - Effect
|
||||
|
||||
/// Build and return the processed **mono** signal. Replace the passthrough below.
|
||||
///
|
||||
/// Fold any stereo generator (reverb, chorus) to mono with `SumChannels` before
|
||||
/// returning. Do not pre-blend with the dry signal — the base class `mix` does that.
|
||||
override func effect(_ dry: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
// TODO: wire your DSP here, e.g.:
|
||||
// return SoftClip.Audio(dry, drive: $amount * 10.0 + 1.0)
|
||||
dry
|
||||
}
|
||||
|
||||
// MARK: - UI knobs
|
||||
|
||||
/// Effect-specific knobs shown by `PedalView` before the common Mix / Level knobs.
|
||||
override var effectKnobs: [PedalKnob] {
|
||||
[
|
||||
PedalKnob(label: "Amount", node: $amount, range: amountRange),
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user