A simple real-time software synthesizer with looper functionality written in C using raylib and stb_ds.h.
- Sine-Wave Synthesizer: Real-time polyphonic sound generation.
- MIDI-Style Looper: Records Note-On and Note-Off events quantized to musical grids and plays them back seamlessly in a loop.
- Visual Feedback: Bar timeline, metronome indicator, and state status colors (Replay, Waiting, Record).
Before building the project, make sure you have the following tools and dependencies installed on your system:
- C Compiler:
gccorclang(C99 support or newer) - Build System:
CMake(version 3.11 or higher) andmake(orninja) - Raylib Dependencies (Arch Linux):
Install
base-devel,cmake, and the required X11, OpenGL, and ALSA/PulseAudio development packages:sudo pacman -S base-devel cmake raylib libx11 libxft libxinerama libxcursor libxi alsa-lib
git clone [https://github.com/toxypiks/raylib_synth_example.git](https://github.com/toxypiks/raylib_synth_example.git)
cd raylib_synth_examplemkdir build
cd build
cmake ..
make./main- Keyboard (Notes):
Z,S,X,D,C,V,G,B,H,N,J,M,,(Semitones from C to C') Spacebar:- In Replay Mode: Switches to Waiting until end of bar (clears old recordings and waits for the next measure to start recording).
- In Record Mode: Stops recording and switches back to Replay Mode (loops the recorded pattern).