     ///   - tableType: AKTableType of teh new table
     ///   - size: Size of the table (multiple of 2)
     ///
-    public init(_ tableType: AKTableType = .Sine, size tableSize: Int = 4096) {
+    public init(_ tableType: AKTableType = .Sine, phase phs: Double = 0, size tableSize: Int = 4096) {
         type = tableType
+        phase = phs
         size = tableSize
         switch type {
         case .Sine:

    mutating func standardTriangleWave() {
        values = [Float]()
        let slope = Float(4.0) / Float(size)
        for i in 0..<size {
            if i < size / 2 {
                values.append(slope * Float(i) - 1.0)
            } else {
                values.append(slope * Float(-i) + 3.0)
            }
        }
    }

    /// Instantiate the table as a square wave
    mutating func positiveSquareWave() {
        values = [Float]()
        let phsOffset = (Int)(phase*size)
        for i in 0..<size {
            if (i+phsOffset)%size < size / 2 {
                values.append(0.0)
            } else {
                values.append(1.0)
