Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waveform jitter #13

Closed
crshrprt opened this issue Jan 31, 2024 · 13 comments
Closed

Waveform jitter #13

crshrprt opened this issue Jan 31, 2024 · 13 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@crshrprt
Copy link

In case it will be helpful for tracking down the problem with the waveform jitter here's a list of DAWs/host I tried on Linux when testing fixing-sync-other-daws branch.

I encountered jitter in:
Ardour 8.2
Carla 2.5.8
Bespoke Synth Nightly 611103f (initially it seemed not affected, but after a while it was noticeable)

@ardura ardura added the enhancement New feature or request label Jan 31, 2024
@ardura
Copy link
Owner

ardura commented Jan 31, 2024

Note to whoever works this (or myself for later) - this is probably related to different buffers used in different DAWs altering the timing so it might be easier to change the plugin to go sample-by-sample in processing rather than buffer by buffer. Either that or it is an issue in the nih-plug context.transport() stuff for calculating beat position based off the information the DAW gives the plugin.

@ardura
Copy link
Owner

ardura commented Feb 2, 2024

Still trying to figure this out. @crshrprt do you use any preroll setting in Ardour?

@crshrprt
Copy link
Author

crshrprt commented Feb 2, 2024

No preroll, it happens also in hosts without that feature.

@ardura
Copy link
Owner

ardura commented Feb 5, 2024

There's something weird with Ardour on Windows where the Beat displayed isn't the tracked beat from the timeline. I'm thinking this is either miscalculation from rounding errors or some sort of lag between the audio thread and the GUI thread. Even then there is still some jitter with the different solutions I've tried. So I have tried to minimize it where I can. I think we should leave this issue open, but I've updated the project with my changes so far.

@ardura
Copy link
Owner

ardura commented Feb 5, 2024

1cfbd8f has the latest changes lessening some of the jitter but it's still there unfortunately.

@ardura ardura added the help wanted Extra attention is needed label Feb 5, 2024
ardura added a commit that referenced this issue May 1, 2024
ardura added a commit that referenced this issue May 1, 2024
@ardura
Copy link
Owner

ardura commented May 1, 2024

Can you try the latest release build and see if the jitter got better for you?

@crshrprt
Copy link
Author

crshrprt commented May 2, 2024

In latest version jitter is better, waveform's start still moves in Ardour but it seems a bit more predictable:

Scrolloscope_Ardour.mp4

In BespokeSynth waveform's start is more stable. In both DAWs the bar synced view is "broken", only a a few ms buffer is displayed:

Scrolloscope_BespokeSynth.mp4

@ardura
Copy link
Owner

ardura commented May 2, 2024

Dang I was hoping that would have fixed it. I'll try and revisit this again soon. I thought of another alternative as well:
I'm wondering if I can try to track it manually too. Based off the sample rate and BPM reported to the plugin, I can start counting samples when the DAW reports it is playing vs stopped in its timeline, then calculate the amount of samples each beat or bar should be to redraw. I'll play with that iea if it's feasible too.

@ardura
Copy link
Owner

ardura commented May 5, 2024

Hey @crshrprt do you use a specific timeline sync in Ardour + your other hosts? I saw in the Ardour manual that MTC timeline control limits the frame rate and that could be part of the issue.

Do you use any external midi timing control or JACK?

@crshrprt
Copy link
Author

crshrprt commented May 6, 2024

In my tests in Ardour and BespokeSynth I used the internal transport, no external clock.
The same jitter in Ardour is noticeable also when using JACK as external transport master, there isn't much difference.

ardura added a commit that referenced this issue May 7, 2024
@ardura
Copy link
Owner

ardura commented May 7, 2024

Okay I think I got it fixed now, can you try with the latest release? I tested in Ardour and was able to get nicer beat sync happening :)

@ardura ardura self-assigned this May 7, 2024
@crshrprt
Copy link
Author

crshrprt commented May 7, 2024

Definitively is better now, and bar mode works too. :)

Scrolloscope_Ardour2.mp4

@ardura
Copy link
Owner

ardura commented May 7, 2024

Great news, I'll mark this as closed then. Thanks for the help testing and validating!

@ardura ardura closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants