Beispiel #1
0
 public static void PlayTrackNext(MidiTrack p_track, MidiSource p_source)
 {
     for (int _notes = 0; _notes < p_track.getNumNotes(); _notes++)
     {
         PlayNext(p_track.getNote(_notes), p_source);
     }
 }
Beispiel #2
0
 public static void PlayNext(MidiMessage p_message, MidiSource p_source)
 {
     p_message.noteSource = p_source;
     messOutBuff.Add(p_message);
     if (p_message.getOwnerTrack() != null)
     {
         p_source.trackPPQAbsolutePos = p_message.getAbsTimeStamp(); //this sets write head for ppq
     }
 }
Beispiel #3
0
        public static void PlayTrack(MidiTrack p_track, MidiSource p_source)
        {
            p_source.trackPPQAbsolutePos = 0;
            long accumulatedTrackLenPPQ = 0;

            for (int _notes = 0; _notes < p_track.getNumNotes(); _notes++)
            {
                MidiMessage nextNote = p_track.getNote(_notes);
                PlayNext(nextNote, p_source);
                accumulatedTrackLenPPQ += nextNote.getPPQ();
            }
        }
Beispiel #4
0
 public static void PlayNext(MidiMessage p_message, MidiSource p_source)
 {
     if (Midi.debugLevel > 4)
     {
         Debug.Log("Add note to play " + p_message.getByteOne() + " " + p_message.getByteTwo() + " at time: " + p_message.getAbsTimeStamp());
     }
     p_message.noteSource = p_source;
     messOutBuff.Add(p_message);
     if (p_message.getOwnerTrack() != null)
     {
         p_source.setTrackPPQAbsolutePos(p_message.getAbsTimeStamp()); //this sets write head for ppq
     }
 }