// ↓どっちかを１にしてなの；；ぐすぐす；；
Int SENTO=0
Int SHORI=0

IF(SENTO=1) {
	Tempo 240
	Int CYMINIT=0
	Int LOOP=4

	Function LoopPlay(Str Mml) {
		Str _MML
		For (Int i = 1; i <= LOOP; i++) {
			_MML=_MML + #STR(Mml)
		}
		_MML
	}
	Int SNAREINIT=0

	Function Snare() {
		Int CC
		IF(TIMIDITY=0) {
			CC=Snare1
		} ELSE {
			IF(SNAREINIT=0) {
				CC=Snare1
				SNAREINIT=1
			} ELSE {
					CC=Snare2
				SNAREINIT=0
			}
		}
		Result=CC
	}

	Function Cymbal() {
		Int CC
		IF(CYMINIT=0) {
			CC=CrashCymbal1
			CYMINIT=1
		} ELSE {
			CC=CrashCymbal2
			CYMINIT=0
		}
		Result=CC
	}

	Function Symbal() {
		Int CC
		IF(CYMINIT=0) {
			CC=62
			CYMINIT=1
		} ELSE {
			CC=61
			CYMINIT=0
		}
		Result=CC
	}

	Function RandV(Int MIN, Int MAX) {
		Str MML="v"
		MML=MML+Random(MIN,MAX)
		MML
	}

	#melody1={
		l4
		[
			g4.a4.b-
			>d2.c#8d8
			c#1.r2<
		]
		[
			>d4.e4.f
			a2.g#8a8
			g#1.r2<
		]
		[4 r1]
	}
	Int VV
	#melody2={
		[
			r1r1
			l8
			VV=80
			r2l10
			Sub{[5 VV=VV+2 RandV(VV-10,VV) 'c#eg']}r2
			Sub{[5 VV=VV+2 RandV(VV-10,VV) 'ega#']}r2
			Sub{[5 VV=VV+2 RandV(VV-10,VV) 'ga#>c#<']}r2
		]
		[
			r1r1
			VV=85
			r2l10
			Sub{[5 VV=VV+2 RandV(VV-10,VV) 'g#b>d<']}r2
			Sub{[5 VV=VV+2 RandV(VV-10,VV) 'b>df<']}r2
			Sub{[5 VV=VV+2 RandV(VV-10,VV) '>dfg#<']}r2
		]
		l8
		[4 'f#a>cf<'] r 'f#4.a4.>c4.f4.<'
		[4 'fa-b>e<'] r 'f4.a-4.b4.>e4.<'
		[4 'egb->e-<'] r 'e4.g4.b-.>e-4.<'
		[4 'e-f#a>d<'] r 'e-4.f#4.a.>d4.<'

	}

	TR(1)
		#tr1={
			@(Oboe)
			q95v127
			[#melody1]
		}
		LoopPlay(#tr1)

	TR(2)
		r-48
		#tr2={
			@(Violin)
			q75v90
			[#melody2]
		}
		LoopPlay(#tr2)

	TR(8)
		r-14
		#tr8={
			@(Strings1)
			[
				o4q99v80
				l1
				[
					'g^b-^>d^<'
					'g^b-^>c#^e^<'
				]
				>
				[
					'd^f^a^'
					'd^f^g#^b^'
				]

				<
				l1
				'f#a>cf<'
				'fa-b>e<'
				'egb->e-<'
				'e-f#a>d<'
			]
		}
		LoopPlay(#tr8)

	TR(9)
		LoopPlay(
			音色(AcousticBass)
			[
				o3q90v110
				[g4g4g4g4 g4g4g4g8g4 g8g4g4g4 g4g.d8e-8d8]
				[d4d4d4d4 d4d4d4d8d4 d8d4d4d4 d4d.d8e-8d8]

				[4 f#8] r8f#4.
				[4 f8] r8f4.
				[4 e8] r8e4.
				[4 d#8] r8d#4.
			]
		)

	TR(10)
		v120
		$b{n(Kick1),}
		$s{n(Snare()),}
		$h{n(ClosedHiHat),}
		$o{n(OpenHiHat),}
		$c{n(Cymbal()),}
		$C{n(Symbal()),}
		$t{n(HighTom1),}
		$m{n(MidTom1),}
		$l{n(MidTom2),}
		$f{n(LowTom1),}
		$r{n(RideCymbal1),}
		#r1={
			Sub{Rythm{c1}}
			Sub{Rythm{[16 r4]}}
			Sub{Rythm{[32 h8]}}
			Rythm{b4s4b4s4 b4s4b4s8b4b8s4b4s4 b4s4b8t8m8l8}
		}
		#r2={
			Sub{Rythm{[4 C2^8C4.]}}
			Sub{Rythm{[4 r1]}}
			[3 Rythm{'bs8't8m8l8b8s4.}]
			Rythm{'bs8't8m8l8 [3 m12][3 l12]}
		}

		LoopPlay(
			[
				[4 #r1]
				#r2
			]
		)

}

IF(SHORI=1) {
	Tempo 135
	Int LOOP=3

	Int CYMINIT=0
	Function LoopPlay(Str Mml) {
		Str _MML
		For (Int i = 1; i <= LOOP; i++) {
			_MML=_MML + #STR(Mml)
		}
		_MML
	}

	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"
		MML=MML+Random(MIN,MAX)
		MML
	}

	TR(1)
		r-42
		LoopPlay(
			@(Trumpet)
			o5l12v127q90
			a4>d4c4c6<b
			l12arf#d2 def#
			l12
			g4^ab a4^gf#
			e2.r4

			a4>d4c4c8.<b
			arf#>d2 def#
			g4^ab- a4^gf
			g2.r4

			@(Violin)q95
			g4^<b-b- >e-4 e-fg
			f4.r8
			e-4^<aa> c4cde-
			d4.r8
			d4^<f#f# a4ab->c<
			b-4>c4d4de-f
			g4^ab- a4^gf
			q100g1Sub{a2..r8}r1
		)

	TR(2)
		音色(FrenchHorn)
		LoopPlay(
			l4
			o4v80q90
			[
				['f#a>d<']
				['gb>d<']
				[4 'f#a>d<']
				:
				[4 'g>ce<']
				[2 'ea>d<']
				[2 'ea>c#<']
			]
			[2 'gb->e-<']
			[2 'a>cf<']
			[2 '>cdg<']
			[2 'b>dg<']

			[4 'gb->e-<']
			[2 'fb->d<']
			[2 'f#a>e-<']
			[2 'f#a>d<']
			[2 'gb->d<']

			[2 'f#a>d<']
			[2 'f#a>c<']
			[2 'gb-><']
			[2 'gb->d<']
			[2 'gb->e-<']
			[2 'a>cf<']
			[4 'b>dg<']
			[4 'a>c#e<']
		)

	TR(8)
		音色(OrchestralHarp)
		LoopPlay(
			o3v90
			[3 r1]
			r4
			[l24 a>deaed]
			l24 a>c#ec#ea
			[3 r1]
			o3
			r4
			[l24 g>cdgcd]
			l24 gb>dgb>d

			[7 r1]
			o3
			[l24 a>deaed]
			[l24 a>c#ec#ea]
		)

	TR(9)
		音色(Contrabass)
		LoopPlay(
			o3v100q92
			[8 d4]
			[4 c4]
			[4 <a4>]
			[8 d4]
			[2 e-4]
			[2 f4]
			[4 g4]
			e-1b-2
			>c2<d2g2
			d1g2f2
			e-2f2
			g4g4g4g4 a4a4a4a4
		)

	TR(10)
		音色(OrchestraSet)
		$b{n(Kick1),}
		$s{n(Snare2),}
		$c{n(Cymbal()),}

		Int VV=127
		#r1={
			VV=127
			Sub{
				[4
					RandV(VV-10,VV)
					Rythm{
						b4
					}
				]
			}
			Sub{
				[3
					RandV(VV-10,VV)
					Rythm{
						s4
					}
					VV=VV-20
				]
				VV=60
				[6
					VV=VV+10
					RandV(VV-20,VV)
					Rythm{
						s24
					}
				]
			}
			r1
		}

		#r2={
			Sub{Rythm{c2c2c2}}
			Sub{
				[6
					RandV(VV-10,VV)
					Rythm{
						b4
					}
				]
			}
			Sub{
				[5
					RandV(VV-10,VV)
					Rythm{
						s4
					}
					VV=VV-15
				]
				VV=50
				[6
					VV=VV+15
					RandV(VV-20,VV)
					Rythm{
						s24
					}
				]
			}
			r1.
		}
		LoopPlay(
			[2
				Sub{Rythm{c1}}
				[4 #r1]
			]

			[2
				#r2
			]
			Sub{
				Rythm{
					c1^1
					c2c2
					c1
					c1
				}
			}
			[5 #r1]
		}
}

End

##############################################################################
# for sento
# by @nanakochi123456
# TiMidiTy Config (v2.0)

dir ../patches/guspat/izumo/inst
dir ../patches/guspat/izumo
dir ../patches/guspat
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_all/bank48
dir ../patches/sf2_part/drumkit
dir ../patches/sf2_part/piano
dir ../patches/sf2_part/guitar
dir ../patches/sf2_part/harpsichord
dir ../patches/sf2_part/ORCHESTRAL
dir ../patches/sf2_part/Clarinet
dir ../patches/sf2_part/chipfont
dir ../patches/sf2_part/drum
dir ../patches/sf2_drum/drum/pettinhouse
dir "../patches/sf2_collection/3.5G HQ Orchestral"
dir "../patches/sf2_collection/3.5G HQ Orchestral/Strings part 1"

dir ../patches/sf2_part/famicom
dir ../patches/sf2_all/musix
dir ../patches/sf2_all/Musyng
dir ../patches/sf2_all/Evanessence2

dir ../patches/sf2_all/Giant
dir ../patches/sf2_all/Titanic
dir "../patches/sf2_drum/drum/MPC Drum Library"
dir "../patches/sf2_part/Sonatina Symphonic Orchestra"
dir "../patches/nanako"
dir "../patches/wood"
dir "../patches/sf2_part/Anthonys Philharmonic"
dir "../patches/sf2_all/Timbres Of Heaven"

##############################################################################
soundfont "Titanic_200_GMGS_1.2.sf2"
bank 0
	68 %font "Woodwinds - Oboe Solo.sf2" 0 0 amp=230 pan=20

	40 %font "Strings part 1/aaviolin.sf2" 0 1 amp=200 pan=-20
	48 %font "Strings - Celli Sustain.sf2" 0 0 amp=110 pan=40
	56 %font "Papelmedia_Trumpet.sf2" 0 0 amp=100 pan=-30
	46 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 46 amp=180 pan=-60

# clarinet
	71 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 71 amp=100 pan=-20 keep=loop rate=255:10:20:210:210:210 offset=255:200:150

# piccolo
	72 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 72 amp=100 pan=30 keep=loop rate=255:10:20:210:210:210 offset=255:200:150

	32 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 32 amp=90 rate=:::240:240:240

##############################################################################

# Standard drums

drumset 0

	# stick
#	31 %font "Roland SC-55.sf2" 128 0 31 amp=130
	31 %font "Musyng Kite.sf2" 128 8 31 amp=260 pan=90

	# bd
	36 %font "0_Yamaha9000.sf2" 128 0 34 amp=375 tune=-3
#	36 %font "0_Judd-Madden-Drum-S.sf2" 128 0 56 amp=200

	# sd
	38 %font "0_Yamaha9000.sf2" 128 0 32 amp=150 pan=30
	40 %font "0_Yamaha9000.sf2" 128 0 31 amp=150 pan=40

	# hihat
	# close
	42 %font "0_Yamaha9000.sf2" 128 0 50 amp=65
	# pedal
	44 %font "0_Yamaha9000.sf2" 128 0 45 amp=130
	# open
	46 %font "0_Yamaha9000.sf2" 128 0 51 amp=105
	87 %font "0_Yamaha9000.sf2" 128 0 47 amp=115
	88 %font "0_Yamaha9000.sf2" 128 0 48 amp=115
	89 %font "0_Yamaha9000.sf2" 128 0 49 amp=115
	90 %font "0_Yamaha9000.sf2" 128 0 50 amp=115

	# tom
	50 %font "Musyng original.sf2" 128 16 50 amp=175 tune=2
	48 %font "Musyng original.sf2" 128 16 48 amp=135 tune=2
	47 %font "Musyng original.sf2" 128 16 47 amp=130 tune=3
	45 %font "Musyng original.sf2" 128 16 45 amp=130 tune=3
	43 %font "Musyng original.sf2" 128 16 43 amp=130 tune=3
	41 %font "Musyng original.sf2" 128 16 41 amp=130 tune=3

#extension altassign 42 44 46 87 88 89 90

	# cymbal
	49 %font "0_Yamaha9000.sf2" 128 0 60 amp=105 pan=10 tune=0
	57 %font "0_Yamaha9000.sf2" 128 0 60 amp=105 pan=-100 tune=0
	61 %font "0_Yamaha9000.sf2" 128 0 61 amp=105 pan=10 tune=0
	62 %font "0_Yamaha9000.sf2" 128 0 62 amp=105 pan=-100 tune=0

	49 %font Titanic_200_GMGS_1.2.sf2 128 0 57 amp=200 pan=10 tune=0
	57 %font Titanic_200_GMGS_1.2.sf2 128 0 57 amp=200 pan=+100 tune=+0.5

	# Splash
	55 %font "atomic.sf2" 128 0 55 amp=140 pan=-30 tune=0
	52 %font "atomic.sf2" 128 0 55 amp=140 pan=+70 tune=+0.5

	# Ride
	51 %font "0_Yamaha9000.sf2" 128 0 53 amp=200
	53 %font "0_Yamaha9000.sf2" 128 0 52 amp=200

	49 %font "0_Yamaha9000.sf2" 128 0 37 amp=250 pan=30 pan=+10 tune=1.5
	57 %font "0_Yamaha9000.sf2" 128 0 37 amp=250 pan=30 pan=+100 tune=1

	# Crap
	39 %font "0_MPC Claps01.sf2" 128 0 66 amp=180 tune=+0.5


	# belltree
	84 %font "Percussion - All Percussion.sf2" 128 0 48 keep=loop amp=350


##############################################################################
# For Shori
# by @nanakochi123456
#
# TiMidiTy Config (v2.0)

dir "../patches/sf2_collection/3.5G HQ Orchestral/Brass and Woodwinds/Brass"
dir "../patches/sf2_collection/Free Soundfont Kit/STRINGS"
dir "../patches/sf2_collection/Free Soundfont Kit/STRINGS"
dir "../patches/sf2_collection/Free Soundfont Kit/Brass"

dir ../patches/guspat/izumo/inst
dir ../patches/guspat/izumo
dir ../patches/guspat
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_all/bank48
dir ../patches/sf2_part/drumkit
dir ../patches/sf2_part/piano
dir ../patches/sf2_part/guitar
dir ../patches/sf2_part/harpsichord
dir ../patches/sf2_part/ORCHESTRAL
dir ../patches/sf2_part/Clarinet
dir ../patches/sf2_part/chipfont
dir ../patches/sf2_part/drum
dir ../patches/sf2_drum/drum/pettinhouse
dir "../patches/sf2_collection/3.5G HQ Orchestral"
dir "../patches/sf2_collection/3.5G HQ Orchestral/Strings part 1"

dir ../patches/sf2_part/famicom
dir ../patches/sf2_all/musix
dir ../patches/sf2_all/Musyng
dir ../patches/sf2_all/Evanessence2

dir ../patches/sf2_all/Giant
dir ../patches/sf2_all/Titanic
dir "../patches/sf2_drum/drum/MPC Drum Library"
dir "../patches/sf2_part/Sonatina Symphonic Orchestra"
dir "../patches/nanako"
dir "../patches/wood"
dir "../patches/sf2_part/Anthonys Philharmonic"
dir "../patches/sf2_all/Timbres Of Heaven"

##############################################################################
soundfont "Titanic_200_GMGS_1.2.sf2"
bank 0
	68 %font "Woodwinds - Oboe Solo.sf2" 0 0 amp=230 pan=20

	40 %font "Strings part 1/aaviolin.sf2" 0 1 amp=120 pan=-20
	48 %font "Strings - Celli Sustain.sf2" 0 0 amp=110 pan=40
	56 %font "Papelmedia_Trumpet.sf2" 0 0 amp=100 pan=-30
	46 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 46 amp=180 pan=-60

# clarinet
	71 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 71 amp=100 pan=-20 keep=loop rate=255:10:20:210:210:210 offset=255:200:150

# piccolo
	72 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 72 amp=100 pan=30 keep=loop rate=255:10:20:210:210:210 offset=255:200:150

	32 %font "Timbres Of Heaven GM_GS_XG_SFX V 2.0.2.sf2" 0 32 amp=90 rate=:::240:240:240

##############################################################################

drumset 48
	# 大砲
	29 %font "canon.sf2" 128 0 60 amp=511 pan=60
	30 %font "canon.sf2" 128 0 60 amp=511 pan=50
	31 %font "canon.sf2" 128 0 60 amp=511 pan=40
	32 %font "canon.sf2" 128 0 60 amp=511 pan=30
#	29 %font "fh70.sf2" 128 0 60 amp=511 pan=60
#	30 %font "fh70.sf2" 128 0 60 amp=511 pan=50
#	31 %font "fh70.sf2" 128 0 60 amp=511 pan=40
#	32 %font "fh70.sf2" 128 0 60 amp=511 pan=30

	# bd
	36 %font "Percussion - All Percussion.sf2" 128 0 37 amp=300 pan=-25

	# sd
	38 %font "Percussion - All Percussion.sf2" 128 0 38 amp=400 pan=-60
	39 %font "Percussion - All Percussion.sf2" 128 0 40 amp=400 pan=-60
	40 %font "Percussion - All Percussion.sf2" 128 0 38 amp=400 pan=-60
	41 %font "Percussion - All Percussion.sf2" 128 0 40 amp=400 pan=-60

	# cymbal
	49 %font "Percussion - All Percussion.sf2" 128 0 45 amp=190 pan=-45
	57 %font "Percussion - All Percussion.sf2" 128 0 45 amp=190 pan=50

	# gong
	58 %font "Percussion - All Percussion.sf2" 128 0 67 amp=511 pan=-40
	59 %font "Percussion - All Percussion.sf2" 128 0 68 amp=511 pan=-40
	60 %font "Percussion - All Percussion.sf2" 128 0 69 amp=511 pan=-40

	# gong roll
	61 %font "Percussion - All Percussion.sf2" 128 0 44 amp=511 tune=-9 pan=-40

	# Triangle Open
	81 %font "Orchestra Drums Kit.SF2" 128 0 81 amp=200 pan=-35
	# Triangle Close
	80 %font "Orchestra Drums Kit.SF2" 128 0 81 amp=200 pan=-35
	# Triangle Loop
	82 %font "Percussion - All Percussion.sf2" 128 0 58 amp=300 pan=-25
