Skip to content
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

Various Tone.LFO issues #1220

Open
tmhglnd opened this issue Dec 10, 2023 · 0 comments
Open

Various Tone.LFO issues #1220

tmhglnd opened this issue Dec 10, 2023 · 0 comments

Comments

@tmhglnd
Copy link

tmhglnd commented Dec 10, 2023

Hi!

I'm using Tone.LFO() to modulate amplitude of a synth. When I use the sinewave at for example quarter notes, the frequency is correct, but the waveshape is not in sync (the phase is wrong, it looks about 90º off). I've tried setting the phase = 90 but this results in unexpected behaviour (please see the image below from a scope view in Max, looking at the sound coming directly from the browser via Loopback, the right output is a hihat sample using Tone.Loop() at quarter notes, the left is a synth with Tone.LFO() also at quarter notes). Because I think changing the phase actually doesn't wrap the phase so I lose a part from the waveform (see images below).

Screenshot 2023-12-10 at 14 29 20

Phase moved by phase = 90:

Screenshot 2023-12-10 at 14 47 07

Phase moved by phase = -90:

Screenshot 2023-12-10 at 14 48 18

When I change the LFO to use a squarewave with this._lfo.set({ type: 'square' }); the phase is actually correct! But the squarewave has another issue, it is not completely silence (so it's not going from 0 to 1) resulting in the synth still sounding a bit softly in the middle parts.

Screenshot 2023-12-10 at 14 35 56

Using a sawtooth LFO the phase is again off, but this time it looks to be off by 180º

Screenshot 2023-12-10 at 14 38 36

Is there anything that can be done to fix these phase offsetting issues? It would be great if the phases would be the same for every wavetype that can be selected. And if the squarewave can be silenced in the middle part. Thanks in advance for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant