TrackName = {"真夜中"};
Copyright = {"AMIO"};

/*

*/



Int Repeat = 2;
// 繰り返し回数を設定できます







//-----------------------------variables---------------------------------

Int In = 0;//イントロからメロディースタートまでの時間
Int Ltime = 28;//1ループの時間
Int Out = Ltime*Repeat+In+1;//フェードアウト開始時間
Int Fade = 6;//フェードアウトにかかる時間
Int Tmp = 84;//テンポ
Int Sig = 6;
Int SigBase = 8;

Int Ptime = (In+Ltime*Repeat+Fade)*Sig*240/(Tmp*SigBase);

//---------------------------functions---------------------------------

Function Repstr(Str MML,Int Tim,Int Rep,Int Beg=0)//MML繰り返し処理関数
{
	Int I;
	
	For(I=0;I<Rep-Beg;I++){
		Time((I+Beg)*Tim+In+1:1:0) MML;
	}
}

Function PrintPlayTime(Int Tim)
{
	Int Minute = Tim/60;
	Int Second = Tim%60;
	If(Tim<60){ Print({"演奏時間:"}+Second+{"秒"}); }
	Else{Print({"演奏時間:"}+Minute+{"分"}+Second+{"秒"}); }
}

Function FadeoutVol(Int Mes,Int Prev)// Prev:pre-volume フェードアウト前のメインボリューム
{
	Str I = {!1};
	While(Mes>1){I = I+{^1}; Mes--;}
	Str CMD = {V.onTime(Prev,0,LEN)};
	CMD.s({LEN},I);
	CMD;
}

Function FadeoutAll(Int Mes,Array X)
{
	Int T = Time;
	For(Int J=1;J<=16;J++){
		TR(J); CH(J); Time(T); FadeoutVol(Mes,X(J-1));
	}
}

//------------------------------system setting---------------------------------

SoundType=1;TimeBase(96);System.MeasureShift(1);Include(guitar.h);Include(gs.h);
Time(0:1:0) Tempo(Tmp);TimeSignature(Sig,SigBase);PrintPlayTime(Ptime);
ResetGM; r4 ResetGS; r4 TrackSync;

//----------------------------------strings-----------------------------------

#v1 = {v.N(0,80,90,100,105,110,115,120,127,113,90)};
#v6 = {v.N(105,100,100,105,108,110,105,100,100,100)};
#v7 = {v.N(105,100,100)};

Str TR1In = {};
Str TR1 = {l8 [4r2^4]
		[#v1 rdfgab- `d`e`f`e`c^ [r2^4]]
		[4r2^4]
		#v6 `db-`c`d`e`f `e`cb-a^r
		#v7 `db-`crrr    v100 `d^^^^^,96
		[#v1 rdfgab- `d`e`f`e`c^ [r2^4]]};
Str TR1Out = {[4r2^4]
		#v1 rdfgab- `d`e`f`e`c^ [r2^4...(続く)...