A basic additive synthesiser in C++ with accompanying DSP library.
Using olcPixelGameEngine, olcPGEX_Sound (modified), Dear ImGui and olcPGE Dear ImGui backend implementation.
MIDI support now included with RtMidi.
All dependencies are included directly or as git submodules. To clone all required files
simply use the --recurse-submodules
flag when cloning this repository:
git clone --recurse-submodules https://github.com/nospi/synth2
The project is built with Visual Studio 2019 - no alternative build scripts are attached but I'd be open to pull requests for additional environments.
- 3 oscillators
- 4 wave functions (Sine, Square, Sawtooth, Triangle)
- 2 resonant filters
- ADSR envelope (applies to all 3 oscillators)
- Compressor
- Limiter
- 4 unit FX rack (currently running as inserts with a dry/wet mix)
- Realtime waveform and FFT visualizers
- Custom presets
- QWERTY or MIDI keyboard input
- Configurable UI
- Keyboard visualizer
- Velocity sensitivity
- (Some) parameter smoothing
- Mono Delay
- Concurrent multi-channel support
- Efficient wave function approximations
- LFO
- Wave functions:
- Noise
- PWM
- Algorithmic Reverb(s)
- Overdrive
- Fuzz
- Flanger
- Phaser
- Chorus
- Ping Pong Delay
For convenience, all dependencies are included as submodules under $(SolutionDir)/libs
. To include these use the --recurse-submodules
flag when cloning this repository.
- olcPixelGameEngine.h
- olcPGEX_Sound.h MODIFIED: modified file included in project
- Dear ImGui docking branch
- imgui_impl_pge.h
- ImGuiFileDialog
- json.hpp
- dirent.h
- rtmidi
OSC 1 --+
|
OSC 2 --+-- ADSR ENV -- FILTER 1 -- FILTER 2 -- COMPRESSOR -- FX 1 -- FX 2 -- FX 3 -- FX 4 -- LIMITER -- MASTER FADER
|
OSC 3 --+
Modify FX from insert routing to send routing.
+- FX 1 -+
OSC 1 --+ | |
| +- FX 2 -+
OSC 2 --+-- ADSR ENV -- FILTER 1 -- FILTER 2 -- COMPRESSOR --+ +-- LIMITER -- MASTER FADER
| +- FX 3 -+
OSC 3 --+ | |
+- FX 4 -+
Ideally the fx unit will be configurable between insert and send.
- Filters should be configurable as pre/post dynamics; and pre/post FX
- FX units should be configurable as pre/post dynamics
OSCS -- ENV -- PRE-DYN -- (DYN) -- POST-DYN -- (FX) -- POST-FX -- LIMITER -- MASTER FADER
Copyright 2018, 2019, 2020 OneLoneCoder.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions or derivations of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions or derivative works in binary form must reproduce the above copyright notice. This list of conditions and the following disclaimer must be reproduced in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.