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

LFO: document some things that trip up users #9197

Merged
merged 4 commits into from Apr 29, 2024

Conversation

jepler
Copy link
Member

@jepler jepler commented Apr 23, 2024

Closes: #9073

Closes: #9063

ping @kevinjwalters

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also await @kevinjwalters' comments.

shared-bindings/synthio/LFO.c Outdated Show resolved Hide resolved
//|
//| An LFO's output is not updated in any other way than when its associated
//| synthesizer updates it. For instance, if an LFO is created and its "first"
//| output is non-zero, its output is 0 until it is updated by its associated synthesizer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. did you mean if its first output is zero?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is unclear.

A reasonable expectation is that for offset=0, gain=1, the LFO would start with its "value" property equal to waveform[0]. But it doesn't, the its .value property is 0 until it is updated by actually generating samples for some synthesizer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll re-word this but probably not tonight.

jepler and others added 2 commits April 22, 2024 21:04
Co-authored-by: Dan Halbert <halbert@adafruit.com>
@jepler jepler requested a review from dhalbert April 23, 2024 12:56
dhalbert
dhalbert previously approved these changes Apr 23, 2024
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clear to me now, thanks!

@jepler
Copy link
Member Author

jepler commented Apr 23, 2024

changed sawtooth -> triangle in description of LFO once=False

@dhalbert
Copy link
Collaborator

@kevinjwalters How is this for you? Will merge if you find it fixes the explication.

@dhalbert
Copy link
Collaborator

Merging this now to get the clarifications in.

@dhalbert dhalbert merged commit 126a1a4 into adafruit:main Apr 29, 2024
374 checks passed
@kevinjwalters
Copy link

I've been away. Yes, just read through and it's clear, I like the use of an illustrated example.

I'd say the LFO in its current state isn't usable for certain cases. If this was analogue electronics it might be glitchy in an interesting way but it creates harsh transitions from value spurious value of 0.

@jepler jepler deleted the synthio-lfo-doc-improvements branch May 6, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants