/// <summary>
        /// It's an optional action before playing a midi file witk MPTK_Play.
        /// Useful to get information (duration, ...) before playing the Midi.
        /// </summary>
        private void GetMidiInfo()
        {
            MidiLoad midiloaded = midiFilePlayer.MPTK_Load();

            if (midiloaded != null)
            {
                infoMidi  = "Duration: " + midiloaded.MPTK_Duration.TotalSeconds + " seconds\n";
                infoMidi += "Tempo: " + midiloaded.MPTK_InitialTempo + "\n";
                List <MPTKEvent> listEvents = midiloaded.MPTK_ReadMidiEvents();
                infoMidi += "Count Midi Events: " + listEvents.Count + "\n";
                Debug.Log(infoMidi);
            }
        }
        /// <summary>
        /// It's an optional action before playing a midi file witk MPTK_Play.
        /// Useful to get information (duration, ...) before playing the Midi.
        /// </summary>
        private void GetMidiInfo()
        {
            MidiLoad midiloaded = midiFilePlayer.MPTK_Load();

            if (midiloaded != null)
            {
                infoMidi  = string.Format("Duration       : {0}\n", midiloaded.MPTK_Duration);
                infoMidi += string.Format("Real Duration: {0}\n", midiloaded.MPTK_RealDuration);
                infoMidi += "Tempo: " + Mathf.RoundToInt((float)midiloaded.MPTK_InitialTempo) + "\n";
                List <MPTKEvent> listEvents = midiloaded.MPTK_ReadMidiEvents();
                infoMidi += "Count Midi Events: " + listEvents.Count + "\n";
                //Debug.Log(infoMidi);
            }
        }