Improve MIDI SPP accuracy

Forums

Unfortunately the MIDI SPP is only accurate on 1/16 positions. Qtractor's position have a much higher resolution. At the moment Qtractor rounds the SPP which leads to non-synchronized positions.

Based on my experiences with jack_midi_clock I propose the same or a similar approach:

When playback starts, then send immediately

  • MIDI CLOCK
  • MIDI SPP of a position in the future, e.g. the next but one beats or 1/8 or 1/16 position

When this position is reached then send

  • CONTINUE

Since SPP is no realtime message it's a robust solution to use the next but one beats (1/4) as the position in the future, e,g, when at 9.1.080 then choose 9.3.000.

Permalink

When playback starts, then send immediately

MIDI CLOCK

this is already being done,... or isn't?

MIDI SPP of a position in the future, e.g. the next but one beats or 1/8 or 1/16 position

When this position is reached then send

CONTINUE

ok, might work as you say, just not sure about the exact future position: what exactly should it be? +1 16th note (aka beat/4), right?

we'll test this over during the next sprint :)

until then, cheers

Yes, MIDI CLOCK is already sent immediately.

The minimum or „nearest“ future is the next 1/16, that's right.
But SPP is no realtime message, so it can't hurt to position to the next but one 1/16, the next but one 1/8 or even the next but one 1/4. I'd try the next but one 1/8.

This looks good and works with start and stop.

Can you do the same after rewind/ff when playback is active? That would be nearly perfect.

If you could do it even when wildly positioning the playhead when playback is active it would be perfect and make jack_midi_clock obsolete.

Yes, now there are only one two cases missing:
1.) When playback is active then it doesn't apply to "backward".
2.) When playback is active then it doesn't apply when the playhead is repositioned with middle mouseclick

Maybe this could be generalized/centralized in the Qtractor code:

Whenever the playhead is repositioned (mouse click, backward, end of rewind/ff):

  • Calculate the "position in the future" and store it
  • Send STOP
  • Send SPP with the "position in the future"

Whenever the playhead reaches this position:

  • Send CONTINUE

Can it be that simple? Maybe.

what then?

(Transport/) "Backward" is an imperative command, just like moving the play-head around, in any case... same as "Forward"... and quite a lot else... :/

you're telling me that moving the play-head around, while playback is rolling, anytime, is subject to this SPP hack? hold up your horses! sorry, that is a deep move and one that probably will let the hell loose...

might it better off leaving to other nuptials (so to speak ;)) ?

thanks (for the time being)...

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.