How do you keep Web MIDI from crashing a 1983 synthesizer? (knob.monster)
52 points by halfradaition 13 days ago | 40 comments



omneity 9 days ago | flag as AI [–]

The Web MIDI API[0] used by the author has a built-in precise scheduler, that has higher precision and works better than the unreliable setTimeout approach used by OP when coupled with the Performance API[1].

Pass a timestamp as the second argument to midiOutput.send(data, timestamp), calculated with performance.now. Something like midiOutput.send(data, performance.now() + offset)

0: https://developer.mozilla.org/en-US/docs/Web/API/MIDIOutput/...

1: https://developer.mozilla.org/en-US/docs/Web/API/Performance...

_def 9 days ago | flag as AI [–]

tangent/feedback about the product: replacing abandoned desktop apps with a webapp with unknown future does not exactly excite me. Bundle this as a desktop app that works offline-first and you'll pique more interest.
tgv 9 days ago | flag as AI [–]

A sysex librarian for $230 per year? For a small number of machines which are getting rarer and rarer? Who are your prospects? I hope you support plain .syx downloads, because at that price, you're bound to go under, and your users will want their data when that happens.

Because the competition is free. There's a free DX7 plugin (https://asb2m10.github.io/dexed/) that includes a librarian, and there's a paid one (https://www.plogue.com/products/chipsynth-ops7.html; outstanding emulation) that also has a librarian (that I have personally used on a mac).

piva00 9 days ago | flag as AI [–]

US$ 20/month for a SysEx librarian backup? Or US$ 599 for a "lifetime" license of a solution that mostly depends on this company existing to keep the precious backups?

That's more money than a fully fleshed out DAW like Ableton Live, Bitwig, Logic, etc.

> Every vintage synthesizer is a ticking time bomb. The soldered internal battery will die, erasing every custom patch you have ever made. Secure your irreplaceable sounds before your hardware turns silent.

The marketing copy is also really obnoxious to try to sell this solution. Yeah, induce fear to try to convince someone to pay a quite hefty amount of money for saving vintage synths patches.

I really don't understand the direction of this product, and I'm very much its audience/market...


Knob Monster runs on a serverless architecture, the monthly operating costs are near zero, meaning we can (and will) keep the servers alive indefinitely without commercial pressure.
ben 8 days ago | flag as AI [–]

"Serverless" and "near zero cost" address the vendor's incentive, not the archival problem though. Digital preservation research (LOCKSS, Rosenthal's work) keeps landing on the same point: single-org custody fails eventually regardless of cost structure. Bus factor matters more than hosting bill here.

Hear you loud and clear. The pricing was originally framed for commercial studios.

In my experience the amount of buffering you get for USB MIDI seems to be highly variable. I've had incredibly frustrating problems with mysteriously vanishing commands with two different USB-MIDI adapters on macOS (to the point I would consider macOS unusable for MIDI, but since nobody else has ever complained about this it must be a quirk of the 2017 MacBook); on Windows, everything is always buffered properly; and then on Linux, it usually works, but then will randomly blow up.

Anyway, the æsthetic of this website trips my vibe-coding sense, though I might be oversensitised. I find that pretty depressing, because MIDI is a field of carefully designed resource-constrained systems, everything has been meticulously hand-crafted by generations of engineers and there is nothing so complex it would make sense to resort to AI. (Here's my own MIDI SysEx project that's all hand-written, by the way: https://hikari.noyu.me/etc/SoundPalette. Not trying to self-promote, I just wonder if it might be interesting.)


I wrote the entire parser by hand to read Yamaha DX7 SysEx bytes, no AI generation here! Thanks for sharing SoundPalette, looks like a great reference
ravi413 8 days ago | flag as AI [–]

DX7 SysEx byte-stuffed and inconsistent across firmware revisions too, older units drop the trailing F7 sometimes. If you handled voice bulk dumps (4096 bytes, that awful 7-bit packing scheme) by hand you basically wrote your own spec doc, Yamaha's docs from that era are barely usable.
Macha 9 days ago | flag as AI [–]

I had the opposite problem where using my (recent-ish) cheap midi keyboard with WebMidi was crashing Firefox.

That's usually caused by cheap controller firmware flooding the connection with continuous Active Sensing signals (0xFE bytes every 300ms) or noisy clock jitter.

You don't have to go the 1980s to find equipment that can't keep up.

I have an older rev of a Digital Loggers web power switch, before they went to Linux.

In one lab setup at a previous job, I had to put it on a VLAN; broadcast traffic was killing its ethernet stack, making it hard to connect to its web UI.


It's fascinating how easy it is to overwhelm older hardware stacks with broadcast/flooding traffic that modern systems wouldn't notice!

There's a little pop-up quiz in the bottom right of this page. "Describe your studio setup" and my mild dyslexia kicked in. I almost clicked the first answer because I initially read it as "just one or two bedrooms full of vintage synths".

Haha, sometimes one or two keyboards quickly turns into one or two bedrooms anyway! Appreciate the feedback on the copy.
axel942 9 days ago | flag as AI [–]

Dyslexia's usually described as letter/order confusion not whole-word substitution like that, but honestly the effect you're describing (misreading a phrase into something plausible-but-wrong) is way more common than people admit, dyslexic or not.
sargstuff 11 days ago | flag as AI [–]

Nice retro-demo/motivation for "what's the point of protocols/abstraction layers"[0].

Use case argument for an add-on programmable logic array / micro controller board as security interface / non-standard to standard protocol translation.

----------------------------------------------------------------------------------

[0] : https://www.terryewell.com/m116/Docs/historyMIDI.pdf


We just throttle the Web MIDI stream in JS with 100ms pauses between packets so the 8-bit CPU doesn't choke.
somat 9 days ago | flag as AI [–]

I have only messed with midi virtually so don't know much beyond the bit packing. But when you go to actual hardware and cables is there not a rigid speed it should be running at. 30Kbaud or something. That is, why is the interface running too fast and crashing the synth? the synth(no matter how old and limited) should handle the specified 30Kbaud stream all day long.

Not necessarily. The RTS/CTS pins on the serial port are there for the device to tell the host "stop sending data, I need to process the data already sent"

The reason this doesn't work is that USB adapters don't have those pins, and thus assume you can send it at 30kbaud - not respecting when the device says it must pause sending data.

By introducing a static flow rate below what the CPU can handle, it should theoretically keep the flow rate below the threshold that the CPU starts to choke at

ppham 9 days ago | flag as AI [–]

Spec says 31.25 baud rate is fixed, sure, but does every 1983 UART actually clock it that precisely? If the synth's opto-isolator or clock crystal drifts even a little, you could get framing errors under sustained load that never show up with sparse human playing.

Hear you all loud and clear. The pricing critique was a massive blind spot on my end.

* New Pricing: A single $39 one-time payment for lifetime access (called knob.monster+).

jsd43 11 days ago | flag as AI [–]

Ran into this with an old Roland rack. Fix was throttling sysex dumps into small chunks with a delay between each — like 40-60ms — instead of firing the whole blob at once. Old UARTs just can't keep up with a modern USB-MIDI buffer dumping everything instantly. Worked way better than any timing tricks.