No description
  • C 97.8%
  • Makefile 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-13 16:51:38 +02:00
src modify voice struct and add charang 2026-07-13 16:51:38 +02:00
.gitignore Initial Commit 2026-07-11 03:13:24 +02:00
LICENSE Initial Commit 2026-07-11 03:13:24 +02:00
Makefile idk update ig 2026-07-11 22:57:52 +02:00
README.md idk update ig 2026-07-11 22:57:52 +02:00

synth

A small modular MIDI synthesizer written in C.

synth is a lightweight software synthesizer focused on simplicity, real-time performance, and experimentation. It provides a basic MIDI event system, multiple voices, and customizable synthesis engines without the complexity of large plugin frameworks.

The goal is not to recreate every feature of commercial synthesizers, but to provide a small and hackable foundation for building instruments.

MIDI Device (/dev/midi*) -> synth program -> ALSA output (aplay) -> speakers

Features

  • Written entirely in C
  • Real-time audio generation
  • MIDI input support
  • Polyphonic voices
  • Pitch bend support
  • Multiple synthesis approaches
  • No external plugin frameworks
  • Designed for experimentation

Building

Requires:

  • GCC or Clang
  • Make
make

Run:

cat /dev/midi* | ./out/{instrument} | aplay -f S16_LE -c 1 -r 48000 -B 1024 -F 256

Architecture

The synthesizer is built around independent voices.

Each voice contains:

  • oscillator/string state
  • envelope state
  • synthesis parameters
  • MIDI-controlled properties

Audio is generated one sample at a time:

for each voice:
    update synthesis state
    generate sample
    mix into output

Design Goals

This project prioritizes:

  • Simple code
  • Low latency
  • Hackability
  • Understanding DSP concepts

It intentionally avoids:

  • Large dependency trees
  • Complex plugin APIs
  • Hidden processing pipelines

The entire instrument should be understandable by reading the source.

License

MIT License