The TimingInfo object contains timing information that describes the state of the host transport and the current musical tempo and meter. A TimingInfo object can be retrieved by calling GetTimingInfo().
TimingInfo properties
TimingInfo.playing: Uses Boolean logic where “true” means the host transport is running.
TimingInfo.blockStartBeat: A floating point number indicates the beat position at the start of the process block.
TimingInfo.blockEndBeat: A floating point number indicates the beat position at the end of the process block.
TimingInfo.blockLength: A floating point number indicates the length of the process block in beats.
TimingInfo.tempo: A floating point number indicates the host tempo.
TimingInfo.meterNumerator: An integer number indicates the host meter numerator.
TimingInfo.meterDenominator: An integer number indicates the host meter denominator.
TimingInfo.cycling: Uses Boolean logic where “true” means the host transport is cycling.
TimingInfo.leftCycleBeat: A floating point number indicates the beat position at the start of the cycle range.
TimingInfo.rightCycleBeat: A floating point number indicates the beat position at the end of the cycle range.
Note: The length of a beat is determined by the Logic Pro X time signature and tempo.
Type the following in the Script Editor window:
var NeedsTimingInfo = true;function ProcessMIDI() { var info = GetTimingInfo(); if (info.playing) Trace(info.blockStartBeat)}