Files
orca-rs/README.md
T
bl e2e643cbc8 TUI: real colors, diff-patch rendering, centered grid resize, MIDI config
- Replace Bold/Dim attributes with explicit colors that survive light
  themes (Reverse instead of hardcoded black/white for cursor/selection).
- Only redraw cells that actually changed each frame instead of a full
  clear, and center the field within the live viewport.
- Add orca-c's ruler-snapped grid resize keys (( ) _ +) and its fancy
  ruler-frame corners, ported from tui_main.c.
- Add ~/.config/orca-rs/config.toml for a default MIDI port name.
2026-07-23 23:52:22 +02:00

96 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# orca-rs
A Rust port of [Orca-c](https://github.com/hundredrabbits/Orca-c), the livecoding
environment for procedural sequencing.
## Install
On Arch Linux:
```sh
yay -S orca-rs
```
## Build
```sh
cargo build --release
```
Requires ALSA headers on Linux (`alsa-lib`) for MIDI support.
## Run
```sh
orca-rs [options] [file.orca]
```
With no file, edits save to `untitled.orca`. A named file that doesn't exist
yet is created on first save.
| Option | Effect |
|---|---|
| `--bpm <n>` | Tempo (default 120; one tick = one 16th note) |
| `--seed <n>` | Random seed for the `R` operator |
| `--udp-port <n>` / `--udp-host <h>` | Send `;` strings over UDP (host defaults to 127.0.0.1) |
| `--osc-port <n>` / `--osc-host <h>` | Send `=` messages over OSC |
| `--no-midi` | Disable MIDI output (on by default) |
| `--midi-name <s>` | Connect to an existing MIDI port whose name contains `<s>` |
| `--list-midi` | List MIDI output ports and exit |
MIDI is on by default: orca-rs creates a virtual ALSA sequencer port named
`orca-rs`, which PipeWire exposes through its Midi-Bridge — connect it to a
synth with qpwgraph/Helvum, or find it under `wpctl status`.
A default MIDI port to connect to (instead of creating a virtual one) can be
set in `~/.config/orca-rs/config.toml`:
```toml
midi_name = "IAC Driver"
```
`--midi-name` on the command line overrides it.
There is also a headless runner, equivalent to orca-c's `cli`:
```sh
orca-cli -t 60 file.orca # simulate 60 ticks, print the grid
```
## Keys
| Key | Action |
|---|---|
| Arrow keys | Move cursor (Alt+arrows: leap by 8) |
| Shift+arrows | Grow/shrink selection |
| Ctrl+arrows | Resize grid by 1 cell |
| `(` / `)` | Resize grid width, snapped to the nearest ruler division |
| `_` / `+` | Resize grid height, snapped to the nearest ruler division |
| `0-9 a-z A-Z ! : ; = # * . ?` | Place glyph (fills selection) |
| Backspace / Delete | Erase selection |
| Space | Play / pause |
| Ctrl+F | Step one frame (while paused) |
| Ctrl+R | Reset frame counter |
| `<` / `>` | BPM 1 / +1 |
| Ctrl+Z or Ctrl+U | Undo |
| Ctrl+X / Ctrl+C / Ctrl+V | Cut / copy / paste selection |
| Ctrl+S | Save |
| Esc | Collapse selection |
| Ctrl+Q | Quit |
## Layout
- `src/sim/` — the VM: all operators, ported from orca-c's `sim.c`
- `src/tui.rs` — terminal UI (crossterm), counterpart of `tui_main.c`
- `src/io.rs` — UDP / OSC / MIDI event output
- `src/config.rs``~/.config/orca-rs/config.toml` (default MIDI port)
- `src/bin/orca-cli.rs` — headless runner, counterpart of `cli_main.c`
## Releasing
Releases are cut with [cargo-release](https://github.com/crate-ci/cargo-release)
(`cargo release patch|minor`), which bumps `Cargo.toml` and `aur/PKGBUILD` and
pushes a `v*` tag. The Gitea Actions workflow then builds x86_64 and aarch64
tarballs, attaches them to the Gitea release, and pushes the updated PKGBUILD
to the AUR. Required repo secrets: `GITEA_TOKEN`, `AUR_SSH_KEY`.