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

Wrap vs. levels in sample data #7

Open
jrudolph opened this issue Nov 5, 2021 · 0 comments
Open

Wrap vs. levels in sample data #7

jrudolph opened this issue Nov 5, 2021 · 0 comments

Comments

@jrudolph
Copy link

jrudolph commented Nov 5, 2021

Thanks a lot for sharing this project!

You set the PWM wrap to 250 but amplitude levels in e.g. sample.h go up to 256, doesn't that mean that you slightly amplify the sound (by 256/250) and then clip the loudest parts of the waveform?

See this chart for the specs:

image

IIUC
wrap = top counter level = 250
level = end of duty cycle

so, that for all values >= 250 you get a full duty cycle / voltage.

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