Music layer (wauvio/ext)

Music layer overview

The music layer (wauvio/ext.hpp, directory wauvio/ext/) sits on top of the core. It adds a musical vocabulary — MIDI-numbered notes, dynamics, articulations, chords, scales — plus a polymorphic Instrument interface, a library of modeled instruments, sample playback, arrangements, genre styling and a configurable WAV renderer. Everything lives in wauvio::music, except the concrete instruments (wauvio::instruments) and the render options (wauvio).

See it in action: A melody · A small band

ext.hpp includes wauvio.hpp and then, in order: core types, sampling, modeled-instrument bases, render, the instrument families, and the genre system.

AreaHeader(s)Page
Musical types, Instrument, Track, Arrangement, scalesext/core/core.hppCore types
TimbreRecipe and instrument family base classes, DrumKitext/core/model_instruments.hppModeled instruments
WAV loading, SampleZone, MultiSample, SampledInstrumentext/samples/sampling.hppSampling
RenderOptions, render()ext/core/render.hppRendering
Genre presets and stylingext/genre/*.hppGenre system
Concrete instruments (≈300 classes)ext/instruments/**Instrument catalog

Minimal example

#include "wauvio/ext.hpp"
using namespace wauvio;

music::Arrangement arr;
arr.tempo = music::Tempo(110);
instruments::Trumpet trumpet;
trumpet.reverb();                       // per-instrument FX, chainable
music::Melody tune = {
    {60, 0.5}, {64, 0.5}, {67, 0.5, music::Dynamics::f},
    music::rest(0.5), {72, 1.0}
};
arr.add(trumpet, tune);
arr.limiter();
render(arr, "out.wav");                 // RenderOptions defaults: 44.1 kHz, 16-bit stereo

Instruments are held by pointer inside tracks, so they must outlive any Track/Arrangement that references them.