Skip to content

Heavy compiler (hvcc) sources running on ESP32-DevKitC powered eurorack module

Notifications You must be signed in to change notification settings

sinneb/esp32-hvcc

Repository files navigation

ESP32-DevKitC & hvcc

This repo demonstrates a single file solution for running hvcc sources on the ESP32-devkitc, inspired by the Faust ESP32 architecture example. The hvcc compiler leverages the use of (a subset of) puredata operators on the cheap and fast esp32 uprocessor. The ESP32-devkitc combined with one PCM5102 CODEC, one WM8731 CODEC and an 8 port MCP3208 ADC provides a complete and available audio development platform with a very reasonable pricetag. UI provided via 4 buttons, 4 potentiometers and 4 leds.

Goal

The goal of this development is to realise a generic eurorack module that is based on the ESP32 and programmable via puredata. Each cheap module consists of four control voltage inputs and four audio / cv outputs (all io -5v -> +5v and fully eurorack compatible). All parts are easily obtainable and all software and hardware is open source, so ordering your own set of PCB's is also possible

Status

15-nov-2020: Replaced one of the PCM5102 with a WM8731 to have audio stereo line in over i2s

25-oct-2020: PCB design ready, gerbers generated and boards ordered.

18-oct-2020: Code cleanup and PCB design ongoing. Current schematic tested and working!

Installation

  • Install Espressif IoT Development Framework 4.1, the official development framework for ESP32.
  • Install the hvcc compiler
  • Clone this repo

Hardware setup

Check the Kicad schematics in the schematics folder

Usage

  • Create your puredata patch, using the supported objects only. Use tabread with a $0-array instead of the table object, seems to work better.
  • Issue a Issue a python2.7 hvcc.py input.pd -o ./heavy/ to generate the source files, where input.pd is your puredata patch
  • MAC: compile using hvcc and libs and copy to project subdir: python2.7 hvcc.py esp32_2.pd -p ./Hoclib/ ./Josephlarralde/ ./ParkinsonHashizume/ ./MikeMorenoAudio/ ./Heavylib -o ./heavy/ ; cp ./heavy/c/Heavy_heavy.* ~/Documents/GitHub/esp32-hvcc/main/heavy/
  • WIN: compile and copy: c:\Python27\python.exe rest as above, then a copy /Y heavy\c\Heavy_* c:\Users\Arthur\Github\esp32-hvcc\main\heavy
  • Add all heavy c and cpp sources to /main/CMakeLists.txt (only when adding new objects)
  • Run idf.py -p /dev/tty.SLAB_USBtoUART flash monitor to compile, upload and monitor the esp32 binary
  • MAC: idf.py -p /dev/cu.usbserial-1A14301 -b 921600 flash monitor
  • WIN: idf.py -p COM4 -b 921600 flash monitor
  • Enjoy your pd patch!

Performance

A large and nice sounding puredata patch from "manwithfeathers" on rebeltech.org named "Fascination IV" yields about 60% performance of the ESP32 which looks like a very nice performance / cost ratio!

Releases

No releases published

Packages

No packages published

Languages