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

Start running Granular Pitch Shifter upon initialization and sample rate change #7356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LostRobotMusic
Copy link
Contributor

Deals with something mentioned in the comments in #7354. This isn't a bug fix, it just brings things closer to the desired behavior.
It takes a bit of time for this pitch shifter to "warm up" and get all of its grains spawned (as is the nature of all granular audio processing), so it's best to start flushing some audio through immediately upon plugin initialization or sample rate change.

@LostRobotMusic LostRobotMusic changed the title Start running Granular Pitch Shifter upon initialization Start running Granular Pitch Shifter upon initialization and sample rate change Jun 27, 2024
@@ -281,6 +281,9 @@ void GranularPitchShifterEffect::changeSampleRate()
m_truePitch[1] = pitch + pitchSpread;
m_speed[0] = std::exp2(m_truePitch[0]);
m_speed[1] = std::exp2(m_truePitch[1]);

// "warm up" the plugin by spawning in all of the grains immediately
startRunning();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this was mentioned in Discord, but we want to move to a behavior where the effects are started regardless of if there's input or not right? Maybe a TODO comment explaining that we should remove this later if that's the case.

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.

None yet

2 participants