Define Device (
	Manufacturer "Boss"
	Device "SE-50"
	Part "Ambience"
	Checksum Zero
	CharSet (
		Disable (
			$40 $5C $60 $7E
		)
	)
	Channel 1
)

Define Font "Numbers" (
	Name "Helvetica.font"
	Size 9
)

Define Font "Topaz2" (
	Name "Topaz2.font"
	Size 8
)

Define Font "Topaz2p" (
	Name "Topaz2p.font"
	Size 8
)


Define Window "Effect_Select" (
	Position 0 14
	Size 640 24
)

Define Window "Parameters" (
	Position 0 41
	Size 640 359
)

Define Midi "Parameter" (
	Data (
		F0h     'Exclusive status
		41h     'Roland ID
		Byte
		37h     'Model ID
		12h     'Command: DT1
		02h     'Address MSB
		00h     'Address
		Byte    'Address LSB
		Bytes 2 'Data
		Byte    'Checksum
		F7h     'EOX
	)
	Midi (
		Data (
			2 CHANNEL
			10 CHECKSUM 5 9
		)
	)
)

Define Midi "PatchName" (
	Data (
		F0h      'Exclusive status
		41h      'Roland ID
		Byte     'Channel
		37h      'Model ID
		12h      'Command: DT1
		02h      'Address MSB
		00h      'Address
		68h      'Address LSB
		Bytes 12 'Data - Name
		Byte     'Checksum
		F7h      'EOX
	)
	Midi (
		Data (
			2 CHANNEL
			20 CHECKSUM 5 19
		)
	)
)

Define Midi "Patch" (
	Loadable
	DataFile "modules/Boss/SE-50/Ambience.dm"
	Midi (
		Data (
			2 CHANNEL
			126 CHECKSUM 5 125
		)
	)
)

Define Midi "Initialize" (
	Data (
		C0h 'Patch Change
		00h '#1
	)
	Midi (
		Data (
			0 CHANNEL
		)
	)
)

Define Initialize (
	Midi "Initialize" (
		Send
	)
	Midi "Patch" (
		Send
	)
)


Define Link "Effect_Select" (
	Type Modules (
		Data (
			"Boss/SE-50/Hall1"
			"Boss/SE-50/Hall2"
			"Boss/SE-50/Room"
			"Boss/SE-50/Plate"
			"Boss/SE-50/Ambience"
			"Boss/SE-50/GateReverb"
			"Boss/SE-50/StereoReverb"
			"Boss/SE-50/MultiDelay"
			"Boss/SE-50/MultiTapDelay"
			"Boss/SE-50/StereoDelay"
			"Boss/SE-50/SpaceChorus"
			"Boss/SE-50/MultiPitchShifter"
			"Boss/SE-50/StereoPitchShifter"
			"Boss/SE-50/StereoFlanger"
			"Boss/SE-50/StereoPhaser"
			"Boss/SE-50/Vocoder"
			"Boss/SE-50/RotarySpeaker"
			"Boss/SE-50/KeyboardMulti1"
			"Boss/SE-50/KeyboardMulti2"
			"Boss/SE-50/Rhodes"
			"Boss/SE-50/GuitarMulti"
			"Boss/SE-50/VocalMulti"
			"Boss/SE-50/StereoEnhancer"
			"Boss/SE-50/2ChannelMixer"
			"Boss/SE-50/Reverb+Reverb"
			"Boss/SE-50/GateReverb+Reverb"
			"Boss/SE-50/Chorus+Reverb"
			"Boss/SE-50/Delay+Reverb"
		)
	)
)

Define Link "Pre+ERDelay" (
	Type Numbers (
		Font "Numbers"
		Position 0 -12
		Size 100 8
		MinValue 0
		Skip 2
		LevelText "ms"
	)
)
Define Link "ERType" (
	Type Texts (
		Font "Numbers"
		Position 0 -12
		Size 100 8
		Data (
			"Upper" "Mid to High" "Flat" "Mid to Low"
		)
	)
)
Define Link "LPF" (
	Type Texts (
		Font "Numbers"
		Position 0 -12
		Size 100 8
		Data (
			"500 Hz" "700 Hz" "1 kHz" "1.5 kHz" "2 kHz" "3 kHz" "4 kHz" "6 kHz"
			"8 kHz" "12 kHz" "THRU"
		)
	)
)
Define Link "HPF" (
	Type Texts (
		Font "Numbers"
		Position 0 -12
		Size 100 8
		Data (
			"THRU" "30 Hz" "45 Hz" "60 Hz" "90 Hz" "120 Hz" "180 Hz" "250 Hz"
			"350 Hz" "500 Hz" "700 Hz" "1 kHz"
		)
	)
)


Window "Effect_Select" (
	Border (
		Position 0 0
		Position2 639 23
		Fill 3
	)

	Text "BOSS : SE-50" (
		Position 537 14
		Color 2
		Shadow
	)

	Gadget "Page" (
		Position 8 5
		Type Cycle (
			Data (
				"Hall 1"
				"Hall 2"
				"Room"
				"Plate"
				"Ambience"
				"Gate Reverb"
				"Stereo Reverb"
				"Multi Delay"
				"Multi Tap Delay"
				"Stereo Delay"
				"Space Chorus"
				"Multi Pitch Shifter"
				"Stereo Pitch Shifter"
				"Stereo Flanger"
				"Stereo Phaser"
				"Vocoder"
				"Rotary Speaker"
				"Keyboard Multi 1"
				"Keyboard Multi 2"
				"Rhodes"
				"Guitar Multi"
				"Vocal Multi"
				"Stereo Enhancer"
				"2 Channel Mixer"
				"Reverb + Reverb"
				"Gate Reverb + Reverb"
				"Chorus + Reverb"
				"Delay + Reverb"
			)
			Default 4
			Link "Effect_Select"
		)
	)

	Gadget "PatchName" (
		Position 355 5
		Font "Topaz2"
		Type String (
			MaxChars 12
		)
		Midi "PatchName" (
			Data (
				8 VALUE Byte
			)
			Send
		)
		Midi "Patch" (
			Data (
				70h VALUE Byte
			)
		)
	)
)

Window "Parameters" (
	Border (
		Position 0 0
		Position2 639 159
		Frame 3D-Recess
	)
	Border (
		Position 0 158
		Position2 639 174
		Fill 3
		Frame 3D-Recess
	)
	Text "Ambience" (
		Position 288 169
	)

	Text "Mode" (
		Position 51 14
	)
	Gadget "Ambience_Mode" (
		Position 17 30
		Font "Numbers"
		Type Slider (
			Range 1 4
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
		)
		Midi "Parameter" (
			Data (
				7 04h Byte
				8 VALUE Offset -1 XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				0Ch VALUE Offset -1 XBits abbbbbbb
			)
		)
	)

	Text "Pre Delay" (
		Position 143 14
	)
	Gadget "Ambience_PreDelay" (
		Position 127 30
		Font "Numbers"
		Type Slider (
			Range 0 200
			Size 100 12
			Direction HORIZONTAL
			Link "Pre+ERDelay"
		)
		Midi "Parameter" (
			Data (
				7 06h Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				0Eh VALUE XBits abbbbbbb
			)
		)
	)


	Border (
		Position 156 55
		Position2 248 56
	)
	Text "Early Reflections" (
		Position 255 59
	)
	Border (
		Position 383 55
		Position2 475 56
	)

	Text "Type" (
		Position 192 70
	)
	Gadget "Ambience_ERType" (
		Position 156 86
		Font "Numbers"
		Type Slider (
			Range 0 3
			Size 100 12
			Direction HORIZONTAL
			Link "ERType"
		)
		Midi "Parameter" (
			Data (
				7 08h Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				10h VALUE XBits abbbbbbb
			)
		)
	)

	Text "Delay" (
		Position 300 70
	)
	Gadget "Ambience_ERDelay" (
		Position 266 86
		Font "Numbers"
		Type Slider (
			Range 0 200
			Size 100 12
			Direction HORIZONTAL
			Link "Pre+ERDelay"
		)
		Midi "Parameter" (
			Data (
				7 0Ah Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				12h VALUE XBits abbbbbbb
			)
		)
	)

	Text "Level" (
		Position 409 70
	)
	Gadget "Ambience_ERLevel" (
		Position 376 86
		Font "Numbers"
		Type Slider (
			Range 0 100
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
		)
		Midi "Parameter" (
			Data (
				7 0Ch Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				14h VALUE XBits abbbbbbb
			)
		)
	)


	Border (
		Position 17 111
		Position2 91 112
	)
	Text "Filters" (
		Position 98 115
	)
	Border (
		Position 150 111
		Position2 226 112
	)

	Text "Low-Pass" (
		Position 36 126
	)
	Gadget "Ambience_LPF" (
		Position 17 142
		Font "Numbers"
		Type Slider (
			Range 0 10
			Size 100 12
			Direction HORIZONTAL
			Link "LPF"
		)
		Midi "Parameter" (
			Data (
				7 16h Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				1Eh VALUE XBits abbbbbbb
			)
		)
	)

	Text "High-Pass" (
		Position 142 126
	)
	Gadget "Ambience_HPF" (
		Position 127 142
		Font "Numbers"
		Type Slider (
			Range 0 11
			Size 100 12
			Direction HORIZONTAL
			Link "HPF"
		)
		Midi "Parameter" (
			Data (
				7 18h Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				20h VALUE XBits abbbbbbb
			)
		)
	)


	Border (
		Position 266 111
		Position2 356 112
	)
	Text "EQ" (
		Position 363 115
	)
	Border (
		Position 384 111
		Position2 475 112
	)

	Text "Low" (
		Position 304 126
	)
	Gadget "Ambience_EQLow" (
		Position 266 142
		Font "Numbers"
		Type Slider (
			Range -12 12
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
			LevelText "db"
		)
		Midi "Parameter" (
			Data (
				7 12h Byte
				8 VALUE Offset 12 XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				1Ah VALUE Offset 12 XBits abbbbbbb
			)
		)
	)

	Text "High" (
		Position 411 126
	)
	Gadget "Ambience_EQHigh" (
		Position 376 142
		Font "Numbers"
		Type Slider (
			Range -12 12
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
			LevelText "db"
		)
		Midi "Parameter" (
			Data (
				7 14h Byte
				8 VALUE Offset 12 XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				1Ch VALUE Offset 12 XBits abbbbbbb
			)
		)
	)


	Text "Ambience Level" (
		Position 520 126
	)
	Gadget "Ambience_Level" (
		Position 522 142
		Font "Numbers"
		Type Slider (
			Range 0 100
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
		)
		Midi "Parameter" (
			Data (
				7 1Ah Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				22h VALUE XBits abbbbbbb
			)
		)
	)


	Border (
		Position 397 183
		Position2 639 229
		Frame 3D-Recess
	)
	Border (
		Position 397 228
		Position2 639 244
		Fill 3
		Frame 3D-Recess
	)
	Text "Levels" (
		Position 499 239
	)

	Text "Direct" (
		Position 443 196
	)
	Gadget "Direct_Level" (
		Position 412 212
		Font "Numbers"
		Type Slider (
			Range 0 100
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
		)
		Midi "Parameter" (
			Data (
				7 1Eh Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				26h VALUE XBits abbbbbbb
			)
		)
	)

	Text "Master" (
		Position 550 196
	)
	Gadget "Master_Level" (
		Position 522 212
		Font "Numbers"
		Type Slider (
			Range 0 100
			Size 100 12
			Direction HORIZONTAL
			LevelPlace ABOVE
		)
		Midi "Parameter" (
			Data (
				7 2Ah Byte
				8 VALUE XBits abbbbbbb
			)
			Send
		)
		Midi "Patch" (
			Data (
				32h VALUE XBits abbbbbbb
			)
		)
	)
)
