Settings waveform modulated phase.

Status
Not open for further replies.

thedreiskre

Active member
I am trying to implement oscillator sync into my synth. The waveform class supports the phase(angle) function which would have been pretty essential but the waveformMod class doesn't seem to. Is there a way i could go about adding the phase(angle) function to the waveformMod class? It would also be really useful if there was a way of reading the current phase of a waveform, if that was possible could something like this work if it was in the program code?
if waveformA.readPhase() = 0, waveformB.phase(0)
 
The phase is modulated every sample from an AudioStream if you setup phaseModulation() - presumably that would
fight with calls to phase() so it is dropped in the AudioSynthWaveformModulated class. Can you provide the phase
as an AudioStream?
 
I dont think so, because phaseModulation is relative to the current phase I can't see a way of it being useful for setting an absolute phase value without knowing the current phase. Also, I am using the FM input for portamento, pitch bend and LFO modulation of the pitch.
 
I guess you'd need to add a method that exposes the current phase (plus latest modulation value), to read it, and
another method to write it, compensating for the latest modulation value.

I'd see if its as simple as subclassing the AudioSynthWaveformModulated class and adding those methods?
 
I'm quite new to c++, so I dont fully understand a lot of the code in waveformMod. I can't see a simple variable for the unmodulated phase, the only thing i was really able to identify was phasedata, which appears to store the current phase (including modulation). I don't really know how to go about compensating for the modulation value when reading or writing to it though. Thanks for all the help, but I think i might be a bit out of my depth here :)
 
Status
Not open for further replies.
Back
Top