GrooveChip is an ESP-32 based sampler, an electronic musical instrument that can play back portions of sound recordings (samples).
Groovechip features:
- simultaneous playback of up to 8 samples (10 seconds per sample)
- high fidelity audio output via dedicated I2S peripherals
- 4 different playback modes: hold, oneshot, oneshot-loop, loop
- 2 lines I2C screen
- custom sample playback via SD
- custom-made sample manipulation and effects pipeline
- sensor-based effect parameters modification
- sample recording from previous samples
Here you can find the pinout map for the project, indicating which pin has to be used by which component.
.
├── CMakeFiles
│ └── pkgRedirects
├── CMakeLists.txt
├── components
│ ├── adc1 # ADC driver and settings
│ ├── effects # custom audio effects pipeline
│ ├── fsm # FSM to navigate in the menus
│ ├── i2s # I2S driver and settings
│ ├── joystick # joystick init and position methods
│ ├── lcd # I2C screen driver and methods
│ ├── mixer # multi source audio mixer and metronome
│ ├── pad_section # ISR and FSM/playback communication layer
│ ├── playback_mode # handle different sample playback modes
│ ├── potentiometer # potentiometer init and position methods
│ ├── recorder # resample and save sample sequences
│ ├── sd_reader # explore, load and store files on an SD card
│ ├── spi # SPI driver and settings
│ └── template # the basic structure of every module
│ ├── CMakeLists.txt
│ ├── example.c
│ └── include
│ └── example.h
├── dependencies.lock
├── main # code entry point
│ ├── CMakeLists.txt
│ ├── idf_component.yml
│ └── main.c
├── README.md
└── remux.sh # script to convert audio files to the right format
- ESP32-WROVER Development Board
- I2S DAC with AUX output
- SPI SD card reader
- Joystick with integrated click button
- I2C digital screen
- Potentiometer
- 8x Keyboard Switches
- ESP Integrated Development Framework
- (Optional) Visual Studio Code
- (Optional) ESP-IDF Extension for VS Code
The project can either be built manually using ESP's tools directly or with the aid of the ESP-IDF extension for Visual Studio Code; we recommend the latter.
- Follow the instructions for downloading both the ESP-IDF extension for Visual Studio Code and ESP-IDF itself; ESP-IDF is the actual framework needed to build the application and it can be easily installed directly from the extension;
- Press
ctrl + shift + porcmd + shift + pto open the command palette; - Click on
ESP-IDF: SDK Configuration Editor (Menuconfig)to open up the ESP32 hardware configuration menu; - Toggle the following options:
Support for external, SPI-connected RAM; - From the option
Long file name support, choose the optionLong file name buffer on stack - Open the command palette again and click on
ESP-IDF: Add VS Code Configuration Folderto create the necessary bindings for the extension; - Click on
ESP-IDF: Build Your Projectto build the source code; - Click on
ESP-IDF: Select Port to Useand choose the interface that is currently being used by the ESP32 - Click on
ESP-IDF: Build, Flash and Start a Monitor on Your Deviceto directly upload the code to the ESP32 and view its logs
For the process of setting up ESP-IDF manually, please refer to the official documentation as provided by Espressif:
.
├── general menu
│ ├── Settings
| | ├── Volume
| | └── Metronome
| | ├── On/Off
| | └── Bpm
│ └── Effects
| | ├── Bitcrusher
| | | ├── On/Off
| | | ├── Bit depth
| | | └── Downsample
| | └── Distortion
| | ├── On/Off
| | ├── Gain
| | └── Threshold
└── button menu
├── Settings
| ├── Volume
| └── Mode
├── Effects
| ├── Bitcrusher
| | ├── On/Off
| | ├── Bit depth
| | └── Downsample
| ├── Pitch
| └── Distortion
| ├── On/Off
| ├── Gain
| └── Threshold
├── Chopping
| ├── Start
| └── End
├── Sample load
| ├── Sample 1
| ├── Sample 2
| └── ...
└── Save changes
Joystick up/down:
- Move up and down in the menu
Joystick left:
- Move to the previous menu
Joystick right:
- Move to the selected menu
Joystick button:
- Move to recording mode (see the flow below)
Button:
- Move to the button menu if a sample is associated to that button
- Move to the sample load menu
- Select the button to record into if in record mode
Potentiometer:
- Changes the value or toggle the option depending on the current menu
Record button (start recording) -> Select button -> Record button/wait 5 sec (stop recording)
In order for the files to be played correctly by the ESP32, they have to be formatted in a common format (WAV) with the same set of parameters.
If you're unsure whether the file you intend to upload meets these standars, we have supplied a simple FFmpeg script (remux.sh) that creates a copy of the original audio file with the correct parameters.
To use this script, it is necessary to install FFmpeg on your computer. This software is free and open source and you can find more info here
The command can be used as follows:
#in the root folder of the project
./remux.sh relative/path/to/file.wavIf FFmpeg has been installed correctly, a copy of the original file with the _clean suffix will be created.
The Google Slides presentation can be acccessed via the following link.
View the video Here
- Tommaso Ascolani: Joystick, Potentiometer, Recorder, FSM
- Davide Da Col: I2S driver, Audio mixer, Sample playback, FSM
- Giovanni Sbalchiero: Pad section, Playback mode, Effects, FSM
- Marco Zanatta: SD reader, LCD Display, FSM