     }
 
     override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
-        // when user touches a button, turn it light blue
-
         for touch in touches {
             let location = touch.locationInNode(self)
 


            for node in nodes {
                if let name = node.name {
                    if name.containsString("noteButton") {
                        // if it's a noteButton....

                        handleNoteEnd(name)
                        let spriteNode = node as! SKSpriteNode
                        let newImageName = name.stringByReplacingOccurrencesOfString("_active", withString: "")
                        spriteNode.texture = SKTexture(imageNamed: newImageName)
                    } else if name.containsString("topButton") {
                        let spriteNode = node as! SKSpriteNode
                        let changeColorAction = SKAction.colorizeWithColor(minimalPurple, colorBlendFactor: 1.0, duration: 0)

                        spriteNode.runAction(changeColorAction) {
                            spriteNode.color = self.minimalPurple
                        }

                        if name == "topButtonSharp" {
                            sharpButtonActive = 0
                        } else if name == "topButtonFlat" {
                            flatButtonActive = 0
                        }
                    } else if name.containsString("flatImage") {
                        let spriteNode = node as! SKSpriteNode
                        spriteNode.texture = SKTexture(imageNamed: "flatImage")
                    } else if name.containsString("sharpImage") {
                        let spriteNode = node as! SKSpriteNode
                        spriteNode.texture = SKTexture(imageNamed: "sharpImage")
                    }

                    /*if name.containsString("_active") {
                        let spriteNode = node as! SKSpriteNode
                        let newName = name.stringByReplacingOccurrencesOfString("_active", withString: "")
                        spriteNode.texture = SKTexture(imageNamed: newName)
                        node.name = newName
                    }*/

                    pendingNoteCode = getCurrentNoteCode()
                    pendingUpdate = true


            for node in nodes {
                if let name = node.name {
                    if  name == "buttonOneImage" ||
                        name == "buttonTwoImage" ||
                        name == "buttonThreeImage" {

                        AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
                        
                        handleNoteStart(name)
                        let spriteNode = node as! SKSpriteNode
                        let newImageName = name + "_active"
                        spriteNode.texture = SKTexture(imageNamed: newImageName)
                    } else if name.containsString("flatImage") {
                        flatButtonActive = 1
                        let spriteNode = node as! SKSpriteNode
                        spriteNode.texture = SKTexture(imageNamed: "flatImage_active")
                    } else if name.containsString("sharpImage") {
                        sharpButtonActive = 1
                        let spriteNode = node as! SKSpriteNode
                        spriteNode.texture = SKTexture(imageNamed: "sharpImage_active")
                    }
