Skip to content

DavideDaCol/groovechip

Repository files navigation

GrooveChip

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

Project structure

ESP32 Pinout

Here you can find the pinout map for the project, indicating which pin has to be used by which component.

Software components

.
├── 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

Hardware requirements

  1. ESP32-WROVER Development Board
  2. I2S DAC with AUX output
  3. SPI SD card reader
  4. Joystick with integrated click button
  5. I2C digital screen
  6. Potentiometer
  7. 8x Keyboard Switches

Software requirements

  1. ESP Integrated Development Framework
  2. (Optional) Visual Studio Code
  3. (Optional) ESP-IDF Extension for VS Code

Build instruction

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.

Using Visual Studio Code

  1. 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;
  2. Press ctrl + shift + p or cmd + shift + p to open the command palette;
  3. Click on ESP-IDF: SDK Configuration Editor (Menuconfig) to open up the ESP32 hardware configuration menu;
  4. Toggle the following options: Support for external, SPI-connected RAM;
  5. From the option Long file name support, choose the option Long file name buffer on stack
  6. Open the command palette again and click on ESP-IDF: Add VS Code Configuration Folder to create the necessary bindings for the extension;
  7. Click on ESP-IDF: Build Your Project to build the source code;
  8. Click on ESP-IDF: Select Port to Use and choose the interface that is currently being used by the ESP32
  9. Click on ESP-IDF: Build, Flash and Start a Monitor on Your Device to directly upload the code to the ESP32 and view its logs

Using ESP-IDF directly

For the process of setting up ESP-IDF manually, please refer to the official documentation as provided by Espressif:

User Guide

Menu navigation:

.
├── 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

Menu navigation flow

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

Recording flow

Record button (start recording) -> Select button -> Record button/wait 5 sec (stop recording)

Audio file normalization

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.wav

If FFmpeg has been installed correctly, a copy of the original file with the _clean suffix will be created.

Presentation

The Google Slides presentation can be acccessed via the following link.

Youtube Pitch Video

View the video Here

The Team

Major contributions

  • 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

About

Files and Documentation for GrooveChip, an ESP32-based sampler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages