Working with data

Data sources & formats

Supported formats, how files are parsed, and how to drive the source browser.

Opening files

Use File → Open File… (⌘O), the + menu in the source browser, or drag files onto the window.

Select a folder to open every supported file inside it, recursively. Unsupported files are skipped, as are paths that are already open.

Files open in the window you are working in. To send one to a different window, drag it there — see Moving a file to another window.

Plan limit

Free allows 2 open files, Personal 10. See Plans & limits.

Supported formats

FormatExtensionsTraces
Delimited text.csv .tsv .txtEvery column
Apache Parquet.parquet .pqEvery numeric column
Arrow IPC.arrowEvery numeric column
Audio.wav .caf .aiff .flac .mp3 .m4a and more — 15 in allEvery channel

CSV, TSV and TXT

  • The delimiter (comma or tab) and the presence of a header row are detected automatically.
  • Quoted fields are supported.
  • Every column becomes a trace, including timestamp columns. Assign an x-axis explicitly — see Assigning a custom x-axis.
  • Values that do not parse as numbers become NaN and appear as gaps.

Parquet

Only numeric columns are exposed; strings, dates and structs are skipped. Each column keeps its declared type. Values are read as doubles, which is exact except at the extremes of 64-bit integers.

Arrow IPC

Read as an Arrow IPC stream, with column names taken from the schema. Every numeric column becomes a trace, read at its own width. X-values come from the stream, so an Arrow file can carry a non-uniform x-axis.

This is the same format as the Arrow IPC decoder used for live connections.

Audio

Refract opens every audio format macOS can decode — uncompressed, lossless and lossy alike. Compressed files are decoded to samples as they load, so an MP3 or a FLAC plots exactly like a WAV — no conversion step first.

FamilyExtensionsWhat you plot
Uncompressed PCM .wav .w64 .caf .aiff .aif .aifc .au .snd The samples exactly as stored.
Lossless compressed .flac, ALAC in .m4a or .caf The original samples, reconstructed bit for bit.
Lossy compressed .mp3 .mp2 .aac .opus .ogg, AAC in .m4a What the decoder reconstructs — the encoder's output, not the studio master.

Channels and the x-axis

Channels become traces: stereo files give Left and Right, others give Channel 1, Channel 2 and so on.

The file's sample rate is applied to the x-axis automatically, so audio plots against seconds. The browser shows the rate beside the index row, for example @ 48000Hz. Edit it like any other transform — see X-axis transforms.

What the samples are measured in

Refract plots audio in the units the file actually carries rather than normalising everything to ±1.0. Which units those are depends on how the samples were stored, and the sample type shown in the browser tells you which case you have.

Audio file any of the 15 formats 16- or 32-bit integer PCM keeps its width — a 16-bit WAV spans −32768…32767, not ±1.0 8- or 24-bit PCM no type of that width exists, so it is read as float32 Compressed — MP3, AAC, ALAC, FLAC, Opus no PCM type in the container; float32 is what the decoder emits
Only integer PCM has a width to keep; everything else arrives as float32.

Autoscale handles the difference, so you rarely have to think about it — but it is worth knowing when you compare two files, or write a formula that mixes them. See Sample types.

Not supported

WMA and Ogg Vorbis have no decoder on macOS, and AC-3 fails part-way through. Refract does not claim them, so the open panel greys them out rather than accepting the file and failing later. .ogg is accepted, for the Opus that macOS decodes.

Note

A raw .aac file, or an MP3 written without a Xing/LAME header, carries no way to describe the encoder's priming samples, so it decodes a fraction of a second longer than the audio it holds, with near-silence at the front. That is the format, not a fault in the file — the same audio in an .m4a, or an MP3 from a well-behaved encoder, starts exactly where it should.

Sample types

Every signal carries the type its source declared, one of ten:

KindTypes
Floatfloat32 float64
Signed integerint8 int16 int32 int64
Unsigned integeruint8 uint16 uint32 uint64

The type appears as a small tag beside the signal in the formula pane. It decides whether bitwise operators accept the signal directly: over an int32 column you can write counter & 0xFF, with no bits() needed. See Types.

SourceWhere the type comes from
CSV, TSV, TXTFloat. This is the one format that does not declare a type.
ParquetThe column's type in the file.
Arrow IPCThe schema's type for that column.
AudioThe file's PCM format. Compressed files have none to report, and declare float32.
Binary streamThe width and signedness set per field in the preset.
Refract StreamThe value type declared in the message.
Computed signalThe formula's own result — int or float, with no width.

Loading

Opening a file reads only its header, so traces appear immediately with no samples. The full parse runs in the background the first time you plot a signal or reference it in a formula; a spinner appears in the affected track.

Open file read header only names + column count Traces appear no samples yet instant, any file size first use Full parse background thread spinner in the track
Headers first; the full parse runs on first use.

The source browser

The sidebar lists every source with its traces nested underneath. Click the chevron to expand or collapse a source; the footer counts what is open.

Row markers

MarkerMeaning
Filled dotAn ordinary trace.
Hollow dotA column added by the transport, such as the HID Timestamp. Usable as an x-axis; cannot be removed.
RulerUsed as the x-axis by other traces in the source.
#The index row: the source's row-index x-axis. Not plottable.
Dot with ƒA computed signal. Dimmed when broken.
ƒ badgeAn in-place formula is applied to this trace.
Text badgeThe x-axis transform, for example × 0.001s.
Data Sources +
▾ Computed
ƒrms
ƒdrift broken
▾ run_a.csv
#index × 0.001s
voltage
current ƒ
◫timestamp × 1s
position
▾ Mouse HID
Connected
Timestamp
Report ID
dx
2 files, 1 connection
Row markers
Ordinary trace
Transport-provided column
◫Used as an x-axis
#Virtual row index
ƒComputed signal
ƒEdited in place
× 0.001sX-axis transform
position is indented under timestamp, the column it uses as its x-axis.

Traces using a custom x-axis are indented beneath the trace providing it. RefractIO connections group their traces by table.

Selecting

  • Click a trace to select it, or a source header to select all of its traces.
  • ⌘-click toggles; ⇧-click extends.
  • ⌘A selects everything visible; Esc clears the selection.

Keyboard navigation

KeyAction
↑ ↓Move through sources and traces.
⇧↑ ⇧↓Extend the selection.
>Plot the selection on a new track.
⌘⌫Close the selected sources.
EscClear the selection.

Dragging

  • Drag a trace to a track, to Add Track, or onto another trace to assign an x-axis.
  • Drag a source header to move all of its traces at once.
  • Dragging with several rows selected moves the whole selection.
  • Dragging a signal from one track to another moves it rather than copying it.
  • Dragging a file's row out of the window moves the file itself — see Moving a file to another window.

Context menus

On a source: Show in Finder (files); Edit Connection…, View Raw Stream, Clear Buffer and Reconnect (connections); Close.

On a trace: Edit Formula…, Reset to Loaded Values, Set X-Axis Transform…, Remove as X-Axis, Reset X-Axis to Index, and Delete for computed signals. Double-clicking a trace opens the formula pane.

Moving a file to another window

Refract opens as many windows as you like — File → New Window (⌘N). Each one keeps its own sources, tracks and viewport, which is how you compare two runs side by side without stacking them on the same axis.

A file that landed in the wrong window does not have to be closed and reopened. Drag its row out of the source browser and drop it on another window: the file opens there and closes here.

Window 1 DATA SOURCES run_a.csv audio.wav its traces leave with it Drag opens there, closes here Window 2 DATA SOURCES run_a.csv run_b.csv dropped on a track, they plot on arrival
A move, not a copy — one file, in the window you want it.

Where you drop it

Drop targetResult
A trackThe file opens and its traces are plotted on that track.
Add TrackThe file opens and its traces are plotted on a new track.
Anywhere elseThe file opens in the source browser, with nothing plotted yet.

What moves

  • Whole files only. Drag a source header, or a trace row inside a source whose rows are all selected. A drag that covers only part of a file has nothing to move — there is no way to open half a file elsewhere.
  • Multi-selection moves every file the selection covers entirely. A file with only some of its traces selected stays where it is.
  • Connections and computed signals stay put. Neither has a file to reopen in the other window.
  • A file the destination already has open is not opened twice, but it still leaves the window it came from.
  • Dropping a file back in the window it came from does nothing.
Plan limit

The open-file limit is per window. A file the destination cannot accept stays in the window it came from rather than vanishing from the app. See Plans & limits.

Closing a source

Click × on the source row, use the context menu, or press ⌘⌫.

Closing removes the source's signals from every track. Closing a connection also stops it. Any computed signal that depended on the source is marked broken and stops drawing.