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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
C
Check Point Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
腾讯CDC
GbyAI
GbyAI
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
How do you keep Web MIDI from crashing a 1983 synthesizer?
2026-06-24 · via Hacker News

Engineering June 23, 2026

Why writing Web MIDI code for 8-bit CPUs from the 1980s is an absolute timing nightmare, and how to safely control data flows on vintage hardware directly from your browser.

Modern browsers run fast. Your system processor operates in gigahertz, handles multi-threaded operations, and loads gigabytes of data in milliseconds.

The microprocessor inside a vintage 1983 Yamaha DX7 is an 8-bit Hitachi 6305 running at a clock speed of 2 MHz, with a tiny 256-byte RAM buffer.

When you try to bridge these two eras using the modern Web MIDI API, you run headfirst into a classic retrocomputing bottleneck: buffer overflow. Send data too fast, and the synthesizer’s CPU hangs, drops packages, or corrupts the internal sound memory completely.

1. The Death of Flow Control (and the $5 Cable Problem)

In the 80s, MIDI physical hardware operated over a current loop running at 31,250 bits per second. While slow, the bandwidth was constant and predictable.

Today, most computer music setups use modern USB-to-MIDI adapters. Modern computers send USB packets at lightning-fast speeds. A cheap, bufferless adapter receives the data at high USB bandwidths, and instantly attempts to serialize and dump it down the MIDI out pin.

Because standard MIDI lacks hardware handshaking lines (no RTS/CTS pins), there's no physical way for the DX7 to tell the browser: "Hey, stop sending data, I'm writing the last preset block to SRAM right now."

To solve this in JavaScript, we have to enforce a custom software flow throttle:

// Chunking and pacing SysEx transmission arrays
async function sendSysExWithPacing(midiOutput, rawSysExBytes) {
    const CHUNK_SIZE = 256; // Limit blocks to prevent buffer floods
    const INTER_CHUNK_DELAY = 60; // Milliseconds to wait between packets

    for (let i = 0; i < rawSysExBytes.length; i += CHUNK_SIZE) {
        const chunk = rawSysExBytes.slice(i, i + CHUNK_SIZE);
        midiOutput.send(chunk);
        
        // Wait to allow the vintage 8-bit CPU to write block to EEPROM
        await new Promise(resolve => setTimeout(resolve, INTER_CHUNK_DELAY));
    }
}

2. Vendor-Specific Hex Parsers

Once you establish a reliable hardware communication link, the next hurdle is decoding the data. Back in the 80s, the MIDI spec defined how notes were triggered, but left the system exclusive (SysEx) parameter format entirely up to manufacturers.

This means every single vintage synthesizer has its own undocumented, proprietary byte structure:

  • Yamaha DX7: Spits out exactly 4104 bytes (6-byte header, 4096-byte parameter data, 1 checksum byte, 1 stop byte). The final 10 bytes of each of the 32 voice slots contain ASCII data representing the patch name.
  • Roland Juno-106: Does not even support remote dump requests. The synth only speaks when manually prompted: the user has to physically click the 'WRITE' key on the panel to stream its current patch memory.
  • Korg M1: Uses a packed 7-bit architecture. Because MIDI status bytes must have the highest bit set to 0, data words are grouped in blocks of 7, with the 8th bits unpacked and appended separately. We had to write custom bit-shifting array decoders in JS just to parse the characters.

3. Browser Security Restrictions

Because Web MIDI allows a website to flash firmware or write raw system-exclusive bytes directly to external physical USB hardware, browsers treat it with extreme security care.

Browsers like Google Chrome and Microsoft Edge require explicit user approval via permissions before allowing websites to communicate over MIDI. Safari and Firefox block the Web MIDI API entirely out of caution regarding fingerprinting and hardware injection vulnerabilities.

Instant Cloud Backups

Tired of vintage SysEx headaches?

We built knob.monster to replace dusty unsigned desktop utilities. Connect your hardware synthesizer directly to a browser tab, click back up, and organize your presets in a modern, searchable cloud library.