codeofmochi / fpga-sound-synthesizer

A digital sound synthesizer on FPGA written in VHDL, C, Python and NodeJS (Terasic DE1-SoC)
GNU Affero General Public License v3.0
8 stars 0 forks source link
fpga fpga-sound-synthesizer midi nios-ii sound-synthesis terasic-de1-soc vhdl

FPGA sound synthesizer

A digital sound synthesizer platform on FPGA and associated full-stack toolchain written in VHDL, C, Python and NodeJS. The system is implemented on the Altera Cyclone V FPGA fabric of the Terasic DE1-SoC development kit board.

The project includes the softcore system design and control software, Python meta-scripts for scalable and configurable generation of its VHDL code, a compact low-level music abstraction library in C to represent a subset of the MIDI protocol as composable macros, and a MIDI file parser written in NodeJS to translate existing MIDI files to the C representation.

The technical report can be found in report/AlexandreChau_LoicDroz_FPGASoundSynthesizer.pdf
The demo video and slides can be found at the following Google Docs link: https://go.epfl.ch/fpga-sound-synthesizer-slides

The current softcore design includes 16 oscillators (allowing up to 16-voices polyphony), each able to generate sawtooth, square or triangle waves for the note range A0 (27.5 Hz) to C8 (4186 Hz) by digitally computing real-time pulse-code modulation samples at a rate of 96 KHz and 32-bit depth. The sound generation unit interprets a subset of the MIDI protocol through messages on an Avalon bus, sent by a softcore NIOS II processor. The system offers playback, volume and tone selection controls through the physical switches and buttons of the board, and provides real-time visual feedback by implementing a VU-meter approximation on the LEDs.

Setup and structure

To run the FPGA sound synthesizer design on the Terasic DE1-SoC board:

To change architectural parameters and regenerate VHDL files for compilation:

To use the MIDI parser tool to convert a MIDI file into a C header file

Authors and license

Acknowledgements

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more information.

FPGA sound synthesizer
Copyright (C) 2020 Alexandre CHAU, Loïc DROZ

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.