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

RFC: Mozzi 2.0 part 3 - Miscellanious #210

Closed
7 of 15 tasks
tfry-git opened this issue Nov 13, 2023 · 0 comments
Closed
7 of 15 tasks

RFC: Mozzi 2.0 part 3 - Miscellanious #210

tfry-git opened this issue Nov 13, 2023 · 0 comments

Comments

@tfry-git
Copy link
Collaborator

tfry-git commented Nov 13, 2023

Here's just a list of smallish stuff that should probably be changed for a 2.0. Add your items in comments (assuming github won't let you edit this summary), and speak out if you disagree with any.

  • Instead of #include <MozziGuts.h>, let's make it #include <Mozzi.h>. The former could still be supported (with a warning), and in fact that could help detect sketches that still assume Mozzi 1.x. (possibly enable extra compatibility workarounds).
  • [ ] Remove control_rate_hz parameter from startMozzi(). That's controllable via CONTROL_RATE, already, and merely introduces ambiguity (plus a few unneeded bytes). (It made sense before config restructuring in Mozzi 2.0, in that for this particular value, setting it at the top of the sketch was actually possible). Does not actually save any flash.
  • Move CONTROL_RATE define up in sketches, for consistency with other config options.
  • Quite a bunch of (purely internal) #defines do not actually control code compilation, but are merely constants. It should be possible to replace these with consts without affecting code size. The advantage is that code will be cleaner, and the defines can then be hidden in a private namespace, for instance. Also they'll be implicitly documented as not user-modifiable. Of course, we should monitor for any unexpected code-size changes carefully, when doing this, so best to handle this as a separate step. (One of these is MOZZI_AUDIO_BIAS) -> not so easy to accomplish
  • There's a lot of duplicated information e.g. between README.md and API (but also within the API), and typically one or the other (or both) is partially outdated, already. We should try to avoid that. In particular, I think the specific hardware notes & config options will be most likely to remain up to date, when kept inside the API. The README should have direct links to that documentation, instead. -> in progress
  • Add auto-builds for more boards: Teensy and Renesas should be possible.
  • Add auto-builds for various configs. -> Globally, audio input is not yet compiled. Regarding port-specific options, I have no clear idea on how to integrate that into those into the auto-builds.
  • Move purely internal header files to "internal" (including all the MozziGuts implementations)
  • Update "learn" pages on gh-pages! -> in progress
  • Remove obsoleted "STEREO_HACK"
  • use of integer/void return value of updateAudio() should be disabled according to compatibility level
  • Automatic scaling for analog (and audio) input
  • Adjust arch-specific circuit instructions on the top of example sketches one way or another. Importantly advice such as connecting 0-5V to inputs, etc.
  • Revisit / decide how MozziPrivate-namespace should be declared (all in one block, or entering/leaving namespace per function) -> not necessarily actionable before Mozzi 2.0
  • Possibly: Make AudioOutputStorage_t depend on MOZZI_AUDIO_BITS (may need adjustments in Mono/StereoOutput among other things)
  • Update keywords.txt
@tfry-git tfry-git changed the title RFC: Mozzi 2.0 - part 3 - Miscellanious RFC: Mozzi 2.0 part 3 - Miscellanious Nov 13, 2023
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