 //  AudioKit
 //
 //  Autogenerated by scripts by Aurelius Prochazka. Do not edit directly.
-//  Copyright (c) 2015 Aurelius Prochazka. All rights reserved.
+//  Copyright (c) 2016 Aurelius Prochazka. All rights reserved.
 //
 
 import AVFoundation

/// - parameter bandwidth: Bandwidth (Cents) ranges from 100 to 12000 (Default: 600)
///
public class AKBandPassFilter: AKNode {
    
    private let cd = AudioComponentDescription(
        componentType: kAudioUnitType_Effect,
        componentSubType: kAudioUnitSubType_BandPassFilter,
        componentManufacturer: kAudioUnitManufacturer_Apple,
        componentFlags: 0,
        componentFlagsMask: 0)
    
    internal var internalEffect = AVAudioUnitEffect()
    internal var internalAU = AudioUnit()
    public var avAudioNode: AVAudioNode
    /// Required property for AKNode containing all the node's connections
    public var connectionPoints = [AVAudioConnectionPoint]()
    
    private var input: AKNode?
    
    /// Center Frequency (Hz) ranges from 20 to 22050 (Default: 5000)
    public var centerFrequency: Double = 5000 {
        didSet {
            if centerFrequency < 20 {
                centerFrequency = 20
            }
            if centerFrequency > 22050 {
                centerFrequency = 22050
            }

        }
    }
    
    /// Dry/Wet Mix (Default 50)
    public var dryWetMix: Double = 50.0 {
        didSet {
            if dryWetMix < 0 {
                dryWetMix = 0
            }
            if dryWetMix > 100 {
                dryWetMix = 100
            }
            inputGain?.gain = 1 - dryWetMix / 100.0
            effectGain?.gain = dryWetMix / 100.0
        }
    }
    
    private var inputGain: AKGain?
    private var effectGain: AKGain?

    /// Tells whether the node is processing (ie. started, playing, or active)
    public var isStarted = true

    /// Tells whether the node is processing (ie. started, playing, or active)
    public var isPlaying: Bool {
        return isStarted
    }

    /// Tells whether the node is not processing (ie. stopped or bypassed)
    public var isStopped: Bool {
        return !isStarted
    }

    /// Tells whether the node is not processing (ie. stopped or bypassed)
    public var isBypassed: Bool {
        return !isStarted
    }

    /// Initialize the band pass filter node
    ///
    /// - parameter input: Input node to process
