 //  main.swift
 //  AudioKit
 //
-//  Created by Aurelius Prochazka on 12/28/14.
+//  Created by Nick Arner and Aurelius Prochazka on 12/28/14.
 //  Copyright (c) 2014 Aurelius Prochazka. All rights reserved.
 //
 
 import Foundation
+
+let testDuration: Float = 10.0
 
 class Instrument : AKInstrument {
 

let instrument = Instrument()
AKOrchestra.addInstrument(instrument)

AKOrchestra.testForDuration(10)

instrument.play()


        let soundFile = AKSoundFile(filename: filename)
        connect(soundFile)

        let speed = AKLine(firstPoint: 3.ak, secondPoint: 0.5.ak, durationBetweenPoints: testDuration.ak)
        connect(speed)

        let functionTableLooper = AKFunctionTableLooper(functionTable: soundFile)
        functionTableLooper.endTime = 9.6.ak
        functionTableLooper.transpositionRatio = speed
        functionTableLooper.loopMode = AKFunctionTableLooperMode.ForwardAndBack
        connect(functionTableLooper)
        
        enableParameterLog(
            "Transposition Ratio = ",
            parameter: functionTableLooper.transpositionRatio,
            frequency:0.1
        )

        connect(AKAudioOutput(audioSource:functionTableLooper))
    }
}

