Start with the quarter note

For a PPQ file at constant tempo, seconds = ticks ÷ PPQ × 60 ÷ quarter-note BPM. Read the resolution from the file rather than assuming a default.

Select a tempo marking in MuseScore Studio 4 and check its Properties. This is our four-bar sample score at 80 BPM.
Select a tempo marking in MuseScore Studio 4 and check its Properties. This is our four-bar sample score at 80 BPM.

Work through 480 PPQ

At 120 BPM, 240 ticks span 0.25 s. At 60 BPM they span 0.5 s. Split a range at every tempo change and add the durations of the individual sections.

Compare the two cases
480 PPQ at 120 BPM240 ticks ÷ 480 × 0.5 s = 0.25 s
480 PPQ at 60 BPM240 ticks ÷ 480 × 1 s = 0.5 s

Check the time division

This calculation applies to pulses per quarter note. A file using SMPTE time division describes time using frames and needs a different conversion.

Convert a span that crosses a tempo change

Take a 480 PPQ file where the first 480 ticks use 120 BPM and the next 480 use 90 BPM. The first quarter lasts 0.500 s and the second about 0.667 s. The total is about 1.167 s. Applying the opening tempo throughout would put the final attack roughly 0.167 s early.

Also establish whether the event list shows absolute ticks or deltas from the preceding event. Two successive deltas of 240 place the second event at absolute tick 480. Accumulate deltas first, then determine which tempo segment contains each event.

Convert the release as well as the attack

Consider a note starting at tick 240 and ending at 720 on the same tempo map. The start is 0.25 s. The release is 0.5 plus about 0.333, or 0.833 s. Subtract to obtain about 0.583 s of duration. Applying the onset tempo to all 480 ticks would shorten it.

Keep positions in seconds until converting final events to video frames. Rounding every small tick interval to a frame before summing it can accumulate a sizeable error over a long piece.

Can I copy raw tick positions between 480 and 960 PPQ files?

The same musical location has twice as many ticks at 960. Half a quarter note is 240 ticks at 480 PPQ and 480 ticks at 960 PPQ. Convert to a fraction of a quarter note first, then express that fraction at the new resolution.

References