 /// the former.
 private let sizeOfMIDIPacketHeader = MemoryLayout<MIDITimeStamp>.size + MemoryLayout<UInt16>.size
 private let sizeOfMIDICombinedHeaders = sizeOfMIDIPacketListHeader + sizeOfMIDIPacketHeader
-
 
 internal extension Collection where Index == Int {
     var startIndex: Index {

    }
    /// Send Message with data
    public func sendMessage(_ data: [MIDIByte]) {
        
        // Create a buffer that is big enough to hold the data to be sent and
        // all the necessary headers.
        let bufferSize = data.count + sizeOfMIDICombinedHeaders
        
        // the discussion section of MIDIPacketListAdd states that "The maximum
        // size of a packet list is 65536 bytes." Checking for that limit here.
        if bufferSize > 65536 {

        }

        var buffer = Data(count: bufferSize)

        // Use Data (a.k.a NSData) to create a block where we have access to a
        // pointer where we can create the packetlist and send it. No need for
        // explicit alloc and dealloc.
        buffer.withUnsafeMutableBytes { (packetListPointer: UnsafeMutablePointer<MIDIPacketList>) -> Void in
            let packet = MIDIPacketListInit(packetListPointer)
            let nextPacket: UnsafeMutablePointer<MIDIPacket>? =
                MIDIPacketListAdd(packetListPointer, bufferSize, packet, 0, data.count, data)

            // I would prefer stronger error handling here, perhaps throwing
            // to force the app developer to handle the error.
