AUDIO
Source snapshot · 11 November 2026

API reference / ravet_standalone_probe

Crate ravet_standalone_probe 

Expand description

Evidence helper for standalone audio/MIDI runs on a named device.

It drives and observes a standalone application from outside, so the application itself stays unmodified:

  • list prints audio outputs (ravet_device::output_devices) and MIDI input/output ports (ravet_midi_device) with their IDs.
  • notes <midi-out-id> sends a fixed pattern: A2 (note 45, 110 Hz) for 1 s, 0.7 s rest, A3 (note 57, 220 Hz) for 1 s, at velocity 100.
  • capture-notes <audio-out-id|default> <midi-out-id> <wav> records the output device through a loopback input stream (WASAPI loopback on Windows) while sending that pattern after 1 s of silence, then writes a 32-bit float WAV.
  • capture <audio-out-id|default> <seconds> <wav> records the output device the same way without sending MIDI (at most 60 s).
  • analyse <wav> prints RMS and an autocorrelation pitch estimate for each 100 ms window of the first channel of a 32-bit float WAV.

The capture callback only pushes samples into a preallocated ring; it is a test helper, not a real-time product path. Loopback capture of an output device is a CPAL WASAPI feature; other hosts need an external recorder (for example pw-record on PipeWire).

Constants§

PATTERN 🔒

Functions§

analyse 🔒
capture 🔒
list 🔒
main 🔒
pitch 🔒
Lag of the strongest autocorrelation between 50 Hz and 1 kHz.
read_wav 🔒
Read a 32-bit float WAV (format tag 3, or WAVE_FORMAT_EXTENSIBLE).
send_pattern 🔒
write_wav 🔒

Type Aliases§

Result 🔒