حول
Arduino Audio Synthesis Library for ESP8266, ESP32, Pi Pico and Teensy 4
التصميم والوسائطالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلM16
Arduino Audio Library for ESP8266, ESP32, RP2040/RP2350, and Teensy 4
M16 is a 16-bit audio synthesis library for microprocessors and I2S audio DACs/ADCs.
Always include M16.h in your sketch and add an audioUpdate() function that ends with audioBlockWrite(leftVal, rightVal).
Default output connections to I2S DAC boards are:
ESP8266 - GPIO 15 -> BCLK, GPIO 3 (RX) -> DOUT, and GPIO 2 -> LRCLK (WS) (no i2s Input support)
ESP32 - GPIO 38 -> BCLK, GPIO 39 -> LRCLK (WS), GPIO 40 -> DOUT, and GPIO 18 -> DIN
Pi Pico 2 - GPIO 16 -> BCLK, GPIO 17 → LRCLK (WS; always BCLK + 1), GPIO 18 -> DOUT, and GPIO 19 -> DIN
Teensy 4 - PIN 21 -> BCLK, PIN 20 -> LRCLK (WS), PIN 7 -> DOUT, and PIN 8 -> DIN
I2S audio input on the Pico and Teensy requires calling audioInputStart(), and the Pico uses separate clocks: BCLK GPIO 20 and WS GPIO 21 by default.
Some I2S DAC boards often require other terminals to be grounded.
The seti2sPins(BCK, WS, DOUT, DIN) function can be used on ESP32 and Pi Pico to redefine the pins. On the ESP32, the value of -1 for DIN disables audio input.
ESP32 defaults to one deterministic audio task on a dedicated core, leaving the other core available for loop(), controls, MIDI, USB, and UI work. Independent polyphonic voice arrays can explicitly enable dual-core rendering on ESP32 and Pi Pico with setIsDualCore(true) and must partition their voice loop with audioPartitionOffset() and audioPartitionStride().
Generic I2S microphones need no codec driver. The Teensy Audio Board additionally requires its SGTL5000
control object to be enabled and its line or microphone input selected. Teensy I2S input is enabled on demand with audioInputStart(). It uses the PJRC Audio pin routing: DIN 8, LRCLK 20, BCLK 21, and MCLK 23 when required.
Mic::nextLeft(), nextRight(), or nextStereo(left, right) read the captured input.
M16 prioritises audio processing and may not play well with other libraries where timing is critical, such as wifi, and file i/o.
API documentation is in the M16 Wiki.
Designed for use with the Arduino IDE. ESP32 requires board manager version 3 of 4.
M16 is inspired by the 8-bit Mozzi audio library by Tim Barrass 2012
It is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…