/// <summary> /// decrements the quantization to the next shorter beat value /// (for example, from 16h note to 32nd Note /// </summary> void DecreaseQuantizeDuration() { if (platformRhymicValue != Beat.TickValue.ThirtySecond) { platformRhymicValue = platformRhymicValue.Previous(); } }
/// <summary> /// increments the quantization to the next longer beat value /// (for example, from 32nd Note to 16th Note) /// </summary> void IncreaseQuantizeDuration() { if (platformRhymicValue != Beat.TickValue.Measure) { platformRhymicValue = platformRhymicValue.Next(); } }
double NextQuantizedInterval(Beat.TickValue quantInterval) { switch (quantInterval) { case TickValue.ThirtySecond: return(Clock.Instance.AtNextThirtySecond()); case TickValue.SixteenthTriplet: return(Clock.Instance.AtNextSixteenthTriplet()); case TickValue.Sixteenth: return(Clock.Instance.AtNextSixteenth()); case TickValue.EighthTriplet: return(Clock.Instance.AtNextEighthTriplet()); case TickValue.Eighth: return(Clock.Instance.AtNextEighth()); case TickValue.QuarterTriplet: return(Clock.Instance.AtNextQuarterTriplet()); case TickValue.Quarter: return(Clock.Instance.AtNextQuarter()); case TickValue.Half: return(Clock.Instance.AtNextHalf()); case TickValue.Measure: return(Clock.Instance.AtNextMeasure()); default: Debug.Log("Quantization rhythm not set; returning quarter note"); return(Clock.Instance.AtNextQuarter()); } }