 //  y - 75 + 64/3
   
   }
+  
+  private func IsInSound(beacon : BeaconMarker, time : Double) -> Bool
+  {
+    switch(beacon) {
+    case .Outer:
+      let loopCycle = time % 0.5
+      return loopCycle < 0.375
+    case .Middle:
+      let loopCycle = time % 0.75
+      return !((loopCycle > 0.125 && loopCycle < 0.25) || loopCycle > 0.625)
+    case .Inner:
+      let loopCycle = time % 0.25;
+      return loopCycle < 0.125
+    default:
+      return false
+    }
+  }
 }
    if beacon != data.LastBeacon.marker {
      // We have had a beacon change!
      newData.LastBeacon = (beacon, drawing.time.total, 0)
      if beacon != .None {
        PlayBeaconMarkerSound(beacon)
      }
    } else {
      newData.LastBeacon = (beacon, data.LastBeacon.time, drawing.time.total - data.LastBeacon.time)
    }
    // Assign the new data structure
    data = newData
  }
  
  private func PlayBeaconMarkerSound(beacon : BeaconMarker) {

import Foundation
import GLKit
import AudioToolbox
import AVFoundation

class HSIIndicator : RPMInstrument {
  
