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

推荐订阅源

A
About on SuperTechFans
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
宝玉的分享
宝玉的分享
美团技术团队
量子位
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
爱范儿
爱范儿
J
Java Code Geeks
博客园 - Franky
Last Week in AI
Last Week in AI
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
GbyAI
GbyAI
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
A browser music sequencer where every note is a Petri-net...
orksliver · 2026-04-30 · via Hacker News: Show HN
← Home

Live at beats.bitwrap.io. Source: github.com/stackdump/beats-bitwrap-io.

That picture is the runtime, not a render of it. Each cluster on the ring is a sub-net (kick, snare, hihat, bass, melody, plus four hit slots) with its A/B/C variants beside it; the spokes meeting at the centre are the connector places that compose the song. The audio engine is reading exactly this state to fire transitions — at any moment you're hearing one variant per slot, chosen from the denser structure on screen.

The thing I wanted to share isn't that we built a beat generator — there are plenty. It's the implementation choice underneath it: the sequencer is a Petri net executor. There is no separate timeline data structure, no event list, no "schedule note at tick N." A drum pattern is a ring of places with one token circulating; each transition fire is a note. Polyrhythm is two rings of different length sharing a tempo. Song structure is a control net that fires mute-track / unmute-track / activate-slot actions at section boundaries. Macros are short linear-chain control nets injected at runtime with a restore action on the terminal transition.

Once you commit to that, several properties fall out for free:

Deterministic by construction. Same (genre, seed) produces a byte-identical token-flow trace. We have a Go port of the JS composer that produces the same bytes; the parity test is in CI. This isn't "we test for determinism" — there isn't a non-deterministic codepath to begin with. The web worker drives the tick loop at 60000 / (BPM × PPQ) ms and the Petri net engine does the rest.

Share URLs are content-addressed. A track is a small JSON envelope (@context + genre + seed + optional overrides), canonicalized, sha-256'd, encoded as a CIDv1 in base58btc. The URL is ?cid=z…. Same canonical bytes ⇒ same CID, always. Different bytes can't pretend to be an existing one. There's also a ?cid=…&z=<base64url-gzip> form that inlines the gzipped envelope so the link works offline, from a local copy, or after the share store is purged. ~80 chars for the short form, ~1.5 kB for the self-contained form.

The visualizer is the runtime. Press M and the app turns into a Petri-net display: nine sub-nets in a ring, each showing the active variant for its slot, joined through central connector places. The visuals aren't reading the audio — they're reading the same place/transition state the audio engine is reading. Token particles pulse toward the composition core on each fire; per-panel flames ignite on every transition. It's the first time I've shipped a music tool where the thing on screen is literally the data structure making the sound.

Boring stack. No bundler, no npm install, no React. Vanilla ES modules, Tone.js from CDN, a single Go binary that serves the static files and the share store. Production has no audio renderer running — .webm renders are uploaded by listeners' browsers via PUT /audio/{cid}.webm (rate-limited, first-write-wins, hash-checked). The site doesn't transcode; it stores bytes other browsers produced.

No backend during playback. Once a share envelope arrives, every sound is generated in the listener's tab. The server's job is content addressing and feed indexing; the audio path is browser-only.

There's a /feed gallery, a Winamp-flavoured sidebar player, an Auto-DJ that picks random macros every N bars, and a regen mode that cross-fades into newly-generated tracks on a one-bar pre-render so the swap is a pointer flip with no clicks. Those are nice but they aren't the point — they're what falls out after you commit to the runtime model. The longer launch post with screenshots and details is at /posts/beats-launch-jambox.

We still haven't added a piano roll.

Things I'd be most curious to discuss:

  • Is "Petri net as canonical sequencer IR" a known pattern in computer music? I haven't seen it in the literature I've read; the closest neighbours feel like Max/MSP patcher graphs or SuperCollider proxy spaces, but those are dataflow, not place/transition.
  • The deterministic-by-construction angle: is anyone else doing music tooling where the share URL is the complete spec, not a pointer to a server-stored timeline?
  • For a content-addressed audio store: what would you do differently for serving .webm at scale beyond "stick a CDN in front"? The naive disk + nginx setup is fine until it isn't.

Code, generator, share-store sealing, and the Go/JS parity tests are all in the repo.

×

Follow on Mastodon