             guard let automationBaseAddress = automationPtr.baseAddress else { return }
 
             guard let observer = ParameterAutomationGetRenderObserver(parameter.address,
-                                                                      avAudioUnit.auAudioUnit.scheduleParameterBlock,
+                                                                      avAudioNode.auAudioUnit.scheduleParameterBlock,
                                                                       Float(Settings.sampleRate),
                                                                       Float(lastTime.sampleTime),
                                                                       automationBaseAddress,
                                                                       events.count) else { return }
 
-            renderObserverToken = avAudioUnit.auAudioUnit.token(byAddingRenderObserver: observer)
+            renderObserverToken = avAudioNode.auAudioUnit.token(byAddingRenderObserver: observer)
         }
     }
 
     /// Automate to a new value using a ramp.
     public func ramp(to value: AUValue, duration: Float) {
-        let paramBlock = avAudioUnit.auAudioUnit.scheduleParameterBlock
+        let paramBlock = avAudioNode.auAudioUnit.scheduleParameterBlock
         paramBlock(AUEventSampleTimeImmediate,
                    AUAudioFrameCount(duration * Float(Settings.sampleRate)),
                    parameter.address,

    /// Stop automation
    public func stopAutomation() {
        if let token = renderObserverToken {
            avAudioUnit.auAudioUnit.removeRenderObserver(token)
        }
    }


    /// - Parameter events: automation curve
    /// - Parameter startTime: optional time to start automation
    public func automate(events: [AutomationEvent], startTime: AVAudioTime? = nil) {
        var lastRenderTime = avAudioNode.lastRenderTime ?? AVAudioTime(sampleTime: 0, atRate: Settings.sampleRate)

        if !lastRenderTime.isSampleTimeValid {
            if let engine = avAudioNode.engine, engine.isInManualRenderingMode {
                lastRenderTime = AVAudioTime(sampleTime: engine.manualRenderingSampleTime, atRate: Settings.sampleRate)
            } else {
                lastRenderTime = AVAudioTime(sampleTime: 0, atRate: Settings.sampleRate)
