GithubHelp home page GithubHelp logo

kwarc93 / audio-multieffect Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 5.24 MB

Guitar multi effect running on STM32F746-DISCO board

License: GNU General Public License v3.0

C++ 10.90% C 88.57% Assembly 0.42% CMake 0.01% MATLAB 0.11%
audio-processing dsp embedded guitar guitar-effects stm32 stm32f746 cabinet-simulator fast-convolution-filtering guitar-processor

audio-multieffect's Introduction

Digital Multi Effect

A concept of digital multi-effect for guitar running on STM32F746-DISCO board

screenshot

Overview

Device captures audio signal from line-in jack (left channel, labeled as MAIN), then processes audio samples according to selected effect and finally outputs processed audio to line-out jack. User controls device by touchscreen. It is possible to add multiple effects to signal chain. Several basic guitar effects are implemented:

  • tremolo
  • echo/delay
  • chorus
  • reverb
  • overdrive
  • speaker cabinet emulator
  • vocoder

Effects order (in signal chain) can be changed through settings menu and each effect can be enabled/disabled separately. Changing between effects is done by left/right swipe gesture. Settings screen can be accessed by swipe down gesture.

The vocoder effect needs an additional signal input as modulator, which can be:

  • right channel of the line-in, labeled as AUX (default)
  • signal form the onboard digital microphone

This signal can be selected from the audio settings screen.

Audio quality is set to 24bit 48kHz. Audio latency is determined by the size of audio buffer, which by default is 128 samples that gives around 6ms in-out delay.

Demo

https://youtu.be/xXm61wA0C68?feature=shared

How to build

Project was created using Eclipse IDE for Embedded C/C++ Developers

Follow these steps:

  1. Install Eclipse IDE for Embedded C/C++ Developers and gcc-arm-none-eabi toolchain. Setup Eclipse's global ARM toolchain path in Window->Preferences->MCU.
  2. Clone repo: git clone --recurse-submodules https://github.com/kwarc93/audio-multieffect.git
  3. In Eclipse go to: File->Import->Existing projects into workspace, select folder with cloned repo and check Copy projects into workspace. Click Finish.

Now the project should have two build configurations: Debug and Release, it should be possible to build each one with no errors.

How to add new effect

Here is a brief description of how to add new effect to the system:

  1. Define new effect ID, name, its attributes and controls in app/model/effect_features.hpp. Do not forget to add new effect attributes to the effect_specific_attributes variant at the end.
  2. Add new effect module (.cpp/.hpp pair) to the app/model/new_effect_name location. Write new effect class that inherits from base effect class. Look at other effects implementation as a guideline.
  3. Go to app/model/effect_processor.hpp module and add new effect controls variant to the event set_effect_controls. Add another set_controls method overload to the effect_processor class. In the source file, include header of new effect and add new entry to the effect_factory map. Define set_controls method.
  4. Go to the app/view/lcd_view/screens and create new screen for the effect. This is the most complicated step and would take a lot of writting to describe it in detail here :(. You can use Squareline Studio tool to easily create screen without writting code. Another way is to look at existing screens implementation and take it as a guideline. Go to the app/view/lcd_view/ and write event handling code for new screen in ui_events.cpp & ui.c source files.
  5. Go to app/view/lcd_view/lcd_view.hpp module and add new effect controls to the effect_controls_changed event. Add another set_effect_attr method overload to the lcd_view class and define it in the source file. Also, in method change_effect_screen add new case for handling new effect screen.

After completing these steps it should be possible to compile the project. However this instruction is not very detailed so there may be compilation errors if something is missing. If so, follow the compiler error messages.

audio-multieffect's People

Contributors

kwarc93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

audio-multieffect's Issues

Some Questions for developing about this project

1、Could you provide an estimate of the compiled program size? Is it possible to port the project to other STM32 platforms to ensure higher execution speed, and does the ROM capacity support running additional effects modules?
2、Are there any plans to add distortion effects to the project?
3、Regarding the guitar input interface, if using a line-in connection, is there a corresponding impedance matching circuit included, or would I need to create one myself? This is a detail that I'm interested in.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.