     static let minNumberOfKeys = 12
     static let maxNumberOfKeys = 61
     
-    weak var delegate:GLNPianoViewDelegate?
     var keyDown = NSMutableArray(capacity:maxNumberOfKeys)
     var keyRects = NSMutableArray(capacity:maxNumberOfKeys)
     var keyLayers = NSMutableArray(capacity:maxNumberOfKeys)

                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)
                    }
                }

import UIKit
import QuartzCore

public protocol GLNPianoViewDelegate: class  {
    func pianoKeyUp(_ keyNumber:UInt8)
    func pianoKeyDown(_ keyNumber:UInt8)
}

@IBDesignable public class GLNPianoView : UIView {
