internal static clsMTime.clsSegment GetStartSeg(eAlign align, int qilo, int qihi, int qiwidth, int ticksperqi) { clsMTime.clsSegment startseg; switch (align) { case eAlign.Bar: startseg = new clsMTime.clsSegBar(ticksperqi, qilo, qihi); break; case eAlign.Beat: startseg = new clsMTime.clsSegBeat(ticksperqi, qilo, qihi); break; case eAlign.HalfBar: startseg = new clsMTime.clsSegHalfBar(ticksperqi, qilo, qihi); break; case eAlign.Interval: startseg = new clsMTime.clsSegInterval(ticksperqi, qilo, qihi, qiwidth); break; default: LogicError.Throw(eLogicError.X067); startseg = new clsMTime.clsSegBeat(ticksperqi, qilo, qihi); break; } return(startseg); }
internal clsSegments(clsNoteMap notemap) { //CSVFileConv = csvfileconv; //int barnum = 1; //tmp debugging clsMTime.clsSegment startbar = new clsMTime.clsSegBar(P.F.TicksPerQI, 0, P.F.MaxBBT.QI); for (clsMTime.clsSegment bar = startbar; !bar.OOR; bar++) { //Debug.WriteLine("Bar: " + barnum++ // + " TicksLo: " + bar.SegQILo * P.F.TicksPerQI // + " TicksHi: " + bar.SegQIHi * P.F.TicksPerQI); //temp debugging int[] seg = new int[12]; for (int qi = bar.SegQILo; qi <= bar.SegQIHi; qi++) { notemap.CalcKeys_CalcSegQI(seg, qi, ref indEmpty); //CalcSegQI(notemap, seg, qi, indEmpty); } Segs.Add(seg); } }