Mozzi  version v2.0
sound synthesis library for Arduino
Mozzi on Teensy 4.x boards.

port by Thomas Combriat

Note
For Teensy 3.x see Mozzi on Teensy 3.0/3.1/3.2/3.4/3.5/LC boards.

Port status and ussage notes

This port requires the following two libraries (which should be part of a default installtion, however):

Contrary to the Teensy 3, the Teensy 4 do not have any DAC. The output is done on pin A8 (PWM) by default (see below). twi_nonblock is not ported.

Output modes

The following audio modes (see MOZZI_AUDIO_MODE) are currently supported on this hardware:

  • MOZZI_OUTPUT_EXTERNAL_TIMED
  • MOZZI_OUTPUT_EXTERNAL_CUSTOM
  • MOZZI_OUTPUT_PWM

The default mode is MOZZI_OUTPUT_PWM .

MOZZI_OUTPUT_PWM

Output is to a GPIO pin (or two in stereo). The output resolution is fixed at 10 bits, and a 146484 kHz carrier frequency. The output pins can be configured as:

#define MOZZI_AUDIO_PIN_1 ... // Left / mono output pin. Default: A8
// For stereo, only:
#define MOZZI_AUDIO_PIN_2 ... // Right channel output pin. Default: A9

MOZZI_OUTPUT_EXTERNAL_TIMED and MOZZI_OUTPUT_EXTERNAL_CUSTOM

See External audio output