> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oryx.mechatronstudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analog format

> Segments, not samples: how to read the .txt of an analog signal.

The analog file describes **segments, not samples**. Each row is a whole curve
segment, and the generator rebuilds it. A file of dozens of lines instead of
tens of thousands.

## Structure

Nine columns:

| Column             | What it is                                                        |
| ------------------ | ----------------------------------------------------------------- |
| **Step**           | Which step the segment starts at                                  |
| **To**             | Which step it ends at                                             |
| **Channel**        | Channel number, in file order                                     |
| **Level0**         | Starting level, quantized to the chosen resolution                |
| **Level1**         | Arrival level                                                     |
| **Handle\_X**      | Where the chord is grabbed, in % of the segment                   |
| **Handle\_Y**      | What level that handle is pulled to                               |
| **Radius**         | Peak rounding, in %                                               |
| **Corner\_Radius** | Rounding of the break with the next segment on that channel, in % |

A straight segment —an undeformed chord— carries `-` in *Handle\_X*, *Handle\_Y*
and *Radius*.

## How it is ordered

The rows are **ordered by the step they start at**, mixing every channel: it is
the order in which it plays back.

## Each row stands on its own

A row says from which step to which step it runs, on which channel, between which
levels and with what curve. **The arrival level repeats as the starting level of
the next row**, and that repetition is exactly what saves you from remembering
old rows from other channels.

The result: you can play it back **one line at a time**, without loading the
whole file into memory.

## The only column that looks ahead

**Corner\_Radius** says how much to round the break with the segment that follows
on that same channel:

* With `-` or `0`, the break stays **sharp**.
* With a radius `r`, the curve eats **the last half of `r` of this segment and
  the first half of the next**, passing through the connection point as a vertex.

The last segment of a channel has no next one, so it forms no corner: it carries
`-`.

## What is not in the file

<Note>
  **There is no total length.** The analog signal lasts as long as its segments and
  can end before the end of the timeline.
</Note>

A channel with fewer than two connection points describes no segment —with no
duration there is no signal to recreate— so it is left out of the file.

## The resolution

*Level0* and *Level1* come out quantized to the resolution chosen on export: 8,
10, 12 or 16 bits.

<Warning>
  The **ESP32 DAC is 8-bit** (0–255) and tops out near 3.3 V. If you exported at a
  higher resolution, you have to rescale when playing back.
</Warning>

## With metadata

At the end of the file, after a blank line:

```
VOLTAGE: 3.3
STEP_TIME (us): 50
CYCLES (RPM): 0
```

The playback example, reading from a microSD card, is in
[Generate the signal with an ESP32](/en/export/esp32-microsd).
