MOZZI

sound synthesis library for Arduino

Frequently Asked Questions

1. Everything sounds glitchy, including the examples.
2. Everything sounds too quiet.
3. My patch was working and now it sounds horrible!
4. How can I optimise my code to get the most out of Mozzi?
5. How can I extend Mozzi?
6. Can I contribute developments? How?


Everything sounds glitchy, including the examples.

Maybe you’re listening to a STANDARD or STANDARD_PLUS sketch, but AUDIO_MODE is set to HIFI. Check the file Mozzi/mozzi_config.h. Look for:

1
2
3
//#define AUDIO_MODE STANDARD
#define AUDIO_MODE STANDARD_PLUS
//#define AUDIO_MODE HIFI

For STANDARD_PLUS mode, the lines should appear as above, with the STANDARD and HIFI lines commented out. Most of the examples work in STANDARD_PLUS mode, unless they say otherwise.


Everything sounds too quiet.

Check if you’re listening to a HIFI sketch in STANDARD or STANDARD_PLUS mode. See the previous answer.


My patch was working and now it sounds horrible!

  • Has the AUDIO_MODE changed in Mozzi/mozzi_config.h?
  • Is the processor having trouble keeping up with the amount of calculations it’s doing?
  • Has a signed or unsigned variable been cast to the wrong sign?
  • Is there a data type overflowing somewhere?
  • Are there Serial.print() statements slowing things down?

How can I optimise my code to get the most out of Mozzi?

Read this: Atmel AVR4027: Tips and Tricks to Optimize. Your C Code for 8-bit AVR Microcontrollers.
And there are a few hints here on the Mozzi site.


How can I extend Mozzi?

It’s easy! I usually copy the simplest class.h file I can find in the Mozzi folder and base the next thing on that. Usually it’ll have a next() method, maybe a couple of set() methods and whetever else you decide on. It might make use of AUDIO_RATE or CONTROL_RATE. It seems self-explanatory to me, but then I haven’t ever explained it to anyone.


Can I contribute developments? How?

Fork Mozzi on GitHub, and your changes will become part of the “development graph”, or just post to the users’ list.


To be continued…