Example #1
0
        IEnumerable <GuitarTimeSignature> GetTimeSignaturesFromTrack(GuitarMessageList owner, Track tempoTrack)
        {
            var ret = new List <GuitarTimeSignature>();

            if (tempoTrack != null && tempoTrack.TimeSig.Any())
            {
                ret.AddRange(tempoTrack.TimeSig.Select(t => new GuitarTimeSignature(owner, t)));
            }
            else
            {
                ret.Add(GuitarTimeSignature.GetDefaultTimeSignature(owner));
            }
            return(ret);
        }
        public static GuitarTimeSignature GetTimeSignature(GuitarMessageList owner,
                                                           int startTick                       = 0,
                                                           int numerator                       = 4,
                                                           int denominator                     = 4,
                                                           int clocksPerMetronomeClick         = 24,
                                                           int thirtySecondNotesPerQuarterNote = 8)
        {
            var ret = new GuitarTimeSignature(owner, null);

            ret.Numerator                       = numerator;
            ret.Denominator                     = denominator;
            ret.ClocksPerMetronomeClick         = clocksPerMetronomeClick;
            ret.ThirtySecondNotesPerQuarterNote = thirtySecondNotesPerQuarterNote;
            ret.SetDownTick(startTick);

            return(ret);
        }
 public TimeUnit GetTimeUnitFromTimeSignature(GuitarTimeSignature timeSig)
 {
     return (TimeUnit)(128.0 / timeSig.Denominator);
 }
 public TimeUnit GetTimeUnitFromTimeSignature(GuitarTimeSignature timeSig)
 {
     return((TimeUnit)(128.0 / timeSig.Denominator));
 }
        public static GuitarTimeSignature GetTimeSignature(GuitarMessageList owner,
            int startTick = 0,
            int numerator = 4,
            int denominator = 4,
            int clocksPerMetronomeClick = 24,
            int thirtySecondNotesPerQuarterNote = 8)
        {
            var ret = new GuitarTimeSignature(owner, null);
            ret.Numerator = numerator;
            ret.Denominator = denominator;
            ret.ClocksPerMetronomeClick = clocksPerMetronomeClick;
            ret.ThirtySecondNotesPerQuarterNote = thirtySecondNotesPerQuarterNote;
            ret.SetDownTick(startTick);

            return ret;
        }