{
  "information": {
    "Title": "RBSong",
    "Author": [
      "Angela Kwan"
    ],
    "AuthorLogo": [
      ""
    ],
    "Password": "unused",
    "Keywords": "",
    "Abstract": "",
    "Copyright": "",
    "Level": "",
    "Language": "",
    "Logo": [
      "./logo18.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./logo18.png"
    ],
    "AuxiliaryFiles": [
      "./audio/",
      "./logo18.png"
    ],
    "HTMLHead": "<script \nasync=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=G-S9EWRY1CPJ\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n\n  gtag('config', 'G-S9EWRY1CPJ');\n</script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "UseIndexHtml": "false",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": [
      {
        "Name": "Welcome",
        "Active": "false",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "Welcome",
        "External": "false",
        "Code": "<html>\n<head></head>\n<body>\n<h1 disabled=\"disabled\">Welcome</h1><p disabled=\"disabled\">Instructions to play:</p><div disabled=\"disabled\">1. Select song from the drop down list</div><div disabled=\"disabled\">2. Increase / decrease speed</div><div disabled=\"disabled\">3. Click play</div><div disabled=\"disabled\">4. Either click on the corresponding resonator bell bar on the screen or press keys 1 to 8 as the notes are falling</div><div disabled=\"disabled\">5. Score increase when it is accurate</div>\n</body>\n</html>"
      }
    ]
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "Var Table 1",
          "Active": "true",
          "Internal": "false",
          "Type": "undefined",
          "PageComment": "",
          "Variables": [
            {
              "Name": "x",
              "Value": "[0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5]",
              "Type": "double",
              "Dimension": "[8]",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "y",
              "Value": "[]",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "dt",
              "Value": "0.05",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "notesArray",
              "Value": "[\"E\",\"D\",\"C\",\"E\",\"D\",\"C\",\"C\",\"C\",\"C\",\"C\",\"D\",\"D\",\"D\",\"D\",\"E\",\"D\",\"C\"]",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "songArray",
              "Value": "[]",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "currentIndex",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "notesdurationArray",
              "Value": "[1,1,2,1,1,2,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,1,1,2]",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "score",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "tolerance",
              "Value": "0.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "speed",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "maxY",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "currentSpeed",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "currentSong",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "songIndex",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            }
          ]
        },
        {
          "Name": "Songs Input",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "songs",
              "Value": "[\"Hot Cross Bun\",\"Ode To Joy\",\"Twinkle Twinkle\",\"Naughty Kitty Cat\"]",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "nsongs",
              "Value": "4",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "Introduction",
          "Active": "true",
          "Internal": "false",
          "Type": "undefined",
          "Comment": "",
          "Code": "// Introduction\n// _tools.showOkDialog(\"<p style='font-size:32px; color:black'> <br/>Play along with the score. Click on the corresponding resonator bell in time with the score.</p>\");\n// document.getElementById(\".myBoxPanelOk\").style.width = \"60%\";\n// document.getElementById(\".myBoxPanelOk\").style.left = \"40%\";"
        },
        {
          "Name": "Song choices",
          "Active": "false",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Song choices\n// Copy and paste the following arrays into the corresponding variables\n\n/*\nif (songIndex == 0){//Hot cross buns;\n    notesArray = [\"E\",\"D\",\"C\",\"E\",\"D\",\"C\",\"C\",\"C\",\"C\",\"C\",\"D\",\"D\",\"D\",\"D\",\"E\",\"D\",\"C\"];\n    notesdurationArray = [1,1,2,1,1,2,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,1,1,2];\n}\nelse if (songIndex == 1){ // Ode to Joy\n    notesArray = [\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"E\",\"D\",\"D\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\",\"D\",\"D\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"D\",\"C\",\"D\",\"G\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\"];\n    notesdurationArray = [1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,0.5,0.5,1,1,1,0.5,0.5,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2];\n}\nelse if (songIndex == 2){ // Twinkle twinkle little star\n    notesArray = [\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\",\"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\",\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\"];\n    notesdurationArray = [1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2];\n}\nelse if (songIndex == 3){ // Naughty Pussy Cat\n    notesArray = [\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"G\",\"G\",\"E\",\"E\",\"A\",\"G\",\"E\",\"E\",\"E\",\"E\",\"D\",\"D\",\"C\"];\n    notesdurationArray = [0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,2];\n}\n*/"
        },
        {
          "Name": "Song Matrix",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// song\ncurrentIndex = 0;\n\nfor (var index = 0; index < notesArray.length; index++) {\n    // y[index] = index + 1; // use this if equal note duration\n    if (index == 0){\n        y[index] = maxY;\n    }\n    else {\n        y[index] = notesdurationArray[index - 1] + y[index - 1]\n    }\n    if (notesArray[index] == \"C\") {\n        songArray[index] = 0.5;\n    } \n    else if (notesArray[index] == \"D\") {\n        songArray[index] = 1.5;\n    }\n    else if (notesArray[index] == \"E\") {\n        songArray[index] = 2.5;\n    }\n    else if (notesArray[index] == \"F\") {\n        songArray[index] = 3.5;\n    }\n    else if (notesArray[index] == \"G\") {\n        songArray[index] = 4.5;\n    }\n    else if (notesArray[index] == \"A\") {\n        songArray[index] = 5.5;\n    }\n    else if (notesArray[index] == \"B\") {\n        songArray[index] = 6.5;\n    }\n    else if (notesArray[index] == \"C5\") {\n        songArray[index] = 7.5;\n    }\n    else {\n        songArray[index] = -2; // hide all rests by placing it out of frame\n    }\n}\n"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "20",
        "SPD": "1",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "Evol Page 1",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "x[i]",
              "rate": "0"
            },
            {
              "state": "y[i]",
              "rate": "-currentSpeed"
            },
            {
              "state": "",
              "rate": ""
            }
          ],
          "Method": "RungeKuttaFehlberg",
          "AbsoluteTolerance": "",
          "PreliminaryCode": {
            "Code": "// Preliminary code for ODE : Evol Page 1",
            "Comment": ""
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Name": "Song Change",
                "Active": "true",
                "Internal": "false",
                "Type": "undefined",
                "Action": "// Action for Song Change\n\nif (songIndex == 0){//Hot cross buns;\n    notesArray = [\"E\",\"D\",\"C\",\"E\",\"D\",\"C\",\"C\",\"C\",\"C\",\"C\",\"D\",\"D\",\"D\",\"D\",\"E\",\"D\",\"C\"];\n    notesdurationArray = [1,1,2,1,1,2,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,1,1,2];\n}\nelse if (songIndex == 1){ // Ode to Joy\n    notesArray = [\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"E\",\"D\",\"D\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\",\"D\",\"D\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"D\",\"C\",\"D\",\"G\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\"];\n    notesdurationArray = [1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,0.5,0.5,1,1,1,0.5,0.5,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2];\n}\nelse if (songIndex == 2){ // Twinkle twinkle little star\n    notesArray = [\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\",\"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\",\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\"];\n    notesdurationArray = [1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2];\n}\nelse if (songIndex == 3){ // Naughty Pussy Cat\n    notesArray = [\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"G\",\"G\",\"E\",\"E\",\"A\",\"G\",\"E\",\"E\",\"E\",\"E\",\"D\",\"D\",\"C\"];\n    notesdurationArray = [0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,2];\n}",
                "Comment": "",
                "EventType": "CROSSING_EVENT",
                "Iterations": "100",
                "Method": "BISECTION",
                "StopAtEvent": "true",
                "Tolerance": "1.0e-5",
                "ZeroCondition": "return 1.0; // Condition for Song Change"
              }
            ]
          },
          "ZenoEffect": {
            "Code": "",
            "Comment": "",
            "StopAfterEffect": "true"
          },
          "AccelerationIndependentOfVelocity": "false",
          "ForceSynchronization": "false",
          "UseBestInterpolation": "false",
          "EstimateFirstStep": "false",
          "MemoryLength": "",
          "InternalStep": "",
          "MaximumStep": "",
          "MaximumNumberOfSteps": "10000",
          "RelativeTolerance": "",
          "Tolerance": "",
          "DelayList": "",
          "DelayMaximum": "",
          "DelayAddDiscont": "",
          "DelayInitialCondition": {
            "Comment": "",
            "Code": ""
          },
          "DirectIncidenceMatrix": "",
          "Discontinuities": {
            "pages": []
          },
          "ErrorHandling": {
            "pages": []
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "Current Note",
          "Active": "true",
          "Internal": "false",
          "Type": "undefined",
          "Comment": "",
          "Code": "// You might want to ensure currentIndex stays within bounds of the array\nwhile (currentIndex < y.length - 1) {\n    if (y[currentIndex] < -tolerance) {\n        currentIndex++;\n    } else {\n        return currentIndex;\n    }\n}"
        },
        {
          "Name": "Current Song",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Current Song\n\n//Check current song selected\nvar opts = _view.songList.getProperty(\"SelectedOptions\");\n// var songIndex = 0; // cannot var here, must be global at EJS variables\ncurrentSong = opts;\n\n// match index of song selected\nfor (var i = 0; i < nsongs; i++){\n    if (songs[i] == currentSong){\n        songIndex = i;\n    }\n}\n//_println(songIndex);\n\n//switch songs\n// to add song, copy from else if {} and change the songIndex, notesArray and notesdurationArray values\n// go to Model >> Variables >> Songs Inputs\n// Manually add in song title into songs variable\n// Change nsongs to the total number of song titles in songs variable\n\nif (songIndex == 0){//Hot cross buns;\n    notesArray = [\"E\",\"D\",\"C\",\"E\",\"D\",\"C\",\"C\",\"C\",\"C\",\"C\",\"D\",\"D\",\"D\",\"D\",\"E\",\"D\",\"C\"];\n    notesdurationArray = [1,1,2,1,1,2,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,1,1,2];\n}\nelse if (songIndex == 1){ // Ode to Joy\n    notesArray = [\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"E\",\"D\",\"D\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\",\"D\",\"D\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"C\",\"D\",\"E\",\"F\",\"E\",\"D\",\"C\",\"D\",\"G\",\"E\",\"E\",\"F\",\"G\",\"G\",\"F\",\"E\",\"D\",\"C\",\"C\",\"D\",\"E\",\"D\",\"C\",\"C\"];\n    notesdurationArray = [1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2,1,1,1,1,1,0.5,0.5,1,1,1,0.5,0.5,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1.5,0.5,2];\n}\nelse if (songIndex == 2){ // Twinkle twinkle little star\n    notesArray = [\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\",\"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"G\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\",\"C\", \"C\", \"G\", \"G\", \"A\", \"A\", \"G\", \"F\", \"F\", \"E\", \"E\", \"D\", \"D\", \"C\"];\n    notesdurationArray = [1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2,1, 1, 1, 1, 1, 1, 2];\n}\nelse if (songIndex == 3){ // Naughty Pussy Cat\n    notesArray = [\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"E\",\"G\",\"G\",\"A\",\"G\",\"0\",\"G\",\"G\",\"E\",\"E\",\"A\",\"G\",\"E\",\"E\",\"E\",\"E\",\"D\",\"D\",\"C\"];\n    notesdurationArray = [0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,2];\n}"
        },
        {
          "Name": "Current Score",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Current Score\n// For users who spam the keyboard keys, the max score will be the max length\n// of the notes of the score but it's not an accurate reflection of their \n// proficiency\n\nif (score > y.length){\n    score = y.length;\n}"
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "Name": "Keyboard Control",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Custom Page 2\n// keycodes: 49 = key 1 ... 56 = key 8\n\ndocument.addEventListener('keydown', function(event) {\n    if((event.keyCode == 49)){ //49 is for 1\n        audio1.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 0.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 50)){ //50 is for 2\n        audio2.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 1.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 51)){ //51 is for 3\n        audio3.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 2.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 52)){ //52 is for 4\n        audio4.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 3.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 53)){ //53 is for 5\n        audio5.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 4.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 54)){ //54 is for 6\n        audio6.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 5.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 55)){ //55 is for 7\n        audio7.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 6.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n    if((event.keyCode == 56)){ //56 is for 8\n        audio8.play();\n        if (Math.abs(y[currentIndex]) <= tolerance && songArray[currentIndex] == 7.5) {\n            score = score + 1;\n        } \n        else {\n            score = score;\n        }\n  }\n}\n)\n\ndocument.addEventListener('keyup', function() {\naudio1.pause();\naudio2.pause();\naudio3.pause();\naudio4.pause();\naudio5.pause();\naudio6.pause();\naudio7.pause();\naudio8.pause();\n}\n)"
        }
      ]
    },
    "elements": {
      "list": []
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "panel",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [],
        "Children": [
          {
            "Name": "singlePlotPanel",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [],
            "Children": [
              {
                "Name": "wrappedPanel",
                "Type": "WrappedPanel",
                "Expanded": "true",
                "Properties": [],
                "Children": [
                  {
                    "Name": "label",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"Resonator Bell\""
                      },
                      {
                        "name": "Font",
                        "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                      }
                    ]
                  },
                  {
                    "Name": "speedPanel",
                    "Type": "Panel",
                    "Expanded": "true",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "speedText",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Speed  = \"+currentSpeed"
                          },
                          {
                            "name": "Visibility",
                            "value": "true"
                          }
                        ]
                      },
                      {
                        "Name": "downSpeed",
                        "Type": "Button",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Decrease speed\""
                          },
                          {
                            "name": "OnClick",
                            "value": "if (currentSpeed >1) {currentSpeed = currentSpeed - 1}"
                          },
                          {
                            "name": "Background",
                            "value": "\"#f9b4cf\""
                          }
                        ]
                      },
                      {
                        "Name": "upSpeed",
                        "Type": "Button",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Increase speed\""
                          },
                          {
                            "name": "OnClick",
                            "value": "if (currentSpeed < 3) {currentSpeed = currentSpeed + 1}"
                          },
                          {
                            "name": "Background",
                            "value": "\"#b4f9c1\""
                          }
                        ]
                      },
                      {
                        "Name": "songChoice",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Song choice = \""
                          }
                        ]
                      },
                      {
                        "Name": "songList",
                        "Type": "ComboBox",
                        "Properties": [
                          {
                            "name": "Options",
                            "value": "songs"
                          },
                          {
                            "name": "OnChange",
                            "value": "%_initialize%"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "controlPanel",
                    "Type": "Panel",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "CSS",
                        "value": "{\"display\":\"block\"}"
                      },
                      {
                        "name": "BorderStyle",
                        "value": "\"solid\""
                      },
                      {
                        "name": "BorderColor",
                        "value": "\"Gray\""
                      },
                      {
                        "name": "BorderWidth",
                        "value": "1"
                      },
                      {
                        "name": "Width",
                        "value": "\"100%\""
                      }
                    ],
                    "Children": [
                      {
                        "Name": "control",
                        "Type": "Panel",
                        "Expanded": "true",
                        "Properties": [
                          {
                            "name": "Width",
                            "value": "\"100%\""
                          }
                        ],
                        "Children": [
                          {
                            "Name": "executionPanel",
                            "Type": "Panel",
                            "Expanded": "true",
                            "Properties": [],
                            "Children": [
                              {
                                "Name": "runPauseButton",
                                "Type": "TwoStateButton",
                                "Properties": [
                                  {
                                    "name": "OffClick",
                                    "value": "%_pause%"
                                  },
                                  {
                                    "name": "State",
                                    "value": "_isPaused"
                                  },
                                  {
                                    "name": "Tooltip",
                                    "value": "\"Play/Pause\""
                                  },
                                  {
                                    "name": "ImageOnUrl",
                                    "value": "\"/org/opensourcephysics/resources/controls/images/play.gif\""
                                  },
                                  {
                                    "name": "OnClick",
                                    "value": "%_play%"
                                  },
                                  {
                                    "name": "ImageOffUrl",
                                    "value": "\"/org/opensourcephysics/resources/controls/images/pause.gif\""
                                  }
                                ]
                              },
                              {
                                "Name": "resetButton",
                                "Type": "Button",
                                "Properties": [
                                  {
                                    "name": "Tooltip",
                                    "value": "\"Start again\""
                                  },
                                  {
                                    "name": "ImageUrl",
                                    "value": "\"/org/opensourcephysics/resources/controls/images/reset.gif\""
                                  },
                                  {
                                    "name": "OnClick",
                                    "value": "%_initialize%"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "plottingPanel",
                    "Type": "PlottingPanel",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Width",
                        "value": "\"100%\""
                      },
                      {
                        "name": "Enabled",
                        "value": "true"
                      },
                      {
                        "name": "Height",
                        "value": "\"40vh\""
                      },
                      {
                        "name": "MinimumX",
                        "value": "0"
                      },
                      {
                        "name": "MaximumX",
                        "value": "8"
                      },
                      {
                        "name": "MinimumY",
                        "value": "0"
                      },
                      {
                        "name": "MaximumY",
                        "value": "maxY"
                      },
                      {
                        "name": "Gutters",
                        "value": "[0,0,0,0]"
                      },
                      {
                        "name": "YTickStep",
                        "value": "1"
                      },
                      {
                        "name": "XFixedTick",
                        "value": "0"
                      },
                      {
                        "name": "YFixedTick",
                        "value": "0"
                      },
                      {
                        "name": "XTicks",
                        "value": "8"
                      },
                      {
                        "name": "ScaleXType",
                        "value": "\"SCALE_NUM\""
                      },
                      {
                        "name": "XTickStep",
                        "value": "1"
                      },
                      {
                        "name": "XAutoTicks",
                        "value": "false"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "musicSheet",
                        "Type": "ShapeSet2D",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "songArray"
                          },
                          {
                            "name": "Y",
                            "value": "y"
                          },
                          {
                            "name": "SizeX",
                            "value": "0.8"
                          },
                          {
                            "name": "SizeY",
                            "value": "0.2"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"ROUND_RECTANGLE\""
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          },
                          {
                            "name": "FillColor",
                            "value": "\"Pink\""
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          }
                        ]
                      },
                      {
                        "Name": "popup",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "x.length/2"
                          },
                          {
                            "name": "SizeY",
                            "value": "maxY/2"
                          },
                          {
                            "name": "X",
                            "value": "x.length/2"
                          },
                          {
                            "name": "Y",
                            "value": "maxY/2"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"ROUND_RECTANGLE\""
                          },
                          {
                            "name": "FillColor",
                            "value": "\"#9feef9\""
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"Black\""
                          },
                          {
                            "name": "Visibility",
                            "value": "currentIndex == y.length-1 && y[currentIndex] < -1"
                          }
                        ]
                      },
                      {
                        "Name": "popupText",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"score = \"+score+\" out of \"+songArray.length"
                          },
                          {
                            "name": "X",
                            "value": "x.length/2"
                          },
                          {
                            "name": "Y",
                            "value": "maxY/2"
                          },
                          {
                            "name": "Visibility",
                            "value": "currentIndex == y.length-1 && y[currentIndex] < -1"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "narrativePanel",
                "Type": "Panel",
                "Properties": []
              }
            ]
          },
          {
            "Name": "resonatorBell",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [],
            "Children": [
              {
                "Name": "C",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"C\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"red\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio1.play()\n\nif (Math.abs(y[currentIndex]) <= tolerance) {\nscore = score + 1;\n            } else {\nscore = score;\n            }"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio1.pause()"
                  }
                ]
              },
              {
                "Name": "D",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"D\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"orange\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio2.play()\nif (Math.abs(y[currentIndex]) <= tolerance) {\nscore = score + 1;\n            } else {\nscore = score;\n            }"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio2.pause()"
                  }
                ]
              },
              {
                "Name": "E",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"E\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"yellow\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio3.play()\n\nif (Math.abs(y[currentIndex]) <= tolerance) {\nscore = score + 1;\n            } else {\nscore = score;\n            }"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio3.pause()"
                  }
                ]
              },
              {
                "Name": "F",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"F\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"#78ff66\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio4.play()"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio4.pause()"
                  }
                ]
              },
              {
                "Name": "G",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"G\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"teal\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio5.play()"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio5.pause()"
                  }
                ]
              },
              {
                "Name": "A",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"A\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"Blue\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio6.play()"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio6.pause()"
                  }
                ]
              },
              {
                "Name": "B",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"B\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"purple\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio7.play()"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio7.pause()"
                  }
                ]
              },
              {
                "Name": "C5",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"C\""
                  },
                  {
                    "name": "Width",
                    "value": "\"12.5%\""
                  },
                  {
                    "name": "Height",
                    "value": "\"30vh\""
                  },
                  {
                    "name": "Background",
                    "value": "\"red\""
                  },
                  {
                    "name": "OnPress",
                    "value": "audio8.play()"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal xx-large \\\"Times New Roman\\\", Times, serif\""
                  },
                  {
                    "name": "OnRelease",
                    "value": "audio8.pause()"
                  }
                ]
              },
              {
                "Name": "audio1",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-C.wav\""
                  }
                ]
              },
              {
                "Name": "audio2",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-D.wav\""
                  }
                ]
              },
              {
                "Name": "audio3",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-E.wav\""
                  }
                ]
              },
              {
                "Name": "audio4",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-F.wav\""
                  }
                ]
              },
              {
                "Name": "audio5",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-G.wav\""
                  }
                ]
              },
              {
                "Name": "audio6",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-A.wav\""
                  }
                ]
              },
              {
                "Name": "audio7",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-B.wav\""
                  }
                ]
              },
              {
                "Name": "audio8",
                "Type": "Audio",
                "Properties": [
                  {
                    "name": "AudioUrl",
                    "value": "\"./audio/xylo-C5.wav\""
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "RootProperties": []
  },
  "metadata": {
    "APP": "WebEJS",
    "CreatedWith": "WebEJS : the web version of Easy JavaScript Simulations",
    "MoreInfo": "1.0",
    "version": "https://t.um.es/webejs"
  }
}