Giter Site home page Giter Site logo

hollance / synth-recipes Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 1.0 1.76 MB

Code snippets of sound synthesis algorithms in C++

C++ 100.00%
algorithms audio-plugin audio-programming cplusplus digital-signal-processing dsp juce sound-synthesis synthesizer virtual-instruments

synth-recipes's Introduction

Sound Synthesis Recipes

NOTE: I've decided to turn this content into a blog instead. Read it here: audiodev.blog

(This repo won't be maintained any longer.)

I've been collecting code snippets of sound synthesis algorithms for a while now. Recently I decided to clean up my notes and organize them a bit better into a handy reference.

The inspiration for this is The Pocket Handbook of Image Processing Algorithms In C by Myler & Weeks, a concise guide of algorithms for image processing. I was looking for something similar for audio synthesis but came up empty-handed, so I've started to write my own.

This is not meant to be an exhaustive treatise of the entire field of digital audio synthesis, only a quick reference โ€” with working source code! Where possible I have included links to material for further research.

The goal of this work is to educate, not necessarily to provide a DSP library that has super optimized ready-to-use routines. Feel free to take this code and tweak it to your needs.

Table of contents

Introduction:

  • Quick introduction to digital audio
  • How to read this guide
  • How to run the source code

Basic waveforms:

  • Sine waves

Noise:

๐Ÿ‘ท This is a work in progress! I'll be adding new content every so often.

Is this enough to build a synthesizer?

Yes and no. The purpose of this guide is purely to describe different algorithms for producing sound. That is an important part of building a musical instrument, but not the only part. To implement a complete software synthesizer, you will need to tackle a lot of additional functionality such as:

  • handling MIDI
  • using envelopes to shape the sound over time
  • polyphony and voice support
  • filters
  • modulation
  • user-configurable parameters
  • talking to a host through the VST or Audio Unit protocol
  • a user interface
  • and many other features...

Those topics are outside the scope of this guide. As it happens, I also wrote a book about how to do all this other stuff: Code Your Own Synth Plug-Ins With C++ and JUCE.

Cover of my synth book

Learn the fundamentals of audio programming by building a fully-featured software synthesizer plug-in, with every step explained along the way. The plug-in can be used in all the popular DAWs and is made using the industry standard tools for audio development: JUCE framework and the C++ programming language. Not too much math, lots of explanations!

Buy the book here (free sample chapters available)

Contributors

Written by Matthijs Hollemans in 2022.

License

The source code snippets from this work can be freely used without restrictions, unless noted otherwise. The use of these programs is at your own risk.

It is possible that a demonstrated algorithm is under some form of patent protection. The author of this work cannot vouch for the suitability of using these algorithms for any purpose other than education.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The text is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

synth-recipes's People

Contributors

hollance 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

Watchers

 avatar  avatar

Forkers

amorjnyh

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.