TrackName={"お正月2"}
Copyright={"Moritoizumi"}
MetaText={"ピコサクラでRandomSelect"}
Str SS="`c"
Str S1="`c"
Str S2="`c"
Str S3="`c"
Str M1="Tempo=100 TR=1 CH=1 @(Koto) V(100) v100 o4 q100 
TR=2 CH=2 V(100) v100 o4 @(Shakuhachi) q100 l1"
Str M2=""
Int BB
Int TF

RandomSeed=12345            //ピコサクラ用
//System.RandomSeed(12345)  //サクラ用

Print(M1);M2=M2+M1;M1="";

For(Int I=0; I<60; I++){
   BB=RandomSelect(6,8,8,8,8,8,8,12,16,24,32)
For(Int J=0; J<BB; J++){

TF=(BB=8)*(J=6)*RandomSelect(0,0,1)        //8分音符で7拍目で確率1/3の場合1、他は0

If(TF=1){M1=M1+" Div{r"+S1+S2+S3+"}4";J++} //カラリン
ELSE{
If(J=0){M1=M1+"TR=1 l"+BB;
        SS=RandomSelect("c","d","e","g","a","`c","`d","`e","`g","`a","``c","``d","``e","``g","``a")}
   Else{SS=RandomSelect("c","d","e","g","a","`c","`d","`e","`g","`a","``c","``d","``e","``g","``a","^","^","^","^")}
If(SS!="^"){S3=S2;S2=S1;S1=SS};
M1=M1+SS;
}

}
M1=M1+" TR=2 "+S1;
Print(M1);M2=M2+M1;M1="";
}

Play(M2);


/*
//カラリンなし　RandomSeedなし

TrackName={"お正月2"}
Copyright={"Moritoizumi"}
MetaText={"ピコサクラでRandomSelect"}
Str SS
Str S1
Str M1="Tempo=100 TR=1 CH=1 @(Koto) V(100) v100 o4 q100 TR=2 CH=2 V(100) v100 o4 @(Shakuhachi) q100 l1"
Str M2=""
Int BB

Print(M1);M2=M2+M1;M1="";

For(Int I=0; I<60; I++){
   BB=RandomSelect(6,8,8,8,8,8,8,12,16,24,32)
For(Int J=0; J<BB; J++){
If(J=0){M1=M1+"TR=1 l"+BB;
        SS=RandomSelect("c","d","e","g","a","`c","`d","`e","`g","`a","``c","``d","``e","``g","``a")}
   Else{SS=RandomSelect("c","d","e","g","a","`c","`d","`e","`g","`a","``c","``d","``e","``g","``a","^","^","^","^")}
If(SS!="^"){S1=SS};
M1=M1+SS;
}
M1=M1+" TR=2 "+S1;
Print(M1);M2=M2+M1;M1="";
}

Play(M2);
*/