             buffers.append(buff)
         }
     }
-    let shape = SKShapeNode()
-    func DrawLineF0(arr:[CGFloat?],count:Int){
-        shape.removeFromParent()
-        let path = CGMutablePath()
-        for i in 0 ..< count-1{
-            path.move(to: CGPoint(x:CGFloat(i)*xAxisMargin,y:arr[i]!))
-            path.addLine(to:CGPoint(x:CGFloat(i+1)*xAxisMargin,y:arr[i+1]!))
-        }
-        shape.path = path
-        shape.strokeColor = UIColor.darkGray
-        shape.lineWidth = 2
-        shape.isAntialiased = true
-        self.standScene?.addChild(shape)
-    }
+    
+    //WorldParameterの初期化
+    func InitializeWorldParameter(wavName:String){
+        f0_start = 0
+        f0_end = 0
+        //分析フェーズ
+        let str = URL(fileURLWithPath: Bundle.main.path(forResource: wavName, ofType: "wav",inDirectory:"waves")!).absoluteString
+        let arr = str.components(separatedBy: "///")
+        world_parameter = execute_world(arr[1],toPath+"/output.wav",-1)
+        
+        Initializer(&world_parameter!,Int32(buffer_size))
+        
+        
+        f0Length = Int((world_parameter?.f0_length)!)
+        f0Array = []
+        for i in 0 ..< f0Length{
+            f0Array.append(CGFloat(world_parameter!.f0[i]))
+        }
+        xAxisMargin = view.frame.width/CGFloat(f0Array.count)
+    }
+    
+    //再生用のAVAudio周りの初期化
     func InitializeAudio(file:AVAudioFile){
         audioEngine = AVAudioEngine()
         playernode = AVAudioPlayerNode()

        particle.run(action1)
        particle.run(action2)
    }
    func getNextFemale()->String{
        var path:String = ""
        if femaleCnt == 0{

        
        let changeWidth = 1
        //触れている場所を検出し、f0配列の値を変える。WORLDParameterも変更する。
        ChangeF0Line(y: y, changeWidth: changeWidth,tapIndex:Int(tapIndex))
        
        preIndex = tapIndex
        preY = y
    }
    
    //F0操作時に点と点を結ぶ
    func ChangeF0Line(y:CGFloat,changeWidth:Int,tapIndex:Int){
        if(preIndex != 0.0)
        {
            var y1:CGFloat = 0
