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

Can I sync the sequencer via MIDI clock and/or ableton link ? #62

Open
macramole opened this issue Mar 22, 2020 · 7 comments
Open

Can I sync the sequencer via MIDI clock and/or ableton link ? #62

macramole opened this issue Mar 22, 2020 · 7 comments

Comments

@macramole
Copy link
Contributor

If not, can you give me some insight on how this could be implemented ?

thanks

@npisanti
Copy link
Owner

npisanti commented Mar 22, 2020

hello! those feature are not yet available.

midi clock could be implemented but it won't be easy, probably the best option would be to make a class that process pdsp::midi::Input in a similar manner to the keyboard or pads class but it calculates the right playhead value for the audio buffer to process

ableton link should be implemented into a separate addon as the ableton link license (GPL) is incompatible with the ofxPDSP MIT license

@macramole
Copy link
Contributor Author

For the MIDI Clock, what if I make public and call SequencerProcessor::setPlayHead() for each MIDI Clock message ? Will it work ? Is it totally wrong ? Will something be out of sync ?

@npisanti
Copy link
Owner

i looked at the code again and probably it won't work that way, as it doesn't have memory of the old playhead, so skipping to a point could left you with unplayed events.

Adding midi clock input should need a rewrite of a good amount of ScoreProcessor

@macramole
Copy link
Contributor Author

hey man, thanks for the reply. I hope you and your loved ones are hanging in there fine with the pandemic and all.

you mean SequencerProcessor right ?

I'm trying to understand the problem.

What you are thinking is: if I change the playhead using setPlayHead() it won't be "instantaneous" since the process method runs in the audio thread so it will actually change only next time the engine call process. In this scenario we may have events occurring that shouldn't occur. Is this right ?

@npisanti
Copy link
Owner

luckily everyone is fine, i'm the south now and here the pandemic has been weaker.

What i mean it's this: when you set the playhead it simply changes the starting point for the next iteration for the audio thread. Then in the audio thread the next point of playhead it's calcolated and only the events between the actual playhead point and the next are triggered. So it could happen that by making the playhead jump with midi you accidentally move it in a way that some events are not triggered (midi clock is also a bit jittery)

@macramole
Copy link
Contributor Author

macramole commented Jul 6, 2020 via email

@npisanti
Copy link
Owner

npisanti commented Jul 6, 2020

ah yes, i was meaning south italy, here the lockdown is a bit loose and there are few cases, obviously we still have to wear masks in many places.

let me know if you need something =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants