-
Notifications
You must be signed in to change notification settings - Fork 13
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
Modern VCO - Reset - Phase Randomness #937
Comments
Hi @baconpaul , tried, but not always it reset at Phase 0. Than later I retry/retrigger, and that's the result: Than again, with this result: which are not "0". Can you check it out? That's the basic path: Thanks for any helps! Not sure I can "reopen it", can't see any button... |
Huh yeah that should work. And your pictures show it isn't! I reopened and will look. Thanks |
Not sure about your test. Maybe its related to what you said about 8 samples-delay? Can you trigger and record the wave? You will see the wave not starting always exacting at 0.0 value, such as: |
So I tested the phase is stable under retrigger which it is (and which is the guarantee) I will need to look closely as to when the trigger happens to figure out the starting point! |
Does the wave always have the same offset? I could also just have a silent phase shift in sine in modern. Modern is slightly delayed because of the algo. Does the sin oscillator do the same? |
Yeah OK I confirmed that with modern when I re-init I see the following as the first four samples.
With the sine oscillator I see this
I know exactly the reason for this. The modern OSC uses a trailing-two-samples derivative but this means the first output point from phase 0 is centered around -dphase, not around 0, so we get the last sample of the prior step. It's a fix over in surge land but I can fix it for 2.2 Nice. Super detailed fine. Thank you for the report. |
Dont' have time to do the git shenanigans right now but here's the patc
basically since Modern is lagged by one sample initiate the 0 phase one dphase ahead. Then my re-init looks like ethis
|
The modern 2-point DPW algorithm uses points at phase, phase-d and phase -2d to calculate. This has the defacto one-sample latency effect (at the oversample sample rate). This doesn't matter *except* in the retrigger-from-zero case when that shift makes the first output point at the wrong phase. So in retrigger, intiialize phase to dphase, not to 0, so you can hit the zero point for symmetric waveforms exactly. Addresses surge-synthesizer/surge-rack#937
The modern 2-point DPW algorithm uses points at phase, phase-d and phase -2d to calculate. This has the defacto one-sample latency effect (at the oversample sample rate). This doesn't matter *except* in the retrigger-from-zero case when that shift makes the first output point at the wrong phase. So in retrigger, intiialize phase to dphase, not to 0, so you can hit the zero point for symmetric waveforms exactly. Addresses surge-synthesizer/surge-rack#937
Thanks! So i'll wait 2.2 for testing it :) |
You can test it with the nightly in about an hour. I just merged the fix. https://github.com/surge-synthesizer/surge-rack/releases/tag/Nightly takes about an hour to update after a merge |
@baconpaul question: would be "huge" implement a slider here: to set the desidered phase? So a (min value = random) to [0, 360]°? This way, the user can decide at which phase start the osc without impact the GUI, which would be of course more heavy as implementation, even if... :P I can open a new Issue as "change request" if that's would be possible and not so impactful :) |
That is a request we have had open in surge for 6 years and have been unable to do basically. We will probably get to it next year. Don’t ask why. And it’s not an unreasonable request. Just it is a silly amount of plumbing and runs into a ui problem in the vst and stuff |
I see. Thanks, can't wait for this :) |
Finally got it updated on library, manually. Works like a charm, thanks. Not this way for example: https://www.keithmcmillen.com/wp-content/uploads/2015/06/sync.png Is this intentionally or a bug? In the latter case, I can open a issue :) Thanks for a clarification. |
That is intentional. Surge clsssic does it that way for some reason so we kept it. |
I see, thanks :) Just curious, may I ask why? In short, which were the reasons about this design? Its uncommon, isn't? |
I don't think anyone could answer that other than Claes (the original Surge author). Perhaps he just liked it that way. 🙃 |
Hi,
I was trying the reset input on Modern VCO (basically, Sine Wave for now), linked to a basic gate triggered by Key:
But every time I feed a gate (i.e. press a key), the signal restart at different phase. Shouldn't be restart at the same phase position? Otherwise it will introduce lots of randomness.
Can you check and fix please?
Thanks
The text was updated successfully, but these errors were encountered: