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

Send playback position in samples to VST plug-ins #26663

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

fGadola
Copy link

@fGadola fGadola commented Feb 21, 2025

Resolves: #26577

The idea behind this PR is to report playback position in samples to VST plug-ins. I'm a plug-in developer, this PR is just to start the conversation, it's definitely not a final solution. Please feel free to comment on how we should go about this

@Eism Eism requested a review from RomanPudashkin February 21, 2025 21:21
cbjeukendrup and others added 11 commits February 22, 2025 00:03
Add missing forward declarations and #includes
Text fix: customisations -> customizations
This fix was OK.

Greetings,
Gootector
"Operator '?:' has lower precedence than '+'; '+' will be evaluated first"

Introduced by 6205752
…_on_vbox

Fix crash with page break on vertical frame
…gfix

Fix Clang warning and potential bug
Correct measure rest placement with courtesy time signature above stave
@@ -202,6 +203,10 @@ samples_t VstSynthesiser::process(float* buffer, samples_t samplesPerChannel)

const msecs_t nextMsecs = samplesToMsecs(samplesPerChannel, m_sampleRate);
const VstSequencer::EventSequenceMap sequences = m_sequencer.movePlaybackForward(nextMsecs);

// TODO: this is not a good way of doing this, please comment!
m_vstAudioClient->setPlaybackPosition(m_sequencer.playbackPosition());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add the playback position as an argument to VstAudioClient::process:

muse::audio::samples_t process(float* output, muse::audio::samples_t samplesPerChannel, muse::audio::msecs_t playbackPosition = 0);

That would be a little simpler

@RomanPudashkin
Copy link
Contributor

Thanks for your contribution! Please rebase your PR to keep only 1 commit

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

Successfully merging this pull request may close these issues.

Report playback position information to VST3 plug-ins
9 participants