 let instrument = Instrument()
 AKOrchestra.addInstrument(instrument)
 
-AKOrchestra.testForDuration(10)
+AKOrchestra.testForDuration(testDuration)
 
 instrument.play()
 

//  main.swift
//  AudioKit
//
//  Created by Aurelius Prochazka on 12/24/14.
//  Copyright (c) 2014 Aurelius Prochazka. All rights reserved.
//

import Foundation

class Instrument : AKInstrument {


        connect(frequencyLine)


        let vcOscillator = AKVCOscillator()
        vcOscillator.waveformType = AKVCOscillatorWaveformType.SquarePWM
        vcOscillator.pulseWidth = pulseWidthLine
        vcOscillator.frequency = frequencyLine
        connect(vcOscillator)

        enableParameterLog(
            "Pulse Width = ",
            parameter: vcOscillator.pulseWidth,
            frequency:0.1
        )
        
        enableParameterLog(
            "Frequency = ",
            parameter: vcOscillator.frequency,
            frequency:0.1
        )
        
        
        connect(AKAudioOutput(audioSource:vcOscillator))
    }
}

