Пример #1
0
 internal void CreateEvsFromMidi(clsFileStream filestream)
 {
     //* create evs from notemapmidi
     NoChords = true;
     Evs      = new List <clsEv>();
     for (int q = 0; q < P.F.MaxBBT.QI; q++)
     {
         clsNoteMapMidi notemapmidi = filestream.NoteMap;
         //if (q > 0 && notemapmidi[q] == notemapmidi[q - 1]) continue;
         if (q > 0 && notemapmidi.FullMapEquals(q, q - 1))
         {
             continue;
         }
         clsMTime.clsBBT bbt = new clsMTime.clsBBT(q * P.F.TicksPerQI);
         //clsEv ev = new clsEv(this, bbt, notemapmidi[q], null);
         clsEvPitch ev = new clsEvPitch(this, bbt, notemapmidi[q, false, true]); //unmodded
         ev.ChordQualifier = "";
         if (ev.Notes.Length == 0 && P.frmStart.chkIgnoreNullChords.Checked)
         {
             continue;                                              //null chord
         }
         if (Evs.Count > 0 && Evs[Evs.Count - 1].Notes.Length == 0) //previous ev was null
         {
             if (bbt.Ticks - Evs[Evs.Count - 1].OnTime <= Forms.frmSC.SyncopationDefault.Ticks)
             {
                 Evs.RemoveAt(Evs.Count - 1);
             }
         }
         if (Evs.Count > 0)
         {
             Evs[Evs.Count - 1].OffBBT = bbt;         //set offtime for previous line
         }
         Evs.Add(ev);
     }
     if (Evs.Count > 0)
     {
         SetLastEv();
     }
     SyncEvsToKeys();
     CalcRange();
 }
Пример #2
0
 internal clsW(clsNoteMapMidi notemapmidi)
 {
     NoteMapMidi = notemapmidi;
 }