Tempo 180

Int RANDON=1
Int KYOKUTANNISURU=0	// ※めちゃくちゃへたくそに演奏するなの

System.TimeBase=10368

Int CYMINIT=1

Function Cymbal() {
	Int CC
	IF(CYMINIT=0) {
		CC=CrashCymbal1
		CYMINIT=1
	} ELSE {
		CC=CrashCymbal2
		CYMINIT=0
	}
	Result=CC
}

Function RandV(Int MIN, Int MAX) {
	Str MML="v"
	IF(KYOKUTANNISURU=1) {
		MIN=64
	}

	IF(RANDON=1) {
		MML=MML+Random(MIN,MAX)
//		Print(MML)
	} ELSE {
		MML=MML+MAX
	}
	MML
}

Str RMML
Function RandR(Int MIN, Int MAX) {
	Str MML
	IF(RANDON=1) {
		MML=MML+"r"
		RMML=RMML+"r"
		Int VALUE=Random(0,10)
		IF(VALUE<5) {
			MML=MML+"-"
		} ELSE {
			RMML=RMML+"-"
		}
		Str RAND=Random(MIN,MAX)
		MML=MML+RAND
		RMML=RMML+RAND
//		Print(MML)
		MML
	}
}

Function SyncR() {
	Str MML=RMML
	RMML=""
//	Print(MML)
	MML
}

TR(10)
	Voice(1)
	$k{Sub{RandR(999,1728) RandV(124,127) n(Sticks),16}r} //37
	$B{Sub{RandR(999,1728) RandV(124,127) n(Kick2),16}r}//35
	$b{Sub{RandR(999,1728) RandV(124,127) n(Kick1),16}r}//36
	$S{Sub{RandR(999,1728) RandV(120,127) n(Snare2),16}r}//40
	$s{Sub{RandR(999,1728) RandV(120,127) n(Snare1),16}r}//38
	$L{Sub{RandR(999,1728) RandV(123,127) n(LowTom2),16}r}//41
	$l{Sub{RandR(999,1728) RandV(123,127) n(LowTom1),16}r}//43
	$M{Sub{RandR(999,1728) RandV(123,127) n(MidTom2),16}r}//45
	$m{Sub{RandR(999,1728) RandV(123,127) n(MidTom1),16}r}//47
	$T{Sub{RandR(999,1728) RandV(123,127) n(HighTom2),16}r}//48
	$t{Sub{RandR(999,1728) RandV(123,127) n(HighTom1),16}r}//50
	$p{Sub{RandR(999,1728) RandV(110,127) n(PedalHiHat),16}r}//44
	$h{Sub{RandR(999,1728) RandV(115,127) n(ClosedHiHat),16}r}//42
	$o{Sub{RandR(999,1728) RandV(120,127) n(OpenHiHat),16}r}//46
	$r{Sub{RandR(999,1728) RandV( 85,100) n(RideCymbal1),16}r}//51
	$R{Sub{RandR(999,1728) RandV(120,127) n(RideBell),16}r}//53
	$i{Sub{RandR(999,1728) RandV( 85,95)  n(MuteHighConga),16}r}//62
	$I{Sub{RandR(999,1728) RandV(120,127) n(OpenHighConga),16}r}//63
	$c{Sub{RandR(999,1728) RandV(120,127) n(Cymbal()),16}r}//49
	$C{Sub{RandR(999,1728) RandV(120,127) n(Cymbal()),16}r}//57
	$H{Sub{RandR(999,1728) RandV(120,127) n(SplashCymbal),16}r}//55
	$A{Sub{RandR(999,1728) RandV(120,127) n(ChineseCymbal),16}r}//52
	$f{Sub{RandR(999,1728) RandV(120,127) n(Slap),16}r}//28
	$y{Sub{RandR(999,1728) RandV(120,127) n(Cymbal()),16}r}//60
	$Y{Sub{RandR(999,1728) RandV(120,127) n(Cymbal()),16}r}//61

	#rintro1={
		Sub { Rythm { y4.Y4.y4.Y4.y4Y4 } }
		Sub { Rythm { [16 h8 ] } }
		Sub { Rythm { s4.s4.s4.s4.s4s4 } }
		Sub { Rythm { b4.b4.b4.b4.b4b4 } }
		r4.r4.r4.r4.r4r4
	}

	#rintro2={
		Sub {
			[4 Rythm { c6C6H6 } ]
			[2 Rythm { c4C4 } ]
			Rythm { c1 }
		}
		[4 Rythm { b6b6b6 } ]
		[2 Rythm { b4b4 } ]
		Rythm { b1 }
	}

	[3 #rintro1]
	#rintro2

	#rmain1={
		Sub { Rythm { R8r8r8R8r8r8R8r8 } }
		Sub { Rythm { b4k8b4k8b4 } }
		r1
	}

	#rmain2={
		Sub { Rythm { R8r8r8R8r8r8R8r8 } }
		Sub { Rythm { b8T8T8m8m8M8M8l8 } }
		Sub { Rythm { b4k8b4k8b4 } }
		r1
	}

	#rmain3={
		Sub { Rythm { [4 p8o8] } }
		Sub { Rythm { b4k8b4k8b4 } }
		r1
	}

	#rmain31={
		Sub { Rythm { [4 p8o8] } }
		Sub { Rythm { b4s8b4b8s8 } }
		r1
	}

	#rmain4={
		Sub { Rythm { p8T8T8m8m8M8M8l8 } }
		Sub { Rythm { [4 p8o8] } }
		Sub { Rythm { b4k8b4k8b4 } }
		r1
	}

	#rmain41={
		Sub { Rythm { p8T8T8m8m8M8M8l8 } }
		Sub { Rythm { [4 p8o8] } }
		Sub { Rythm { b4s8b4b8s8 } }
		r1
	}

	#rmain5={
		Sub { Rythm { c4.C4.c4.C4.c4C4 } }
		Sub { Rythm { [16 h8 ] } }
		Sub { Rythm { s4.s4.s4.s4.s4s4 } }
		Sub { Rythm { b4.b4.b4.b4.b4b4 } }
		r4.r4.r4.r4.r4r4

		Sub { Rythm { c4.C4.c4.C4.c2 } }
		Sub { Rythm { [13 h8 ] } }
		Sub { Rythm { s4.s4.s4.s4.s2 } }
		Sub { Rythm { b4.b4.b4.b4.b2 } }
		r4.r4.r4.r4.r8 Rythm { m8M8l8 }
	}

	#rmain6={
		Sub { Rythm { c4.C4.c4.C4.c4C4 } }
		Sub { Rythm { [16 h8 ] } }
		Sub { Rythm { s4.s4.s4.s4.s4s4 } }
		Sub { Rythm { b4.b4.b4.b4.b4b4 } }
		r4.r4.r4.r4.r4r4

		Sub { Rythm { c4.C4.c1 } }
		Sub { Rythm { [7 h8 ] } }
		Sub { Rythm { s4.s4.s1 } }
		Sub { Rythm { b4.b4.b1 } }
		r1r1
	}

	#rsub1={
		Sub { Rythm { R4r8R4r8R4R4R4 } } 
		Sub { Rythm { b4f8b4b8b4f4b4 } }
		r1.
	}

	#rsub2={
		Sub { Rythm { R4r8R4r8R4R4R4 } } 
		Sub { Rythm { b4f8b4b8b4f4b4 } }
		r2. r8 Rythm { m8m8M8M8L8 }
	}

	Expression(127)
	[3 #rmain1]
	#rmain2

	Expression(110)
	Sub { Rythm{A1} }
	[7 #rmain3]
	#rmain4
	Sub { Rythm{c1} }
	[7 #rmain3]
	#rmain4
	Sub { Rythm{C1} }
	[7 #rmain3]
	#rmain4
	Sub { Rythm{c1} }
	[6 #rmain3]
	#rmain5

	Sub { Rythm{C1} }
	[3 #rsub1]
	#rsub2
	Sub { Rythm{c1} }
	[3 #rsub1]
	#rmain5

	Sub { Rythm{C1} }
	[7 #rmain31]
	#rmain41
	Sub { Rythm{c1} }
	[6 #rmain31]
	#rmain6

End

##############################################################################
# TiMidiTy Config (v2.0)

dir ../patches/sf2_all
dir ../patches/sf2_all/atomic
dir ../patches/sf2_all/fluid3
dir ../patches/sf2_all/realgs
dir ../patches/sf2_all/ultimate
dir ../patches/sf2_all/scc
dir ../patches/sf2_all/GMRBasico
dir ../patches/sf2_all/ForClassicalMusic
dir ../patches/sf2_part/drumkit
dir ../patches/sf2_part/drum
dir ../patches/sf2_part/piano
dir ../patches/sf2_part/famicom
dir ../patches/sf2_all/musix
dir ../patches/sf2_all/Giant
dir ../patches/sf2_part/ORCHESTRAL
dir "../patches/sf2_part/Sonatina Symphonic Orchestra"


##############################################################################

# Standard drums

drumset 0
	# brash
#	28 %font Titanic_200_GMGS_1.2.sf2 128 40 31 amp=280 tune=-1
#	28 %font drumkit1.3XG.sf2 128 40 31 amp=255
#	28 %font Evanessence2.sf2 128 40 38 amp=250
	28 %font FluidR3GM.SF2 128 40 38 amp=210

	# bd
	35 %font FluidR3GM.SF2 128 49 35 amp=300
	36 %font FluidR3GM.SF2 128 27 35 amp=150
	35 %font FluidR3GM.SF2 128 49 35 amp=300
	36 %font Titanic_200_GMGS_1.2.sf2 128 17 35 amp=200
	35 %font "0_Yamaha9000.sf2" 128 0 33 amp=230 pan=0 tune=+0
	36 %font "0_Yamaha9000.sf2" 128 0 33 amp=230 pan=0 tune=+0

	# stick
	31 %font Titanic_200_GMGS_1.2.sf2 128 0 31 amp=280 tune=-1
#	31 %font drumkit1.3XG.sf2 128 0 31 amp=255
	31 %font "0_Yamaha9000.sf2" 128 0 57 amp=145 pan=0 tune=+0

	# sd
#	38 %font Titanic_200_GMGS_1.2.sf2 128 0 40 amp=160
#	40 %font Titanic_200_GMGS_1.2.sf2 128 0 40 amp=140
	38 %font drumkit1.3XG.sf2 128 9 38 amp=170 tune=+5
	40 %font drumkit1.3XG.sf2 128 9 40 amp=170 tune=+5
	38 %font "0_Yamaha9000.sf2" 128 0 32 amp=135 pan=0 tune=+0
	40 %font "0_Yamaha9000.sf2" 128 0 32 amp=135 pan=0 tune=+0

	# cymbal
#	49 %font Titanic_200_GMGS_1.2.sf2 128 0 49 amp=200 pan=-80 tune=+0
#	57 %font Titanic_200_GMGS_1.2.sf2 128 0 49 amp=200 pan=+80 tune=+0
#	55 %font Titanic_200_GMGS_1.2.sf2 128 0 49 amp=200 pan=0 tune=+0
	49 %font "0_Yamaha9000.sf2" 128 0 38 amp=170 pan=-50 tune=+0
	57 %font "0_Yamaha9000.sf2" 128 0 38 amp=170 pan=+99 tune=+0
	55 %font "0_Yamaha9000.sf2" 128 0 38 amp=170 pan=30 tune=+0

	# chinise
	52 %font Titanic_200_GMGS_1.2.sf2 128 0 52 amp=215 pan=0 tune=-2
#	52 %font FluidR3GM.SF2 128 0 52 amp=230 pan=30 tune=+0
#	52 %font "0_Yamaha9000.sf2" 128 0 69 amp=210 pan=30 tune=+0

	# alt classic cymbal
	60 %font Titanic_200_GMGS_1.2.sf2 128 48 55 amp=140 pan=-25 tune=+0
	61 %font Titanic_200_GMGS_1.2.sf2 128 48 55 amp=140 pan=+70 tune=+0
	60 %font "0_Yamaha9000.sf2" 128 0 36 amp=110 pan=-70 tune=+2
	61 %font "0_Yamaha9000.sf2" 128 0 35 amp=110 pan=60 tune=+5

	# ride
#	51 %font Titanic_200_GMGS_1.2.sf2 128 0 51 amp=150 pan=+70 tune=+0
#	53 %font Titanic_200_GMGS_1.2.sf2 128 0 51 amp=320 pan=+70 tune=+0
	51 %font "0_Yamaha9000.sf2" 128 0 53 amp=60
	53 %font "0_Yamaha9000.sf2" 128 0 53 amp=92

	# ride cup
#	62 %font "GMR Basico1.1.sf2" 128 0 53 amp=160 pan=+70 tune=+0
#	63 %font "GMR Basico1.1.sf2" 128 0 53 amp=360 pan=+70 tune=+0
#	53 %font drumkit1.3XG.sf2 128 0 53 amp=460 pan=+70 tune=+0
	62 %font "0_Yamaha9000.sf2" 128 0 43 amp=190
	63 %font "0_Yamaha9000.sf2" 128 0 43 amp=190

	#hh
#extension altassign 42 44 46
	42 %font "Titanic_200_GMGS_1.2.sf2" 128 17 42 amp=200 pan=0 tune=+0 rate=:50:50:50:120:120
	44 %font "GMR Basico1.1.sf2" 128 17 44 amp=55 pan=0 tune=+0
	46 %font "GMR Basico1.1.sf2" 128 17 46 amp=60 pan=0 tune=+0

	# hihat
	# close
	42 %font "0_Yamaha9000.sf2" 128 0 50 amp=110
	# pedal
	44 %font "0_Yamaha9000.sf2" 128 0 45 amp=110
	# open
	46 %font "0_Yamaha9000.sf2" 128 0 51 amp=115

	# tom
	41 %font Titanic_200_GMGS_1.2.sf2 128 17 41 amp=180 tune=+0
	43 %font Titanic_200_GMGS_1.2.sf2 128 17 43 amp=180 tune=+2
	45 %font Titanic_200_GMGS_1.2.sf2 128 17 45 amp=180 tune=+4
	47 %font Titanic_200_GMGS_1.2.sf2 128 17 47 amp=180 tune=+6
	48 %font Titanic_200_GMGS_1.2.sf2 128 17 48 amp=180 tune=+8
	50 %font Titanic_200_GMGS_1.2.sf2 128 17 50 amp=180 tune=+10

#	41 %font "0_Yamaha9000.sf2" 128 0 77 amp=170 tune=-2
#	43 %font "0_Yamaha9000.sf2" 128 0 77 amp=170 tune=+2
#	45 %font "0_Yamaha9000.sf2" 128 0 72 amp=170 tune=+1
#	47 %font "0_Yamaha9000.sf2" 128 0 72 amp=170 tune=+5
#	48 %font "0_Yamaha9000.sf2" 128 0 69 amp=170 tune=+5
#	50 %font "0_Yamaha9000.sf2" 128 0 69 amp=170 tune=+8
