-
Notifications
You must be signed in to change notification settings - Fork 166
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
Hard-sync of two oscillators #2448
Comments
One idea discussed in TPAC: |
related: Phase-offset of oscillator nodes |
Would be really helpful for custom synths. Last summer started adding wavetable synthesis to p5.sound, but stopped when it became impossible to constantly sync two custom PeriodicWave oscillators (hard-panned left / right) when sending to an oscilloscope in X-Y mode for vector display fun. Interesting to learn this is an issue that went beyond a library's implementation. Not sure if minim's oscil offers some insights – even though it's Java/Processing based... could always sync oscillators there. |
We're having a hard time speccing this. There is no concept of gate/trigger/bang in the Web Audio API, that could signal the end of a period, and trigger a phase reset. If we have a |
A prototype can be made in the following way:
|
FWIW, I had a prototype of the |
was the intention here to allow arbitrary phasor waveforms using said "pure" oscillators? which could for instance describe linear phase increments not exactly matching a set of full cycles, ergo a "sync"?
the approach outlined in the paper works well for square and sawtooth waves (and the hard-synced variant). not as much for arbitrary waveforms (as stated by authors, and from personal experience). edit: so, not entirely clear to me how this would work |
Describe the feature
The phase of oscillator 2 is set to zero (typically, but could be some other phase) when the phase of oscillator 1 reaches zero (typically; or some other value).
For background, Oscillator sync on Wikipedia.
Called for at WAC16 (and other times):
Split out from Phase-offset of oscillator nodes.
Is there a prototype?
If you have a prototype (possibly using an AudioWorkletNode), provide links to illustrate this addition. This is the best way to propose a new feature.
Describe the feature in more detail
There are two types of oscillator synchronization in common use. Hard sync usually sets the phase of one oscillator to zero when a second oscillator has a phase of zero (other phase values could be used, but zero is easy in hardware). Soft sync (also called reversing sync) reverses the direction of one oscillator when the phase of another oscillator reaches zero (or some other value).
While this is easy to do in hardware (discharge the integration capacitor) and in non-bandlimited oscillators, the sudden level transition would make a hard transient so the resulting waveform is no longer bandlimited. However, seeHard Sync Without Aliasing
@hoch said
The text was updated successfully, but these errors were encountered: