Live data from Hacker News

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

knob.monster

31–40 of 49 posts

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

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

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

#32
post #31

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

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

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

#33
post #27

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 s…

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

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

#34
post #23

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 (…

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

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

#35

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…

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

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

#36

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.

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

#37

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!

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

#38
post #28

Earlier quoted context omitted.

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 theoret…

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

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.

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

#39
post #14

Earlier quoted context omitted.

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

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

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.

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

#40
post #23

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 (…

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.
Post reply on HN