     var keyCornerRadius:CGFloat = 0
     var whiteKeyCount = 0
     
+    public weak var delegate:GLNPianoViewDelegate?
+    
     
     override public init(frame: CGRect) {
         super.init(frame: frame)

                if let downState = keyDownState {
                    keyDown[i] = NSNumber(value: (downState as Bool))
                    if ((keyDownState) == true) {
                        delegate?.pianoKeyDown(i)
                        keyDown(i)
                    } else {
                        delegate?.pianoKeyUp(i)
                        keyUp(i)
                    }
                }

    static let minNumberOfKeys = 12
    static let maxNumberOfKeys = 61
    
    var keyDown = NSMutableArray(capacity:maxNumberOfKeys)
    var keyRects = NSMutableArray(capacity:maxNumberOfKeys)
    var keyLayers = NSMutableArray(capacity:maxNumberOfKeys)
