version working with audio output on CP2102 ESP32-DevKitC-32

This commit is contained in:
Miller Puckette 2024-10-16 09:48:44 -05:00
parent 445c87ffca
commit 98f2a5beb9
8 changed files with 450 additions and 3019 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ build
dependencies.lock
managed_components
main/locale.h
sdkconfig

View file

@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.5)
# for LyraT boards uncomment this line and use "esp_adf" instead of "esp_idf":
#
include($ENV{ADF_PATH}/CMakeLists.txt)
# include($ENV{ADF_PATH}/CMakeLists.txt)
#
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

View file

@ -1,10 +1,13 @@
This is a very sketchy description of the "espd" version of Pd, which runs on
Espressif ESP32 bords, eoither generic ones (where you have to add your own
Espressif ESP32 bords, either generic ones (where you have to add your own
audio hardware) or LyraT or LyraT-mini boards (with built-in audio). To use
these you will almost certainly have to compile your own version, at least
either to include your own patch or to specify the WIFI settings in the file
main/espd.h .
The generic version can be used with INMP441 microphone and/or MAX98357A
DSc/amplifier. The SPH0645 mic is known NOT TO WORK with ESP32s.
The instructions here work for me on linux; they _should_ work on macintoshes
and PCs with appropriate changes (in the shell commands for instance).
@ -20,7 +23,7 @@ default). When the board is booted it will connect to that port. When you get
the connection, you can load a test patch on the esp, by sending the message "pd
begin-new poodle .", then the contents of the patch, then "pd end-new" .
Whether you do this or rely on a pre-compiled patch, you can send messages to
any named object (such as a "receive") on the ESP32 board.
any named object (such as a "receive") on the ESP32 board
To send a patch over wifi, you must compile and load espd on the board, boot the
board, and then run a patch on the host computer that waits for the board to

View file

@ -183,7 +183,7 @@ static void initdacs( void)
.data_out_num = 32, /* Data out from ESP32, to DIN on 38357A */
.data_in_num = 35 /* data from ADC */
#endif
#if 0 /* generic board 2 */
#if 0 /* complex arts sensorboard */
.bck_io_num = 33, /* bit clock */
.ws_io_num = 25, /* Word select, aka left right clock */
.data_out_num = 32, /* Data out from ESP32, to DIN on 38357A */

View file

@ -2,10 +2,10 @@
#define PD_USE_WIFI /* messages to/from Pd over wifi TCP */
#define PD_USE_CONSOLE /* messages to Pd over "console" (USB serial) */
/* #define PD_INCLUDEPATCH */ /* load the patch defined in "testpatch.c" */
#define PD_LYRAT /* using LyraT or LyraT mini board */
/* #define PD_LYRAT */ /* using LyraT or LyraT mini board */
#define USEADC /* enable audio input (output always enabled) */
#define IOCHANS 1
#define OBSOLETEAPI 1
#define IOCHANS 2
#define OBSOLETEAPI 0
/* task priorities */
#define PRIORITY_WIFI 2

1964
sdkconfig

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
#N canvas 616 243 1262 545 12;
#N canvas 383 59 1262 545 12;
#X msg 373 294 listen 4498;
#X obj 374 331 netreceive -u -f;
#X listbox 481 365 26 0 0 0 - - - 0;
@ -50,7 +50,7 @@
#X obj 761 408 s bias;
#X floatatom 778 382 10 0 0 0 - - - 0;
#X obj 762 269 r int-bias;
#X msg 941 34 \; int-bias 223 \; amp 0 \; freq 0;
#X msg 899 31 \; int-bias 223 \; amp 0 \; freq 0;
#X msg 904 275 \; int-bias \$1 \; amp 0 \; freq 0;
#X msg 905 151 15;
#X msg 938 151 31;
@ -66,14 +66,14 @@
#X obj 857 145 + 255;
#X floatatom 858 117 5 0 0 0 - - - 0;
#X msg 1166 155 639;
#X msg 830 31 \; int-bias 255 \; amp 0 \; freq 0;
#X msg 788 28 \; int-bias 255 \; amp 0 \; freq 0;
#X msg 1134 153 510;
#X msg 94 246 send pd foo 0;
#X msg 81 296 send pd foo 2;
#X floatatom 1053 395 11 0 0 0 - - - 0;
#X obj 1053 446 s amp;
#X obj 1053 420 / 200;
#X msg 1058 36 \; amp 2 \; bias -1 \; freq 30;
#X msg 1016 33 \; amp 2 \; bias -1 \; freq 30;
#X obj 1014 241 bng 35 250 50 0 empty empty empty 0 -11 0 12 #fcfcfc #000000 #000000;
#X obj 921 397 r pat;
#X obj 110 425 r esp;
@ -81,6 +81,9 @@
#X obj 105 373 r seq;
#X msg 749 455 \; esp send p1 bang;
#X msg 752 494 \; esp send p2 bang;
#X msg 1184 35 \; amp 0 \; bias 0 \; freq 30;
#X obj 42 528 bng 21 250 50 0 empty empty empty 0 -11 0 12 #fcfcfc #000000 #000000;
#X msg 1090 33 \; amp 0.1 \; bias 0 \; freq 440;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 1 1 2 0;
@ -91,6 +94,7 @@
#X connect 7 0 14 0;
#X connect 8 0 14 0;
#X connect 10 0 11 0;
#X connect 11 0 83 0;
#X connect 13 0 14 0;
#X connect 14 0 10 0;
#X connect 14 1 9 0;