Settings

Theme

How do you keep Web MIDI from crashing a 1983 synthesizer?

knob.monster

52 points by halfradaition 5 days ago · 47 comments

Reader

omneity a day ago

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...

  • halfradaitionOP a day ago

    Brilliant suggestion. I'll test scheduling directly on the Web MIDI API thread to keep JS main thread timers out of the equation.

piva00 a day ago

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...

  • halfradaitionOP a day ago

    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.

  • halfradaitionOP a day ago

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

tgv 2 days ago

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).

  • halfradaitionOP a day ago

    Knob Monster is built on a modern serverless stack, meaning my monthly hosting and database costs are essentially zero. The platform is designed to run indefinitely with no financial overhead.

  • halfradaitionOP a day ago

    Absolutely. Your data belongs to you, we fully support standard .syx exporting at all times. Pricing is definitely getting a rework for solo producers.

_def 2 days ago

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.

  • brandonmenc 2 days ago

    Yeah, and I'm certainly not paying $20 a month - indefinitely - for it.

    • teliosix a day ago

      The pricing is totally absurd to the point I don't even want to investigate this further because the pricing is so stupid.

  • halfradaitionOP 2 days ago

    Fair point. We went web-first to bypass driver installation hell, but a local Tauri app for offline-first use is on the roadmap.

  • nl 2 days ago

    Strong disagree!

    Zero install is a huge feature both to reduce friction and to save local storage. I don't want to install yet another synth I'll use twice a year.

    • gbanfalvi 2 days ago

      You can offer standalone exes without installers.

      • nl 16 hours ago

        By zero install I mean I don't want an executable on my computer. I want it transient - available when I use it, but removed when I don't.

    • RestartKernel 2 days ago

      Implementing in native code and compiling to WASM would make for a good compromise.

    • nine_k 2 days ago

      Zero install and locally stored, as one HTML file, or as a web bundle.

    • pjmlp 2 days ago

      A long forgotten feature of desktop OS, incredible how knowledge goes lost within a lifetime.

      • nl 16 hours ago

        By zero install I mean I don't want an executable on my computer. I want it transient - available when I use it, but removed when I don't.

        • pjmlp 13 hours ago

          Easy, place it on a memory mapped volume, or shared drive mapped on request.

          There are other means, as mentioned a forgotten art.

TazeTSchnitzel 2 days ago

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.)

  • halfradaitionOP a day ago

    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

peteforde 2 days ago

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".

  • halfradaitionOP a day ago

    Haha, sometimes one or two keyboards quickly turns into one or two bedrooms anyway! Appreciate the feedback on the copy.

kazinator 2 days ago

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.

  • halfradaitionOP a day ago

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

Macha 2 days ago

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

  • halfradaitionOP 2 days ago

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

    • im3w1l 2 days ago

      That's one way to look at it, but imo firefox shouldnt crash no matter how malformed the data is.

      • tgv 2 days ago

        Also, the sensing command is one byte per 300ms. That's irritating when you have to deal with it personally in real time, but for a modern computer, that's peanuts.

      • halfradaitionOP a day ago

        Firefox shouldn't crash indeed. The crash was usually due to a memory leak in the browser's Web MIDI implementation when handling constant stream disconnects/reconnects.

somat 2 days ago

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.

  • theblazehen 2 days ago

    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

    • dezgeg a day ago

      MIDI doesn't have RTS/CTS pins...

      • theblazehen a day ago

        Well that's on me for assuming :/ I assumed that it did, based on it being explained in the blog post

      • halfradaitionOP a day ago

        dezgeg is correct, MIDI has no hardware flow control pins. The synth's serial receiver chokes because the 8-bit CPU takes too long to write the SysEx buffer to SRAM.

sargstuff 4 days ago

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

  • halfradaitionOP 3 days ago

    We just throttle the Web MIDI stream in JS with 100ms pauses between packets so the 8-bit CPU doesn't choke.

halfradaitionOP a day ago

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+).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection