OrderedGroup {
	children [
		Transform2D {
			translation 0 15
			children [
                
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 2
						}
     				}
     				geometry Bitmap {}
				}
			]
		}
		Transform2D {
			translation 0 300
			children [
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 4 
						}
     				}
     				geometry Bitmap {}
				}
			]
		}         
		Transform2D {
			translation 515 15
			children [
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 7
						}
     				}
     				geometry Bitmap {}
				}
			]
		}
		Transform2D {
			translation -515 15
			children [
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 6 
						}
     				}
     				geometry Bitmap {}
				}
			]
		}
#MUSIC SCORE
		Transform2D {
			translation 0 0
			children [
				DEF SCORE_TS TouchSensor {}
				ScoreShape {
					score DEF SCORE MusicScore {
						url 5
						size 795 550
						startTime -1
						stopTime  -1
						loop true
						hyperlinkEnable true
     				}
     				geometry Bitmap {}
				}
			]
		}

#TIME HIGHLIGHT BAR
        DEF BAR Transform2D 
        {
            translation -330 250
			children 
            [
				DEF BAR_OFFSET Transform2D
				{
					translation 0 -250
					children
					[
						Shape {
							appearance Appearance {
								material Material2D {
									emissiveColor 1 0 0
									filled TRUE
									transparency 0.6
								}
							}
							geometry DEF BAR_RECT Rectangle {
								size 5 500
							}
						}
					]
				}
			]
		}
		DEF BAR_VAL Valuator {
		}

#PLAY Button
        Transform2D {
			translation -550 -270
			children [
            DEF PLAY_TS TouchSensor {}
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 9
						}
     				}
     				geometry Bitmap {}
				}
			]
		}
		DEF PLAY_SEL Conditional {
			buffer {
				REPLACE SCORE.stopTime BY -1
			}
		}

#STOP Button
        Transform2D {
			translation -500 -270
			children [
            DEF STOP_TS TouchSensor {}
				Shape {
					appearance Appearance 
					{
						texture ImageTexture { 
							url 10
						}
     				}
     				geometry Bitmap {}
				}
			]
		}

#SLIDER
		Transform2D {
			translation 0 -320
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0.3 0.7
							filled TRUE
						}
					}
					geometry Rectangle {
						size 800 20
					}
				}
			]
  		}
		DEF N0 Transform2D {
			translation -375 -320
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 1 0 0
							filled TRUE
						}
     					}
					geometry Rectangle {
						size 50 20
					}
				}
				DEF N2 PlaneSensor2D {
					maxPosition 375 -320
					minPosition -375 -320
					offset -375 -320
				}
   			]
		}
		Transform2D {
			translation 0 -330
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 1 1 1 
							filled TRUE
						}
					}
					geometry DEF TXT Text {
						string ["1.000000"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["MIDDLE"]
							size 16
						}
					}
				}
			]
  		}
		DEF V Valuator {
			Factor1 0.072
			Factor2 0
			Factor3 0
			Offset1 28
		}
		DEF V1 Valuator {
		}


#MEASURE COUNT        
        Transform2D {
			translation -610 235
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Measure count:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							style "BOLD"
							size 18
						}
					}
				}
			]
  		}
		Transform2D {
			translation -610 210
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF NMSR Text {
						string ["Elaborating..."]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
 
 #VIEWS       
        Transform2D {
			translation -610 180
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Available views:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
  		}
        
		Transform2D {
			translation -610 150
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF VIEWS Text {
						string ["Elaborating..."]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}

#PARTS
 		Transform2D {
			translation -610 110
			children [
	            DEF ALLPARTS_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Parts:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
  		}
		DEF ALLPARTS_SEL Conditional {
			buffer {
				REPLACE SCORE.partsShown BY [ ]
				REPLACE BAR_RECT.size BY 5 500
				REPLACE BAR_OFFSET.translation BY 0 -250
			}
		}
        
		Transform2D {
			translation -610 90
			children [
	            DEF PARTS_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF PARTS Text {
						string ["Elaborating..."]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
		DEF PARTS_SEL Conditional {
			buffer {
				REPLACE SCORE.partsShown BY [ 1 ]
				REPLACE BAR_RECT.size BY 5 100
				REPLACE BAR_OFFSET.translation BY 0 -50
			}
		}

#LYRICS
 		Transform2D {
			translation -610 0
			children [
	            DEF AVL_LYRICS_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Available Lyrics (per part):"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
  		}
#		DEF AVL_LYRICS_SEL Conditional {
#			buffer {
#				REPLACE SCORE.partLyrics BY [ ]
#			}
#		}
        
		Transform2D {
			translation -610 -20
			children [
	            DEF LYRICS_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF LYRICS Text {
						string ["None"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
#		DEF LYRICS_SEL Conditional {
#			buffer {
#				REPLACE SCORE.partLyrics BY [ ]
#			}
#		}

#LABELS
		Transform2D {
			translation -610 -100
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Labels:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
		Transform2D {
			translation -610 -130
			children [
				DEF LABELS_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF LABELS Text {
						string ["None"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
		DEF LABEL_SEL Conditional {
			buffer {
				REPLACE SCORE.gotoLabel BY "B"
			}
		}

#VISIBLE MEASURES		
		Transform2D {
			translation -610 -180
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Visible measures:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}

		Transform2D {
			translation -550 -210
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF FIRSTMEASURE Text {
						string ["1.000000"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["MIDDLE"]
							size 16
						}
					}
				}
			]
		}
		Transform2D {
			translation -480 -210
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF LASTMEASURE Text {
						string ["Elaborating..."]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["MIDDLE"]
							size 16
						}
					}
				}
			]
		}

		DEF VNMSR Valuator {
		}
		DEF VFSTMSR Valuator {
		}
		DEF VLSTMSR Valuator {
		}

#LINK
		Transform2D {
			translation +480 235
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF HLINK_ENABLED Text {
						string ["1.000000"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
 		}
		DEF HLINK_ENABLED_VAL Valuator {
		}
		Transform2D {
			translation +420 235
			children [
				DEF LINK_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Link:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
 		}
        
		Transform2D {
			translation +420 210
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF LINKS Text {
						string [""]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
		DEF LINK_VAL Valuator {
		}
		DEF LINK_SEL Conditional {
			buffer {
				REPLACE SCORE.hyperlinkEnable BY true
			}
		}

#CURRENT COMMAND
		Transform2D {
			translation 420 200
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF COMMAND Text {
						string [""]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "ITALIC"
						}
					}
				}
			]
		}
#TRANSPOSE
		Transform2D {
			translation 420 180
			children [
				DEF TRANSPOSEUP_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Transpose Up"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
		DEF TRANSPOSEUP_SEL Conditional {
			buffer {
				REPLACE SCORE.hyperlinkEnable BY false
				REPLACE SCORE.argumentsOnExecute BY [ "0" "0" "0" "1" ]
				REPLACE SCORE.commandOnExecute BY ["TRANSPOSE"]
				REPLACE SCORE.executeCommand BY true
			}
		}
		Transform2D {
			translation 420 160
			children [
				DEF TRANSPOSEDWN_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Transpose Down"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
		DEF TRANSPOSEDWN_SEL Conditional {
			buffer {
				REPLACE SCORE.hyperlinkEnable BY false
				REPLACE SCORE.argumentsOnExecute BY [ "0" "0" "0" "-1" ]
				REPLACE SCORE.commandOnExecute BY ["TRANSPOSE"]
				REPLACE SCORE.executeCommand BY true
			}
		}
#ADDNOTE
		Transform2D {
			translation 420 140
			children [
				DEF ADDNOTE_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Add 1/4 Note"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
		DEF ADDNOTE_SEL Conditional {
			buffer {
				REPLACE SCORE.hyperlinkEnable BY false
				REPLACE SCORE.argumentsOnExecute BY [ "1" "D1_4" "CLASSIC" ]
				REPLACE SCORE.commandOnExecute BY ["ADD_NOTE"]
			}
		}
#DELETE
		Transform2D {
			translation 420 120
			children [
				DEF DELETE_TS TouchSensor {}
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Delete"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
		DEF DELETE_SEL Conditional {
			buffer {
				REPLACE SCORE.hyperlinkEnable BY false
				REPLACE SCORE.commandOnExecute BY ["DELETE"]
			}
		}

#COMMANDS
		Transform2D {
			translation 420 0
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry Text {
						string ["Available Commands:"]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 18
							style "BOLD"
						}
					}
				}
			]
		}
        Transform2D {
			translation 420 -20
			children [
				Shape {
					appearance Appearance {
						material Material2D {
							emissiveColor 0 0 0
							filled TRUE
						}
					}
					geometry DEF CMDS Text {
						string ["Elaborating..."]
						fontStyle FontStyle {
							family ["Arial"]
							justify ["LEFT"]
							size 16
						}
					}
				}
			]
		}
    ]
}


ROUTE SCORE.availableCommands TO CMDS.string
ROUTE SCORE.availableViewTypes TO VIEWS.string
ROUTE SCORE.partNames TO PARTS.string
ROUTE SCORE.availableLabels TO LABELS.string
ROUTE SCORE.availableLyricLanguages TO LYRICS.string

ROUTE SCORE.numMeasures TO VNMSR.inSFInt32
ROUTE VNMSR.outMFString TO NMSR.string

ROUTE SCORE.firstVisibleMeasure TO VFSTMSR.inSFInt32
ROUTE VFSTMSR.outMFString TO FIRSTMEASURE.string

ROUTE SCORE.lastVisibleMeasure TO VLSTMSR.inSFInt32
ROUTE VLSTMSR.outMFString TO LASTMEASURE.string

#EXECUTION
ROUTE PLAY_TS.touchTime TO SCORE.startTime
ROUTE PLAY_TS.isActive TO PLAY_SEL.activate
ROUTE STOP_TS.touchTime TO SCORE.stopTime

ROUTE SCORE.highlightPosition TO BAR_VAL.inSFVec3f
ROUTE BAR_VAL.outSFVec2f TO BAR.translation

#PARTS
ROUTE PARTS_TS.isActive TO PARTS_SEL.activate
ROUTE ALLPARTS_TS.isActive TO ALLPARTS_SEL.activate

#SLIDER
ROUTE N2.translation_changed TO V.inSFVec2f
ROUTE N2.translation_changed TO N0.translation
ROUTE V.outSFInt32 TO V1.inSFInt32
ROUTE V1.outMFString TO TXT.string
ROUTE V.outSFInt32 TO SCORE.gotoMeasure
ROUTE SCORE_TS.hitPoint_changed TO SCORE.mousePosition
ROUTE SCORE_TS.isActive TO SCORE.executeCommand

#COMMANDS
#ROUTE SCORE.commandOnExecute TO COMMAND.string
ROUTE TRANSPOSEUP_TS.isActive TO TRANSPOSEUP_SEL.activate
ROUTE TRANSPOSEDWN_TS.isActive TO TRANSPOSEDWN_SEL.activate
ROUTE ADDNOTE_TS.isActive TO ADDNOTE_SEL.activate
ROUTE DELETE_TS.isActive TO DELETE_SEL.activate

#JUMP TO LABEL
ROUTE LABELS_TS.isActive TO LABEL_SEL.activate

#LINKS 
ROUTE LINK_TS.isActive TO LINK_SEL.activate

ROUTE SCORE.activatedLink TO LINKS.string
#LINK_VAL.inSFString
#ROUTE LINK_VAL.outMFString TO LINKS.string
ROUTE SCORE.hyperlinkEnable TO HLINK_ENABLED_VAL.inSFBool
ROUTE HLINK_ENABLED_VAL.outMFString TO HLINK_ENABLED.string

AT 0
UPDATE OD [
{
   objectDescriptorID  2
   muxScript mozart.scr
}
{
   objectDescriptorID  4
   muxScript mozart.scr
}
{  
   objectDescriptorID  5
   muxScript mozart.scr
}
{
   objectDescriptorID  6
   muxScript mozart.scr
}
{
   objectDescriptorID  7
   muxScript mozart.scr
}
{
   objectDescriptorID  9
   muxScript mozart.scr
}
{
   objectDescriptorID  10
   muxScript mozart.scr
}
]