                                     duration: Double = 1.0,
                                     type: CurveType = .Exponential,
                                     curvature: Double = 1.0,
-                                    controlRate: Double = 1/60) -> [Double] {
+                                    controlRate: Double = 1 / 60) -> [Double] {
         var curvePoints = [Double]()
         let stepCount = Int(floor(duration / controlRate))
         var counter = 0
         let direction: Double = source > target ? 1.0 : -1.0
         if counter <= stepCount {
-            let controlAmount: Double = Double(counter) / Double(stepCount) //normalised 0-1 value
+            //normalized 0-1 value
+            let controlAmount: Double = Double(counter) / Double(stepCount)
             var scaledControlAmount: Double = 0.0
             
             switch type {
             case .Linear:
-                scaledControlAmount = denormalize(controlAmount, minimum: source, maximum: target, taper: 1)
+                scaledControlAmount = denormalize(controlAmount,
+                                                  minimum: source,
+                                                  maximum: target,
+                                                  taper: 1)
             case .Exponential:
-                scaledControlAmount = denormalize(controlAmount, minimum: source, maximum: target, taper: curvature)
+                scaledControlAmount = denormalize(controlAmount,
+                                                  minimum: source,
+                                                  maximum: target,
+                                                  taper: curvature)
             case .EqualPower:
-                scaledControlAmount = pow((0.5 + 0.5 * direction * cos(M_PI * controlAmount)), 0.5) //direction will be negative if going up
+                //direction will be negative if going up
+                scaledControlAmount = pow((0.5 + 0.5 * direction * cos(M_PI * controlAmount)), 0.5)
             }
             curvePoints.append(scaledControlAmount)
             counter += 1

    var fadeTimer = NSTimer()
    var fadeScheduleTimer = NSTimer()
    
    let cadTimerRate: Double = 1/60
    var cadDelayTimer: CADisplayLink?
    var cadUpdateTimer: CADisplayLink?
    var cadTimerIncrement: Int = 0

        output!.gain = initialVolume
    }
    
    /// Start the fade WITH the offset
    public func start() { //starts the fade WITH the offset
        scheduleFade(0.0)
    }
    /// Start the fade WITHOUT the offset
    public func startImmediately() { //skips the offset
        //this starts the recurring timer
        let millis = NSDate().timeIntervalSince1970*1000
