# `Mx.Recording`
[🔗](https://github.com/mx-music/mx/blob/main/lib/mx/recording.ex#L1)

Checks where a session can be recorded, and reads the length, peak and clips of a recording.

The engine writes the recording itself, so a path it cannot write is refused before playing starts.
mxs records 32-bit floats, which keep a sound louder than full scale, and a sample at or beyond full scale counts as at full scale.
Each stretch of frames with a sample at full scale in either channel counts as one clip.

# `check`

Checks a recording can be written to a path: `:ok`, or `{:error, message}` naming it.

# `level`

The peak of a 24-bit or 32-bit float WAV recording in dB below full scale, or nil when it is silent, with how many times it clipped and the seconds of the first clip.

# `read_wav`

The channels, sample rate and number of frames of a WAV file.

# `report`

The lines mx prints after recording: the length and peak, and a warning when the recording clipped.

# `seconds`

The length of a WAV recording in seconds.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
