 }
 
 extension UnsafeMutableRawBufferPointer {
-    mutating
+    fileprivate mutating
     func copyBytes<S: Sequence>(from data: S) -> Int where S.Iterator.Element == UInt8 {
         var copied = 0
         for (i, byte) in data.enumerated() {

        return copied
    }

    init(packet : inout MIDIPacket) {
        self.init(start: &packet.data, count: 256)
    }
}

    }
}

extension MIDIEvent {
    @inline(__always)
    fileprivate init(packet p: inout MIDIPacket) {
        self = withUnsafeBytes(of: &p.data) {
            let data = Data(bytes: $0.baseAddress!, count : Int(p.length))
            return MIDIEvent(timestamp: p.timeStamp, data: data)
        }
    }
}

extension MIDIPacketList: Sequence {
    public typealias Element = MIDIEvent

