4 Commits
Author SHA1 Message Date
Bendik Aagaard Lynghaug b53fdd5a6d chore: Release galdr version 0.2.4
Release / update-aur (push) Successful in 14s
Release / build (x86_64, ubuntu-latest, /sccache, x86_64-unknown-linux-gnu) (push) Successful in 14m57s
Release / build (aarch64, aarch64, /var/lib/gitea-runner/sccache, aarch64-unknown-linux-gnu) (push) Successful in 1m24s
2026-10-07 22:37:26 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 f9f06568bf audio: render only the frames PipeWire requests per cycle
The process callback filled the whole mapped buffer every cycle. PipeWire
sizes that buffer by clock.quantum-limit (8192 frames by default) while the
graph drives galdr at the 256-frame quantum we ask for, so each cycle did
~32x the work and everything past the quantum was dropped: choppy output,
constant deadline misses in pw-top, and envelopes that sounded 32x faster
than their settings. Use Buffer::requested (pipewire feature v0_3_49),
clamped to the buffer, with the --latency value as fallback.

tui: typing a glyph no longer advances the cursor to the right.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 22:37:17 +02:00
Bendik Aagaard LynghaugandClaude Opus 4.8 392ceceeff ci: no sccache install on the bare aarch64 (klokka) runner; builtin:checkout
Gate the sccache install to the ephemeral x86_64 container; on the bare klokka
runner check-and-fail (the tarball was x86_64-only, so it was a host mutation
and a wrong-arch binary). Switch checkout to v4 builtin:checkout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-28 12:39:09 +02:00
Bendik Aagaard LynghaugandClaude Opus 4.8 3bee9426f8 CI: run cargo test in the build job (gates releases, like orca-rs)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLUwWE2KmFPzhKaf67tWbx
2026-09-13 16:56:36 +02:00
6 changed files with 26 additions and 12 deletions
+14 -6
View File
@@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: builtin:checkout
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
@@ -40,11 +40,16 @@ jobs:
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "SCCACHE_DIR=${{ matrix.sccache_dir }}" >> "$GITHUB_ENV"
mkdir -p "${{ matrix.sccache_dir }}"
if ! command -v sccache >/dev/null 2>&1; then
V=0.8.2
curl -sSL "https://github.com/mozilla/sccache/releases/download/v${V}/sccache-v${V}-x86_64-unknown-linux-musl.tar.gz" | tar -xz
sudo install -m0755 "sccache-v${V}-x86_64-unknown-linux-musl/sccache" /usr/local/bin/sccache
if command -v sccache >/dev/null 2>&1; then sccache --version; exit 0; fi
# Bare runners (aarch64 = klokka host) are pre-provisioned; CI must not
# install onto them (and this tarball is x86_64-only). Only the
# ephemeral x86_64 container installs; a bare host missing it fails loud.
if [ "${{ matrix.arch }}" != x86_64 ]; then
echo "::error::sccache missing on the bare ${{ matrix.arch }} runner — provision klokka; CI must not install on bare hosts"; exit 1
fi
V=0.8.2
curl -sSL "https://github.com/mozilla/sccache/releases/download/v${V}/sccache-v${V}-x86_64-unknown-linux-musl.tar.gz" | tar -xz
sudo install -m0755 "sccache-v${V}-x86_64-unknown-linux-musl/sccache" /usr/local/bin/sccache
sccache --version
- name: Ensure build deps (libpipewire for output, alsa for MIDI, clang for bindgen)
@@ -67,6 +72,9 @@ jobs:
echo "bare runner already has libpipewire + alsa + clang"
fi
- name: Test
run: cargo test --release --locked --target ${{ matrix.target }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
@@ -120,7 +128,7 @@ jobs:
runs-on: aarch64
steps:
- uses: actions/checkout@v4
- uses: builtin:checkout
- name: Compute checksums and update PKGBUILD
run: |
Generated
+1 -1
View File
@@ -320,7 +320,7 @@ dependencies = [
[[package]]
name = "galdr"
version = "0.2.3"
version = "0.2.4"
dependencies = [
"anyhow",
"arc-swap",
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "galdr"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
description = "A terminal grid synthesizer: signal flows spatially through single-glyph unit generators, voiced by MIDI, rendered low-latency to PipeWire"
license = "MIT"
@@ -11,7 +11,7 @@ codegen-units = 1
[dependencies]
anyhow = "1"
pipewire = "0.10"
pipewire = { version = "0.10", features = ["v0_3_49"] } # Buffer::requested
midir = "0.10"
arc-swap = "1.7"
rtrb = "0.3"
+1 -1
View File
@@ -1,6 +1,6 @@
# Maintainer: Bendik Aagaard Lynghaug <bendik.lynghaug@gmail.com>
pkgname=galdr
pkgver=0.2.3
pkgver=0.2.4
pkgrel=1
pkgdesc="Terminal grid synthesizer: signal flows through single-glyph unit generators, MIDI in, low-latency PipeWire out"
arch=('x86_64' 'aarch64')
+8 -1
View File
@@ -75,6 +75,7 @@ fn run(
.add_local_listener_with_user_data(())
.process(move |stream, _| {
let Some(mut buffer) = stream.dequeue_buffer() else { return };
let requested = buffer.requested() as usize;
let datas = buffer.datas_mut();
let Some(data) = datas.first_mut() else { return };
let stride = ch * 4;
@@ -85,9 +86,15 @@ fn run(
engine.apply(ev);
}
// Render only what the graph asked for this cycle. The mapped
// buffer is sized by clock.quantum-limit (8192 frames by default),
// so filling it whole would do ~32x the work of a 256-frame
// quantum and PipeWire would drop everything past the quantum:
// choppy output and envelopes that race through their stages.
let want = if requested > 0 { requested } else { latency as usize };
let mut n_frames = 0usize;
if let Some(slice) = data.data() {
n_frames = slice.len() / stride;
n_frames = want.min(slice.len() / stride);
for f in 0..n_frames {
let smp = engine.render(&program);
let bytes = smp.to_le_bytes();
-1
View File
@@ -169,7 +169,6 @@ pub fn run(
KeyCode::Char(c) => {
grid.set(cx, cy, if c == ' ' { '.' } else { c });
edited = true;
cx = (cx + 1).min(grid.w - 1);
}
_ => {}
}