惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
T
Threatpost
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
D
Docker
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
T
Troy Hunt's Blog
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
F
Full Disclosure
B
Blog
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
博客园 - 聂微东
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
Recorded Future
Recorded Future
IT之家
IT之家
Project Zero
Project Zero
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
SecWiki News
SecWiki News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Past Tense: A DragonRuby Sound Installation Built on libpd
julianrubisc · 2026-05-19 · via DEV Community

Two to four tablets sit on plinths in a gallery. Each one is listening: a contact mic on the floor, an electromagnetic pickup near the wall, a shortwave radio scanning. A black-hole visualization fills the screen, slowly accreting whatever the room is making. Visitors swipe a circular slider and release short bursts back into the system. The bursts are fragments of the captured sound, transformed in flight by synthesizers and effects they unlock by spending time with the piece.

This is Past Tense, an idle game that's also an electroacoustic composition. (Or an electroacoustic composition that's also an idle game; the framing depends on who's asking.) I built it over the last two years on top of DragonRuby GTK, with Pure Data driving every audio sample, packaged as a single iOS app. It's been accepted to the ICMC 2026 installation showcase.

This is the first of six posts on building it. The artistic decisions came first; the engineering took six months. I want to write the engineering up because the stack is unusual, the documentation is sparse, and a few of the problems I solved would have been days shorter if someone else had written the answer down. So this is that writeup.

What it is, in one paragraph for the non-art people

A visitor walks up. The tablet is already running, has been running, will keep running. Ambient sound has been accumulating for hours. The visitor swipes the slider, releases a burst, sees and hears the burst stutter through the effects chain, and walks away. They've contributed a few seconds of intentional input to a process that runs whether they're there or not. The premise is closer to Alvin Lucier's Music for Solo Performer than to Guitar Hero: visitors nudge a self-running system rather than play it. The reference points on the game side are A Dark Room and Orb of Creation, idle games where progress accumulates with or without you, and Olli Tapio Leino's writing on "boring games."

In a racing game or a platformer, the gameness predominates: you're pulled into flow by tight feedback loops and reflexive rewards. In a boring game, the gameness recedes and what's left is the system's worldness. The absence of an objective becomes the invitation: you have to make sense of the world and decide what it means yourself. Past Tense is built on that invitation.

The technical stack

The whole thing is three runtimes glued together. DragonRuby GTK (mRuby) handles the game side: scenes, UI, sprite rendering, the per-tick game loop, the XP and tier-progression system. Pure Data, embedded via libpd, handles every audio sample: spectral analysis across four frequency bands, burst recording, the synthesis and effects chain, the feedback routing. A small custom C extension bridges the two via thread-safe ring buffers, with miniaudio doing cross-platform device I/O. The bridge is small because the contract between Ruby and Pd is small: numbers in, numbers out.

Three layers, each doing what it's best at: Ruby for state and scenes, Pd for samples, C for the bridge.

What a Pure Data patch looks like, in case you've never seen one

A Pd patch is a graph of operators ("objects") connected by wires. Audio-rate objects have a tilde in their name: osc~, dac~, *~. Control-rate objects don't. The smallest useful patch that talks to Ruby looks roughly like this:

Pure data patch receiving a frequency for a sine oscillator, and sending the signal to the speakers

The Ruby side talks to it like this:

$pd.send_float(to_receiver: "freq", value: 440)

Enter fullscreen mode Exit fullscreen mode

That's the whole contract in one direction. Ruby pushes a named value into the patch. The patch routes it through the [r freq] (receive) object to whatever it's wired to. The other direction works the same way: tap a signal with [env~], send the result through [s level], and Ruby gets it back.

Pure data patch returning RMS envelope via bus

$pd.subscribe("level")

def receive_float(args)
  receiver, value = args
  puts "level: #{value}" if receiver == "level"
end

Enter fullscreen mode Exit fullscreen mode

Most of Past Tense's ~500 lines of Pd graph is variations on this pattern at scale: one patch per band, four bands, dozens of named send/receive buses connecting Ruby's tier-progression state to live DSP parameters.

How the layers fit together

Each tick, Ruby decides what's happening (a slider moved, a tier was unlocked, a parameter needs a new value) and pushes a number into a named Pd receiver:

$pd.send_float(to_receiver: "envelope_type_256", value: 0.05)
$pd.send_float(to_receiver: "cutoff_256",        value: 2000)

Enter fullscreen mode Exit fullscreen mode

Pd performs the DSP at audio rate and pushes analysis results back through subscribed receivers:

$pd.subscribe("env_256")     # output envelope per band
$pd.subscribe("input_env")   # mic input level
$pd.subscribe("bursts_256")  # [energy, index] when a burst fires

Enter fullscreen mode Exit fullscreen mode

Ruby drains those each tick with $pd.poll. The receive_float and receive_list callbacks dispatch on the receiver name, the same way as the toy example above, just with a switch on the receiver prefix to route to game state. Ruby never touches a sample. Pd never knows about scenes or sprites. The C extension provides one thread-safe channel in each direction. Post 2 in this series goes deep on the dr-libpd internals: the FFI surface, the ring buffer between Pd's audio thread and Ruby's game loop, and how poll keeps the two clocks from running into each other.

Why Pure Data, and not the obvious alternatives

Before settling on libpd I briefly considered three alternatives.

SuperCollider has a longer DSP feature list and a more powerful language. The dealbreaker was deployment: scsynth is a separate process. Shipping a game app that has to spawn and supervise another OS process, on iOS, with sandboxing and lifecycle quirks on top, was more friction than I wanted. libpd, by contrast, runs embedded in the game process.

Csound is mature and famously precise, but the orchestra/score authoring model is verbose for live tuning. Pure Data's visual patches let me change a delay time, save the file, and hear the difference in the running app within seconds. That iteration speed mattered more than Csound's depth.

Faust was the closest call. It's a DSP language that compiles to C++ (or wasm, or LLVM), elegant, fast, and has reasonable live-coding paths via the faust2* scripts. The catch is its library catalog. Pure Data has decades of community-built abstractions for the kind of instrument-flavored building blocks this piece leans on. Faust has fewer of these prebuilt. The choice came down to "find or build what I need in Faust" vs "wire up things that already exist in Pd." Pd won.

One distinction matters for understanding why libpd specifically: in Past Tense, bursts are samples, but everything else is live. Recorded bursts are short WAV files written by Pd's soundfiler and read back during playback. Everything that processes them on the way out is generated in real time. Without live DSP, the piece would collapse into a sample player with effects, which is a different work. libpd is what makes the live half practical.

Where it actually runs

Each gallery station is a self-contained audio context: it accumulates and plays back its own sound material with no digital connection to the others. The only mixing happens acoustically, in the room, as separate stereo outputs overlap. A station needs a tablet, a class-compliant USB audio interface (one input with optional 48V phantom power, two outputs), a stereo loudspeaker pair pointed into the shared space, and one of the venue-dependent input sources (geophone, EM pickup, radio, or mic). The footprint is roughly 2-3 m² per station, with stations spatially separated rather than clustered. The composition runs continuously during opening hours; it has no fixed start or end.

What's coming in the rest of the series

Post 2 unpacks dr-libpd itself: ring-buffer architecture, FFI surface, and how send_float and receive_float cross the audio/game thread boundary safely.

Post 3 walks through the actual patch graph and the game-side accumulators that turn audio energy into XP and tier unlocks.

Post 4 is the audio-backend journey before miniaudio won: SDL2, OpenSL, and portaudio each lost in different ways, and DragonRuby 7 with SDL3 may rewrite the picture.

Post 5 covers the iOS port: a build that compiled, signed, launched, and silently failed to register its Ruby module, plus MA_NO_RUNTIME_LINKING, mic permissions, and audio session routing for speakers and Bluetooth.

Post 6 is the iOS sandbox vs Pure Data: writing files from a read-only bundle, plus a Pd subtlety that bit me twice about why msg set does not re-parse $n tokens at runtime.

Links go in as the posts go up.

For the artistic context behind the piece, the project page has the longer-form thinking.