# RIVET

**Build the sound. Wire the machine.**

A native Linux modular music workstation in development, targeting Fedora.
Original C++20 / Qt 6 implementation. No browser runtime, cloud service, accounts,
third-party workstation graphics or bundled samples.

## Current state: Phase 1 foundation

Implemented and tested:

- Native Qt window with a compact graphite/brass design and scrollable settings.
- Real stereo JACK output using Fedora's PipeWire JACK implementation.
- Start/stop, output-port selection, MIDI-source selection and buffer requests.
- Actual sample-rate, buffer-size, connection, callback and xrun status.
- Peak metering from generated output samples, plus JACK graph CPU load.
- Quiet development sine with working frequency/level controls, ramped enable /
  disable, finite-value protection and bounded output. Off on every start.
- Real JACK MIDI input: note on/off, velocity, pitch bend and CC monitoring,
  including frame offsets. **There is no playable instrument yet.**
- Persistent device preferences/window geometry, file logging and visible errors.
- Graceful missing-port, disconnected-output and server-shutdown handling.

Planned, **not implemented**: rack devices/cables, synths, effects, mixer,
transport, sequencer, piano roll, automation, drum machine, sampler, projects,
presets, export, undo/redo and packaging. Phase 1 makes no DAW capability claims.

## Build and run

See [BUILDING.md](BUILDING.md) for Fedora dependencies. JACK and ALSA development
packages are now installed on the development machine; the initial temporary
header setup is retained there as historical build evidence.

```sh
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DRIVET_REQUIRE_JACK=ON
cmake --build build -j 4
ctest --test-dir build --output-on-failure
./build/rivet
```

1. Click **Refresh available ports**.
2. Select left/right playback destinations and, optionally, a MIDI source.
   Leaving ports **Unconnected** is supported and produces no speaker output.
3. Click **Start audio**. The engine starts silent.
4. For development verification, enable the quiet sine diagnostic. Its controls
   change actual DSP; the meter shows actual generated samples even if the
   output ports are unconnected.
5. Disable the diagnostic or stop audio when finished. Stop before editing audio
   configuration. Refresh and restart after a device/server disappears.

Sample rate belongs to the audio server. PipeWire supports a launch-time hint:
`PIPEWIRE_RATE=1/48000 ./build/rivet`. The displayed actual rate is authoritative.
Buffer requests can affect the shared JACK graph. No settings are forced on
other applications at startup.

## Verification and development

[DEVELOPMENT.md](DEVELOPMENT.md) records exact evidence and limitations.
[ARCHITECTURE.md](ARCHITECTURE.md) describes ownership and the real-time boundary.
[CHANGELOG.md](CHANGELOG.md) tracks completed changes.
[CONTRIBUTING.md](CONTRIBUTING.md) covers Git commits and validation;
[VERSIONING.md](VERSIONING.md) defines version bumps and release tags.
The current development baseline is **0.1.0**. `VERSION` is the sole source of
the application version used by CMake and `rivet --version`.

```sh
./build/rivet_jack_check        # Real audio/MIDI capture; no speaker connections
python3 tests/isolated_audio.py # Private PipeWire daemon + shutdown checks
```

The diagnostic is intentionally labeled development functionality. Phase 2
should use it only to verify real routing, then replace it with proper device
processing. It is not a substitute for Rivet Sub.
