Code Monkey home page Code Monkey logo

synth-plugin-book's Introduction

Code Your Own Synth Plug-Ins With C++ and JUCE

This is the source code that accompanies the book Code Your Own Synth Plug-Ins With C++ and JUCE by Matthijs Hollemans.

The book cover

This 360-page book teaches step-by-step how to design and build a software synthesizer plug-in that can be used in all the popular DAWs such as Logic Pro, Ableton Live, REAPER, FL Studio, Cubase, Bitwig Studio, and others. The plug-in is made using industry standard tools for audio programming: the JUCE framework and the C++ programming language. You'll learn all the fundamentals of writing audio plug-ins in general and synths in particular, in an easy-to-follow guide that is light on math and heavy on being practical.

The book is available for purchase from The Audio Programmer as PDF and EPUB, and from Amazon as paperback.

NOTE: This repo accompanies the version of the book that was originally published on Leanpub.com. Visit github.com/TheAudioProgrammer/synth-plugin-book for the most up-to-date version of the source code.

How to use this repo

For each chapter there is a folder with the finished source code. Open the JX11.jucer file in Projucer and click the export button to open the project in your IDE.

The Finished Project folder contains the synth plug-in in its entirety, with added source code comments (it does not include the UI code from Chapter 13).

Want to know what the synth sounds like? Check out a few examples in the Audio Demos folder.

Found a bug or have a question?

First, please check the errata to see if the issue has already been covered.

If not, refer to the list of open issues and submit a new issue if you can't find your question in the list.

Also make sure to join The Audio Programmer community on Discord. This is a great place to chat about all things related to audio programming, and you can find me there as matthijs.

Source code license

The book is copyright 2022 M.I. Hollemans, all rights reserved.

The source code in this repo is licensed under the terms of the MIT license.

The JX11 synth from the book is based on the MDA JX10 synthesizer, originally written by Paul Kellett of maxim digital audio. The factory presets included in the synth are designed by Paul Kellett with additional patch design by Stefan Andersson and Zeitfraktur, Sascha Kujawa.

JUCE is copyright © Raw Material Software.

The Lato font is copyright (c) 2010-2014 Łukasz Dziedzic and is licensed under the SIL Open Font License.

Cover illustration made from artwork by Brett Jordan. License: CC-BY-2.0

synth-plugin-book's People

Contributors

aglee avatar 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  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  avatar

synth-plugin-book's Issues

XCode build failing

Hi there

I bought your book and i was just cloning the project and trying to compile in Xcode, but im getting this error in utils:

/Users/me/Playground/synth-plugin-book/Finished Project/Source/Utils.h:44:89 No type named 'parameterID' in namespace 'juce'

This is in Juce 7.0.4, xcode 14.2

Can you help?

Thanks

Dan

Need student discount to purchase your awesome book

Hi Sir,

I have read the sample book. I want to purchase the book as I enjoyed the stuff in the book.
As I am a student, unable to pay full $40, please provide me discount, I can either directly buy from you or may be via coupon code from leanpub.

Thank you

Chapter 4, PluginProcessor.cpp, change MIDI to Midi

Hi, as per coding standards, abbreviations shouldn't be TITLECASE, therefore shouldn't the method handleMIDI(...), be
void handleMidi(...) ? - Chapter 4, page. 81.

The juce library also has MIDI written as Midi in its classes, fields and methods.

Chapter 5, Oscillator.h & Synth.cpp suggestions

Hi, thank you for the book, I'm really enjoying it.
This is my first suggestion to the book. Hope that's ok!

In Oscillator.h (p.102 in book) instead of asking the reader to manually hardcode the value of TWO_PI, with the possibility of making an error, not suggest to use the predefined Juce constant?

//const float TWO_PI = 6.2831853071795864f; // not this
const float TWO_PI = juce::MathConstants<float>::twoPi; // but this?

In Synth.cpp instead of repeating voice.osc multiple times, why not use a field reference, decreasing the boilerplate a little

void Synth::noteOn(int note, int velocity)
{
    voice.note = note;
    
    Oscillator& osc = voice.osc; // this is new, instead of multiple `voice.osc` below
    osc.amplitude = (velocity / 127.f) * 0.5f;
    osc.freq = 261.63f;
    osc.sampleRate = sampleRate;
    osc.phaseOffset = 0.0f;
    osc.reset();
}

I hope the code is correct. I'm a seasoned Java, Kotlin and Android developer, learning C++ at the moment. Thank you!

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.