Function EOF(){
  Track(0) 
    TrackName={"この蒼い空"};
    TimeBase(96)   Tempo(128)   TimeSignature(4,4)   KeyFlag+();
    System.MeasureShift(1);
    IF(SoundType==0){ResetGM;}
    IF(SoundType==1){ResetGS;}
    IF(SoundType==2){ResetXG;}r4

  Track(01) CH(01) Time(001:1:00) r-4 @(26) V(097) REV(38) M(24) CHO(89) GStringo=(3,3,4,4,4,5); GStringh=(4,9,2,7,11,4); SetSoundVolumeNote(127,127,127,127,127,127);
  Track(02) CH(02) Time(001:1:00) r-4 @(12) V(083)
  Track(03) CH(03) Time(001:1:00) r-4 @(41) V(90) v(118) REV(68) M(24) CHO(119) q(100)
  Track(04) CH(04) Time(001:1:00) r-4 @(55) V(120) v(088) REV(98) M(84) CHO(119) q(108)
  Track(05) CH(05) Time(001:1:00) r-4 @(28) V(097) v(127) REV(68) M(24) CHO(119) q(100)
  Track(09) CH(09) Time(001:1:00) r-4 @(34) V(100) v(127) REV(18) M(24) CHO(39) q(100)
  Track(10) CH(10) Time(001:1:00) r-4       V(127)

  $b{n(35),}		//Kick
  $s{n(54),}		//Tambourine
  $h{v70n(42),}	//C HH
  $a{v90n(42),}	//C HHアクセント
  $m{n(83),}		//JingleBell

  $c{n(84),}		//Crash Sym
  $i{n(51),}		//Ride
  $j{n(55),}		//Chin
  $k{n(57),}		//Crash2

  $w{n(50),}		//Hi　Tom
  $x{n(47),}		//Mid Tom
  $y{n(43),}		//Low Tom
  $z{n(41),}		//Flor Tom

  #CORD_PLAY_1 = {
    q(120);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    q(190);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    r16
    q(120);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(0,1,1,1,1,0);
    DoStroke(16,1);
  };
  #CORD_PLAY_2 = {
    q(120);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    q(190);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    r16
    q(120);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,1);
    SetStrokeTimeNote(0,1,2,3,4,5);
    SetStrokeUseString(1,1,1,1,0,0);
    DoStroke(16,0);
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,0);
    SetStrokeTimeNote(0,3,6,9,12,15);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(8,1);
  };
  #CORD_PLAY_3 = {
    SUB {
      q(120);
      SetStrokeTimeNote(0,2,4,6,8,10);
      SetStrokeUseString(1,1,1,1,1,1);
      DoStroke(1,0);
    }
    r4 l8 DoPicking(1);DoPicking(2);DoPicking(3);DoPicking(4);DoPicking(5);DoPicking(6);
  }
  #CORD_PLAY_4 = {
    q(240);
    SetStrokeTimeNote(0,3,6,9,12,15);
    SetStrokeUseString(0,1,1,1,1,0);
    DoStroke(8,0);r16
    SetStrokeTimeNote(0,4,8,12,16,20);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(1,1);
  }
  Str R00 = {[4 r1]};
  Str G01 = {SetCord(0,0,2,2,2,0)  #CORD_PLAY_1 SetCord(0,2,2,1,0,0)  #CORD_PLAY_1 SetCord(1,3,3,2,1,1) #CORD_PLAY_1 #CORD_PLAY_1};
  Str G02 = {SetCord(-1,0,0,2,3,2) #CORD_PLAY_1 SetCord(-1,0,0,2,3,1) #CORD_PLAY_1 SetCord(0,2,2,1,0,0) #CORD_PLAY_1 #CORD_PLAY_1};
  Str G03 = {SetCord(0,0,2,2,2,0)  #CORD_PLAY_2 SetCord(0,2,2,1,0,0)  #CORD_PLAY_1 SetCord(1,3,3,2,1,1) #CORD_PLAY_2 #CORD_PLAY_1};
  Str G04 = {SetCord(-1,0,0,2,3,2) #CORD_PLAY_2 SetCord(-1,0,0,2,3,1) #CORD_PLAY_1 SetCord(0,2,2,1,0,0) #CORD_PLAY_2 #CORD_PLAY_1};
  Str G05 = {SetCord(0,0,2,2,2,0)  #CORD_PLAY_3 SetCord(0,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8<a8a8>d4 <a2>d4f4 e2<g+2  e2.r4};
  Str V03 = {o5 a8a8a8a8e8a8a8a8 g+4g+8e8^2 f8f8f8f8c8f8f8f8 a4f4f4c4};
  Str V04 = {o5 f+4.a4.f+4 a8^2.f8 a8g+4b4>e8e8^8 ^2.r4 };
  Str V05 = {o6 e4.a4.e8a8 ^2r8g+8e8<b8> c4.f4a4f8 f2.r4};
  Str V06 = {o6 d4.d4.f+4 f4.f4.a4 g+1 e1 };
  Str V07 = {o6 d4.d4.f+4 f4.f4.a4 g+1 b1 };
  Str V08 = {o6 d4.d4.f+4 f4.f4.a4 g+1 e4^1 };
  Str V09 = {o6 d4.d4.f+4 f4.f4.a4 g+1 e4^1 };
  Str B01 = {o3 q(98) a4.^4>c+8e4< g+4.^b8b4< a4.^4>c8f4< >c4.^4.f4};
  Str B02 = {o3 q(98) a1f1g+1e1};
  Str B03 = {o3 q(48) [4a8][c+8][a8]  [4g+8][b8][g+8] q(98) f1a1};
  Str B04 = {o3 q(98) a1f1g+1e2g+2};
  Str D01 = {
    SUB{ Rythm{ v110[i16[3h16]r8[4h16]a8r8a16h16 [4h16]r8[4h16]a8r8a16h16] } }
    SUB{ Rythm{ v120[[[b16]b8r4] [4b16]r4[b16]b8r4] } }
         Rythm{ v127[8 r4x4]}
  }
  Str D02 = {
    SUB{ Rythm{ v110[i16[3h16]r8[4h16]a8r8a16h16 [4h16]r8[4h16]a8r8:a16h16]i8 } }
    SUB{ Rythm{ v120[[[b16]b8r4] [4b16]r4[b16]b8r4] } }
         Rythm{ v127[7 r4x4]r4x8y8}
  }
  Str D03 = {
    SUB{ Rythm{ v110[i16[3h16]r8[4h16]a8r8a16h16 [4h16]r8[4h16]a8r8:a16h16]i8 } }
    SUB{ Rythm{ v120[[[b16]b8r4] [4b16]r4[b16]b8r4] } }
         Rythm{ v127[[3 r4x4]r4x8y8]}
  }
  
  Track(0) 
    Time(001:1:0);
    Lyric = {"　
    ♪前奏 30秒
    　"}//(60 / 128) * 4 * 16
    PLAY(,G01,P01,R00,,,,,,R00,D01);
    Time(005:1:0);
    PLAY(,G02,P02,R00,,,,,,R00,D02);
    Time(009:1:0);
    PLAY(,G01,P01,R00,,G11,,,,B01,D01);
    Time(013:1:0);
    PLAY(,G02,P02,R00,,G12,,,,B02,D02);
    Time(017:1:0);
    Lyric = {"この蒼い空 飛べたなら"}
    PLAY(,G01,P03,V01,V01,,,,,B01,D01);
    Time(021:1:0);
    Lyric = {"すぐに君のとこに飛んでくよ"}
    PLAY(,G02,P04,V02,V02,,,,,B02,D02);
    Time(025:1:0);
    Lyric = {"白い翼　羽ばたかせ"}
    PLAY(,G01,P03,V01,V01,,,,,B01,D01);
    Time(029:1:0);
    Lyric = {"君の目の前に舞い降りる"}
    PLAY(,G02,P04,V02,V02,,,,,B02,D02);
    Time(033:1:0);
    Lyric = {"　"}
    Lyric = {"君があこがれていた天使になって僕ら"}
    PLAY(,G03,P05,V03,V03,,,,,B03,D02);
    Time(037:1:0);
    Lyric = {"一緒に町を出るんだ"}
    PLAY(,G04,P06,V04,V04,,,,,B04,D02);
    Time(041:1:0);
    Lyric = {"　"}
    Lyric = {"離さない　握った手を"}
    PLAY(,G03,P01,V05,V05,,,,,B01,D03);
    Time(045:1:0);
    Lyric = {"ずっとそばにいるよ"}
    PLAY(,G04,P02,V06,V06,,,,,B02,D03);
    Time(049:1:0);
    Lyric = {"連れてくよ　だれも来れない"}
    PLAY(,G03,P01,V05,V05,,,,,B01,D03);
    Time(053:1:0);
    Lyric = {"大空の上に"}
    PLAY(,G04,P02,V08,V09,,,,,B02,D03);
    Time(057:1:0);
    PLAY(,G05,,,,,,,,,);
}

Function DoDownStroke(STR SoundLength){
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(SoundLength,0);
}
Function DoUpStroke(STR SoundLength){
    SetStrokeTimeNote(0,2,4,6,8,10);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(SoundLength,1);
}
Function DoDownStrokeFinaly(STR SoundLength){
    SetStrokeTimeNote(0,20,40,60,80,100);
    SetStrokeUseString(1,1,1,1,1,1);
    DoStroke(SoundLength,0);
}
Function SetCord(Array Cord){
    SpecifiedCord = Cord;
}
Function SetSoundVolumeNote(Array SoundVolumeNote){
    SystemSoundVolumeNote = SoundVolumeNote;
}
Function SetStrokeTimeNote(Array SoundTimeNote){
    SystemSoundTimeNote = SoundTimeNote;
}
Function SetStrokeUseString(Array SoundUseString){
    SystemSoundUseString = SoundUseString;
}
Function DoPicking(Int StringNumber){
    IF(StringNumber == 0){
        Print(EXCEPTION(0));
        Print(EXCEPTION(1) +" -> "+ StringNumber);
    }
    Int Oct=GStringo(StringNumber-1);
    Int SysHangar = SpecifiedCord(StringNumber-1) + GStringh(StringNumber-1);
    IF(SysHangar >= 12){Oct++;}
    IF(SpecifiedCord(StringNumber-1) == -1){
        r;
    }ELSE{
        o(Oct);GetNoteName(SysHangar);
    }
}
Function DoStroke(Int SoundLength,Int Direction){
    Int TempVolume = MML(v);
    Int System = 0;
    v.onNote(SystemSoundVolumeNote);
    t.onNote(SystemSoundTimeNote);
    '
    IF(Direction==0){
        System++;
        IF(SystemSoundUseString(0)==1){DoPicking(1);}
        IF(SystemSoundUseString(1)==1){DoPicking(2);}
        IF(SystemSoundUseString(2)==1){DoPicking(3);}
        IF(SystemSoundUseString(3)==1){DoPicking(4);}
        IF(SystemSoundUseString(4)==1){DoPicking(5);}
        IF(SystemSoundUseString(5)==1){DoPicking(6);}
    }
    IF(Direction==1){
        System++;
        IF(SystemSoundUseString(5)==1){DoPicking(6);}
        IF(SystemSoundUseString(4)==1){DoPicking(5);}
        IF(SystemSoundUseString(3)==1){DoPicking(4);}
        IF(SystemSoundUseString(2)==1){DoPicking(3);}
        IF(SystemSoundUseString(1)==1){DoPicking(2);}
        IF(SystemSoundUseString(0)==1){DoPicking(1);}
    }
    IF(System==0){
        Print(EXCEPTION(0));
        Print(EXCEPTION(2) +" -> "+ Direction);
    }
    '(SoundLength)
     t.onNote(0);
     v.onNote(TempVolume);
}
Function GetNoteName(Int FN){
    If(FN>=12){FN = FN % 12;}
    If(FN==0) {c*}
    If(FN==1) {c+}
    If(FN==2) {d*}
    If(FN==3) {d+}
    If(FN==4) {e*}
    If(FN==5) {f*}
    If(FN==6) {f+}
    If(FN==7) {g*}
    If(FN==8) {g+}
    If(FN==9) {a*}
    If(FN==10){a+}
    If(FN==11){b*}
    Result=Returnstr;
}
Array GStringo=(4,4,5,5,5,6);
Array GStringh=(4,9,2,7,11,4);
Array SpecifiedCord=(0,0,0,0,0,0);
Array SystemSoundTimeNote   = ( 0,20,20,20,20,20);
Array SystemSoundUseString  = ( 1, 1, 1, 1, 1, 1);
Array SystemSoundVolumeNote = (60,60,60,60,60,60);
Array EXCEPTION    = ();
      EXCEPTION(0) = ("(EXCEPTION REPORT) >>>>");
      EXCEPTION(1) = ("    EXCEPTION DoPicking  [ 引数に不適切な値 ]");
      EXCEPTION(2) = ("    EXCEPTION DoStroke  [ 引数に不適切な値 ]");
  Function GetNoteNamePrint(Int FN){
      If(FN>=12){FN = FN -12;}
      If(FN==0) {Result="c*";}
      If(FN==1) {Result="c+";}
      If(FN==2) {Result="d*";}
      If(FN==3) {Result="d+";}
      If(FN==4) {Result="e*";}
      If(FN==5) {Result="f*";}
      If(FN==6) {Result="f+";}
      If(FN==7) {Result="g*";}
      If(FN==8) {Result="g+";}
      If(FN==9) {Result="a*";}
      If(FN==10){Result="a+";}
      If(FN==11){Result="b*";}
  }
  Function DoPrintCordBroken(Array SoundLength){
      Int Oct=0;
      Int SysHangar=0;
      For(Int x=1;x<=6;x++){
          Oct=GStringo(x-1);
          SysHangar = SoundLength(x-1) + GStringh(x-1);
          IF(SysHangar >= 12){Oct++;}
          IF(SoundLength(x-1) == -1){
              Print("STRING "+x+" = ----");
          }ELSE{
              Print("STRING "+x+" = o" +Oct+""+GetNoteNamePrint(SysHangar); );
          }
      }
  }
Function RESET(){
    System.MeasureShift(1);
    IF(SoundType==0){
        ResetGM;
    }
    IF(SoundType==1){
        ResetGS;
    }
    IF(SoundType==2){
        ResetXG;
    }
    r*1
}
Array C   = ( 0,3,2,0,1,0);
Array Cpm7= ( 4,4,6,4,5,4);
Array Cp7 = ( 4,4,6,4,6,4);
Array A   = ( 0,0,2,2,2,0);
Array Am  = ( 0,0,2,2,1,0);
Array E   = ( 0,2,2,1,0,0);
Array F   = ( 1,3,3,2,1,1);
Array Fpm = ( 2,4,4,2,2,2);
Array G   = ( 3,2,0,0,0,3);
Array GonB= (-1,2,0,0,0,3);
Array D   = (-1,0,0,2,3,2);
Array Dm  = (-1,0,0,2,3,1);
Array Bm  = ( 2,2,4,4,3,1);

EOF();
