Can't perform a phase rotation using Maximilian library (maxiOsc::phaseReset)

Hello, I am using the Maximilian library and I am having some issues performing a phase rotation on an oscillator object. I use the phaseReset member function from the maxiOsc class. The osc works fine until I input a value (any between 0. and 1.) through the phaseReset function. What I get in result is silence and some short glitches when I change the phase value in real time. If someone can help me to understand what I am not getting I’d be very grateful, I’m stuck.
All I want to do is a phase rotation, namely shifting the phase of the wave being played.
Thanks in advance.

maybe it has something to do with how you use the phase reset method. we’d have to see your code to know that, but i could imagine the following scenarios:

  • constantly resetting the phase, which would make the oscillator stop oscillating

  • attempting to constantly set the phase to a relative position to another oscillator’s phase without using the other oscillator’s phase in that equation

Hello, I’m also trying to parameter the phase of an osc from the dsp::Oscillator class. Did you find a solution?

Regards
Alexandre

Not yet, I am focusing on other aspects of my project but I’ll have to face that at same point :joy: :woozy_face: One post that I will go back to is this one:

hopefully it can be of some help…

Hello, so I modified the juce_Oscillator.h to add a phase setter to the dsp::oscillator class, it works but there is strong glitch because of the reset (needed if you want the right phase value). To avoid reset it would be needed a current phase value getter to calculate the new phase increment.

/** Sets the phase of the oscillator. */
void setPhase (float newPhase, bool force = false) noexcept
{
	phase.reset();
	phase.advance(newPhase); //0;+pi
}

Add an all-pass filter could also be an efficient trick if well done.