Skip to content

Commit b6bed8c

Browse files
committed
Starting the talkbox with the aid of AlexAI
1 parent f6b536d commit b6bed8c

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/
2+
// This file was auto-autogenerated by scripts and templates at http://github.com/AudioKit/AudioKitDevTools/
3+
4+
import AudioKit
5+
import AudioKitEX
6+
import AVFoundation
7+
import CAudioKitEX
8+
9+
/// A digital effect of talk box. A talk box or talkbox is an effects unit that allows musicians to modify the sound
10+
/// of a musical instrument by shaping the frequency content of the sound using their mouth. The effect can be used
11+
/// to make a musical instrument sound as if it's speaking, or to create other vocal-like effects.
12+
///
13+
public class Talkbox: Node {
14+
let input: Node
15+
16+
/// Connected nodes
17+
public var connections: [Node] { [input] }
18+
19+
/// Underlying AVAudioNode
20+
public var avAudioNode = instantiate(effect: "tbox")
21+
22+
// MARK: - Parameters
23+
24+
/// Dry/wet mix.
25+
public static let balanceDef = NodeParameterDef(
26+
identifier: "balance",
27+
name: "Balance",
28+
address: akGetParameterAddress("TalkboxParameterBalance"),
29+
defaultValue: 1,
30+
range: 0 ... 1,
31+
unit: .percent
32+
)
33+
34+
/// Dry/wet mix. Should be a value between 0-1.
35+
@Parameter(balanceDef) public var balance: AUValue
36+
37+
38+
// MARK: - Initialization
39+
40+
/// Initialize this talkbox node
41+
///
42+
/// - Parameters:
43+
/// - input: Input node to process
44+
/// - balance: dry wet mix
45+
///
46+
public init(
47+
_ input: Node,
48+
balance: AUValue = balanceDef.defaultValue
49+
) {
50+
self.input = input
51+
52+
setupParameters()
53+
54+
self.balance = balance
55+
}
56+
}

0 commit comments

Comments
 (0)