Application: vhaudiosynth
Author: Viktor Glebov / V01G04A81
rev: 0.0.1 Draft / Initial 2019-2022
vhaudiosynth is an experimental native C++ real-time software synthesizer focused on low-level audio processing, instrument synthesis, signal routing, effects, MIDI input and real-time visualization.
The project is implemented as a modular C++ application rather than a single synthesizer demo. Its source tree contains separate subsystems for audio buffers, channels, signal sources, instruments, effects, MIDI, runtime services, mathematical processing, audio drivers, GUI/window management and oscilloscope visualization.
The project is currently at revision 0.1 and should be considered an experimental / development-stage software synthesizer.
vhaudiosynth — native C++ real-time audio synthesis experiment.

Source code:
https://github.com/vigatron/vhaudiosynth.git
The keyboard can be used as a virtual musical keyboard.
| Key | Function |
|---|---|
Q 2 W 3 E R 5 T 6 Y 7 U |
Upper octave |
Z S X D C V G B H N J M |
Standard octave |
+ Select next instrument
- Select previous instrument
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| C | C+ | D | D+ | E | F | F+ | G | G+ | A | A+ | B | C+ |
| q | 2 | w | 3 | e | r | 5 | t | 6 | y | 7 | u | i |
vhaudiosynth is organized into several functional subsystems.
vhaudiosynth
│
├── Audio / DSP
│ ├── abuffer
│ ├── channel
│ ├── sigsrc
│ ├── math
│ └── effects
│
├── Instruments
│ └── instruments
│
├── Control
│ └── midi
│
├── Runtime
│ └── runtime
│
├── Hardware / Audio I/O
│ └── driver
│
├── User Interface
│ └── wnd
│
├── Visualization
│ └── osciloscope
│
└── File / Resource Handling
└── fsys
This separation is important because it indicates that the project is structured around an audio-processing pipeline rather than around a monolithic application loop.
At the build-system level, the project explicitly collects source files from these subsystems and links them into the final vhaudiosynth executable.
The project separates several concepts that are normally found in a real-time audio engine:
This allows an instrument to be treated as a signal-generation component while subsequent processing can operate on audio buffers and channels.
A simplified conceptual signal path can be represented as:
Keyboard / MIDI
│
▼
Instrument
│
▼
Signal Source
│
▼
Audio Buffer
│
▼
Channel
│
▼
Effects
│
▼
Audio Driver
│
├──────────────► Speaker / Output
│
└──────────────► Oscilloscope
The exact signal-routing semantics depend on the implementation of the individual classes and modules.
| Component | Technology |
|---|---|
| Language | C++14 |
| Build | CMake |
| GUI | SDL2 |
| Font rendering | SDL2_ttf |
| Threading | POSIX pthread |
| Audio | ALSA |
| License | GPL-3.0 |
The project currently targets a native Linux-style environment. The build configuration explicitly searches for SDL2 and pthread and links against ALSA and SDL2_ttf.
TODO: Fix buffer for audio over bluetooth
$ mkdir build ; Create build folder
$ cd build ; Change directory
$ cmake .. ; Run CMake
$ make ; Build application
$ ./vhaudiosynth ; Run application
Install: SDL2 with SDL2 Fonts
On Debian / Ubuntu-based systems:
sudo apt install \
cmake \
build-essential \
libsdl2-dev \
libsdl2-ttf-dev \
libasound2-dev
Clone the repository:
git clone https://github.com/vigatron/vhaudiosynth.git
cd vhaudiosynth
Create a build directory:
mkdir build
cd build
Configure the project:
cmake ..
Build:
make
Run:
./vhaudiosynth
vhaudiosynth is an experimental project rather than a finished commercial synthesizer.
The current repository describes the software as revision 0.1. The codebase contains a number of distinct audio-engine subsystems, but the public documentation is intentionally minimal and does not currently provide a complete specification of every instrument, DSP algorithm, audio format or routing mechanism.
One documented issue concerns audio buffering when using Bluetooth audio devices:
TODO: Fix buffer for audio over bluetooth
Therefore, the project should be regarded primarily as an engineering / development project and an experimental real-time audio platform.
The architecture suggests several major design goals:
Native real-time processing
Audio processing is implemented directly in C++ rather than being delegated entirely to an external synthesizer framework.
Modular DSP
Instruments, signal sources, buffers, channels and effects are represented as separate subsystems.
Interactive control
Keyboard and MIDI-oriented input provide real-time control of the synthesis engine.
Visualization
The presence of a dedicated oscilloscope subsystem indicates that audio signals can be inspected while the synthesizer is running.
Extensibility
The separation of instruments and effects makes it possible to extend the synthesizer without redesigning the entire application.
VHSynth is best viewed as a software audio-engine experiment.
It is particularly useful as a codebase for studying:
It is not intended to compete feature-for-feature with mature production synthesizers or DAWs.
SINTBL 1/4 table:
uint16_t sintbl[1024]; // unsigned 16-bit array for angles [0..89] / [0..1023]
FULLTSIN class
FULLTCOS class
FULLRSIN class
FULLRCOS class
uint16_t sinval(uint16_t angle)
VHSynth is released under the GNU General Public License v3.0.
See LICENSE for the complete license text.
(C) 2019-2022 Viktor Glebov / V01G04A81 / Initial Draft rev 0.0.1