             }
         }
 
-        MusicSequenceSetUserCallback(self.musicSequence, callBack, UnsafeMutablePointer<Void>(bridge(self)))
+        MusicSequenceSetUserCallback(self.musicSequence, callBack, unsafeBitCast(self, UnsafeMutablePointer<Void>.self))
         var musicTrack: MusicTrack = nil
         MusicSequenceGetIndTrack(self.musicSequence, 0, &musicTrack)
         let userData: UnsafeMutablePointer<MusicEventUserData> = UnsafeMutablePointer.alloc(1)

import AudioToolbox


let callBack: @convention(c) (UnsafeMutablePointer<Void>, MusicSequence, MusicTrack, MusicTimeStamp, UnsafePointer<MusicEventUserData>, MusicTimeStamp, MusicTimeStamp) -> Void = {
    (obj, seq, mt, timestamp, userData, timestamp2, timestamp3) in
    // Cタイプ関数なのでselfを使えません
    let mySelf: Sequencer = bridge(obj)
    for listener in mySelf.midiListeners {
        NSOperationQueue.mainQueue().addOperationWithBlock({
            listener.midiSequenceDidFinish()
        })
    }
}

public class Sequencer {

    var enableLooping = false
    
    var sequencer: AVAudioSequencer

        print("MIDI Notify, messageId= \(notification.messageID.rawValue)")
    }
    
}