Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting different AudioKit Effects in array

I have an array of AudioKit effect to have the flexibility to add/remove or change the order of them, storing them as AKNode

var effects : [AKNode] = []

effects.append(AKCompressor())
effects.append(AKDelay())
effects.append(AKAutoWah())
... ...

The problem is doing the connections:

effects[0].connect(to: effects[1])

It doesn't work : Cannot invoke 'connect' with an argument list of type '(to: AKNode)'

Maybe I should store other class than AKNode. What's the best way to do it ?

like image 314
Fischer Avatar asked Aug 03 '26 18:08

Fischer


1 Answers

Use an array of AKInputs. The connection functions use the AKInput and AKOutput protocols. AKInput inherits from AKOutput so they're outputs too.

like image 121
dave234 Avatar answered Aug 06 '26 07:08

dave234



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!