Author Topic: start phase of an operator  (Read 6918 times)

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
start phase of an operator
« on: December 01, 2019, 05:05:35 PM »

Is there a way to modulate the starting phase of an operator?


I thought about maybe using an envelope to modulate the pitch of the operator slightly to cause a phase shift.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: start phase of an operator
« Reply #1 on: December 01, 2019, 05:33:04 PM »

The starting phase of operators cannot be modulated.
It is set to a quarter of the period, so that it starts when the sinusoid  value is 1, to allow faster attack.
See the '* 0.25' here
https://github.com/Ixox/preenfm2/blob/master/src/synth/Osc.cpp?ts=4#L178

I don't understand your second sentence.

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
Re: start phase of an operator
« Reply #2 on: December 01, 2019, 05:52:25 PM »
Thank you.

I could be clearer on my second sentence.

Let's assume two sin waves are at the same phase, 𝜙0, at 𝑡=0  and you change the frequency of one of them at exactly that time, for example by 1 HZ, my understanding is that the phase difference between them is a function of time and the difference between the two frequencies. 𝜓(𝑡)=𝜙1(𝑡)−𝜙2(𝑡)=2𝜋(𝑓1−𝑓2)𝑡

So, I had wanted to sort of fake PWM by overlaying two saw waves, one positive, one negative at different phases to make a pulse wave when the two waveforms are offset at like 90 degrees (a 25% pulse wave) or more. And I was thinking that using a pitch envelope to modulate the pitch of the second operator to make a pseudo PWM.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: start phase of an operator
« Reply #3 on: December 01, 2019, 06:28:27 PM »

Still a bit confusing  :o
But if what you're after is to modulate the starting phase of operator wave, you won't have that.
Modifying the pitch/frequency of each operator can be done in the matrix. But i think you know that ;)