Giter VIP home page Giter VIP logo

neuralseed's Introduction

NeuralSeed

Neural Seed uses neural networks to emulate amps/pedals on the Daisy Seed hardware by Electro-Smith, and the Terrarium pedal by PedalPCB. Models are trained on audio recordings from your amp or pedal, and can be uploaded to the Daisy Seed as firmware. NeuralSeed includes several built in amp/pedal models, as well as controls for input/output level, wet/dry mix, and up to 3 parameterized knobs for the selected neural model. Effective for Amps/PreAmps (direct out, no cab), Distortion/Overdrive/Boost pedals (non-time based, no Reverb/Delay/Flange/Phaser).

View the Demo on YouTube

Read the tech article published in Towards Data Science

Download the neuralseed.bin for Daisy Seed from the Releases page. See release notes for a list of built in amp/pedal models.

Start training models for NeuralSeed the easy way using the Colab Script!

app

The Daisy Seed is a powerful ARM Cortex-M7 powered board intended for audio effects. The Terrarium pcb provides input and output buffers, as well as connections to the Daisy Seed for up to 6 potentiometer knobs, 4 switches, in/out jacks, and 9v power supply. NeuralSeed is the software developed by GuitarML to run on this hardware. Total material cost was less than $100 to build a fully capable digital guitar multi-effect.

For information on compiling NeuralSeed in the Daisy Ecosystem see the Daisy Wiki.

Technical Info

In comparison to other GuitarML plugins, Neural Seed is very minimal, running only a GRU size 10 (by comparison Proteus uses LSTM size 40). Using this size model, may not be able to accurately capture certain devices, especially high gain amps, but should work decently well for distortion/overdrive pedals and low gain amps (direct out, not from a microphone). This is due to limited processing power on the M7 microcontroller. The current code processes on float32 audio data, so this could be optimized for the M7 chip using quantized int16 data. The Daisy Seed supports the addition of a display so this could be a future modification, as well as an encoder knob to switch models.

The compiled binary and model data fits into Flash Memory, which is limited to 128KB. The RTNeural engine is used for fast inferencing of the neural models with a very tiny footprint. It is possible to add more models utilizing other data storage areas on the Daisy Seed.

Utilizing only the 128KB Flash memory, NeuralSeed can hold around 15 different models. The initial release includes 11 built in models, and there is room to add more, however the lack of a display means it's up to you to keep track of what model you're on! For live shows one could choose a subset of their favorite models by editing the NeuralSeed/all_model_data.h file to make this more manageable.

Getting started

Build the daisy libraries and NeuralSeed with (after installing the Daisy Toolchain):

make -C DaisySP
make -C libDaisy
cd NeuralSeed
make

Then flash your terrarium with the following commands (or use the Electrosmith Web Programmer)

cd your_pedal
# using USB (after entering bootloader mode)
make program-dfu
# using JTAG/SWD adaptor (like STLink)
make program

Control

Control Description Comment
Ctrl 1 Input Level Adjusts the input level to the neural net model (0 to 3x volume)
Ctrl 2 Mix Set the dry/wet amount (full left for dry, full right for only neural net output
Ctrl 3 Volume Sets the output volume of the pedal
Ctrl 4 Neural Param 1 Adjusts the first model parameter, such as gain/tone (only applies to 1-conditioned models)
Ctrl 5 Neural Param 2 Adjusts the second model parameter, such as gain/tone (only applies to 2-conditioned models)
Ctrl 6 Neural Param 3 Adjusts the third model parameter, such as gain/tone (only applies to 3-conditioned models)
SW 1 - 4 4Band EQ Boost Bass, Low Mid, High Mid, Treble Boost (Band Pass)
FS 1 Bypass/Active Bypass / effect engaged
FS 2 Cycle Neural Model Loads the next available Neural Model, starts at beginning after the last in the list (i.e. next pedal/amp)
LED 1 Bypass/Active Indicator Illuminated when effect is set to Active
LED 2 Brightness based on selected model parameterization Off = Snapshot, Dim = 1 Knob, Brighter = 2 Knobs, Brightest = 3 Knobs
Audio In 1 Audio input Mono only for Terrarium
Audio Out 1 Mix Out Mono only for Terrarium

Training your own Models (Amp/Pedal Capture)

You can train models for Neural Seed using the GuitarML fork (ns-capture branch) of Automated-GuitarAmpModelling code. Run "scripts/convert_json_to_c_header.py" on the resulting JSON model to generate a .h file, which you can copy and paste the weights into the "all_model_data.h" header before compiling "neuralseed.bin". Only GRU size 10 models (snapshot, 1-param) or GRU size 8 (2-param, 3-param) models are currently compatible. Train models using 48kHz to match Daisy Seed processing (note that this is different from most other GuitarML plugins). A 48kHz input wav file based on the Proteus input wav is available here.

Keep in mind that capture with such small models is hit or miss, and may take some massaging to get a proper capture, or may not be captured at all. Loss values over 0.08 probably won't sound good, or may contain harmonic noise. Ensure to start with volume low when testing a new model on the pedal.

Adding your model to NeuralSeed

To add your models to a custom build of Neural Seed, run the converter script on your json model.
python convert_json_to_c_header_gru.py <model_file.json>
Then copy and paste the information from the generated c-header into the all_model_data.h file before compiling. Ensure to modify the "Model" weights to a unique identifier, and add to the initialization list a the top and the "model_collection" vector at the bottom.

Email either the .json or .h model file to [email protected] and it may be included in the official repo.

neuralseed's People

Contributors

guitarml avatar jatinchowdhury18 avatar keyth72 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

neuralseed's Issues

Training at 48 kHz for NeuralSeed

Hi! I was trying to train a model for Neural Seed using the provided 48 kHz wav file. But it seems that the Proteus Capture Colab notebook only expects 44.1 kHz files. I looked around for any configuration but I couldn't figure out how to make it work.
How can I make this work? Or should I just train at 44.1 kHz?

Thanks!

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.