     ]
     
     // AudioPlayerの準備
-    for i in 0..<slits_count {
+    for i in 0..<SLIT_COUNT {
       let sound_data = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Blue Ballad - Pattern 2 - 96 - \(i)", ofType: "wav")!)
       let player = AVAudioPlayer(contentsOfURL: sound_data, error: nil)
       player.prepareToPlay()

  
  var players: Array<AVAudioPlayer> = []
  
  let slits_count = 8
  var leds: Array<UIView> = []
  var prev_deg: Double = 0.0
  var slit_degs: Array<Double> = [] // 分割数に応じて360度を当分した角度を保持しておく配列
  
  override func viewDidLoad() {
    super.viewDidLoad()
    
    // 画面上のLEDの準備
    let count = Double(slits_count)
    for i in 0..<slits_count {
      slit_degs += [360.0/count*Double(i)]
    }
    leds = [
      led1,

        // Konashi通信
        
        // slit位置に応じて色を決定
        let h = CGFloat(Float(slit_index)/Float(SLIT_COUNT))
        let slitColor: UIColor = UIColor(hue: h, saturation: 1.0, brightness: 1.0, alpha: 1.0)
        // RGB値を3桁ゼロ埋めで取得
        let r = NSString(format: "%03d", Int(slitColor.getRed()))
