     public var values = [Float]()
 
     /// Number of values stored in the table
+    var phase: Double {
+        didSet {
+            if phase > 1.0 {
+                phase = 1.0
+            } else if phase < 0.0 {
+                phase = 0.0
+            }
+        }
+    }
+    
+    /// Number of values stored in the table
     var size = 4096
 
     /// Type of table

    /// Instantiate the table as a square wave
    mutating func standardSquareWave() {
        values = [Float]()
        for i in 0..<size {
            if i < size / 2 {
                values.append(-1.0)
            } else {
                values.append(1.0)

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