public static PlayPositionSpecifier getPlayPosition()
        {
            var clock   = getCurrentClock();
            var timesig = mVsq.TimesigTable.getTimesigAt(clock);

            var result   = new PlayPositionSpecifier();
            int barCount = mVsq.TimesigTable.getBarCountFromClock(clock);

            int bar_top_clock  = mVsq.TimesigTable.getClockFromBarCount(barCount);
            int clock_per_beat = 480 / 4 * timesig.denominator;
            int beat           = (clock - bar_top_clock) / clock_per_beat;

            result.barCount    = barCount - mVsq.getPreMeasure() + 1;
            result.beat        = beat + 1;
            result.clock       = clock - bar_top_clock - clock_per_beat * beat;
            result.denominator = timesig.denominator;
            result.numerator   = timesig.numerator;
            result.tempo       = mVsq.getTempoAt(clock);

            return(result);
        }
Example #2
0
        public static PlayPositionSpecifier getPlayPosition()
        {
            var clock = getCurrentClock();
            var timesig = mVsq.TimesigTable.getTimesigAt( clock );

            var result = new PlayPositionSpecifier();
            int barCount = mVsq.TimesigTable.getBarCountFromClock( clock );

            int bar_top_clock = mVsq.TimesigTable.getClockFromBarCount( barCount );
            int clock_per_beat = 480 / 4 * timesig.denominator;
            int beat = (clock - bar_top_clock) / clock_per_beat;

            result.barCount = barCount - mVsq.getPreMeasure() + 1;
            result.beat = beat + 1;
            result.clock = clock - bar_top_clock - clock_per_beat * beat;
            result.denominator = timesig.denominator;
            result.numerator = timesig.numerator;
            result.tempo = mVsq.getTempoAt( clock );

            return result;
        }