10 ms·
You can hook your MIDI keyboard up to a website with Firefox 108
- ilyt 4y agoI remember some Eurorack module used Web MIDI in it's configuration app. It wasn't a pleasant experience back then. Apple removing it is weird considering the platform prevalence with musicians...
- dagmx 4y agoI believe it was removed because of the high risk of fingerprinting and inability to safeguard it from sending malicious data to devices (some devices do firmware updates over MIDI)
- smoldesu 4y agoEverything that updates firmware over MIDI should have an explicit "update" mode on the hardware itself. No MIDI instruments I've ever used are writable by-default. Also, fingerprinting is easy to avoid here. Firefox leaves MIDI off entirely until you opt-in to avoid random websites picking it up. Safari could do the same, presumably.
- jacquesm 4y agoIndeed, small problem: the opt-in dialog box doesn't appear, so for now no luck.
- deleted 4y ago[deleted]
- brudgers 4y agoI don’t doubt your experience. Firmware over midi was not uncommon for older equipment because the alternative was swapping out EPROMs if the instrument did not have an FD drive…and around Y2K, unavailability of older chips could mean replacing sockets or going without (so mostly going without).
- dagmx 4y agoI forget the exact device model because it’s been a decade plus, but I definitely did have a device that was upgraded over MIDI without requiring a separate mode. That is definitely an issue with the device, but I don’t know how common or uncommon that is for much older equipment
- ta988 4y agoEvery MIDI device I own (all less than 10yo can take updates over MIDI) and two of them use webmidi (or a standalone program) for it.
- SeanLuke 4y agoMost Waldorf synthesizers are updated just by sending MIDI sysex to them. The same goes for nearly all DSI/Sequential machines, as well as M-Audio and Novation, among many other manufacturers.
- smoldesu 4y agoSure, but if you're using your DX7 to control MIDI through Firefox I think you'd be aware of those pitfalls.
- bzzzt 4y agoThose are a bit more modern devices which have enough memory they could (an probably do) use a signed firmware image so it's not possible to brick them by flashing random garbage to the eeprom.
- deleted 4y ago[deleted]
- SeanLuke 4y agoWaldorf's been doing this since at least the Microwave II/XT, circa 1997. Not positive they had the memory to avoid bricking at that time.
- pifm_guy 4y agoApple has a top down mandate to make sure the web platform can't replace too many desktop apps. So far, it's working. Chromebooks have not taken over the world.
- sdfhbdf 4y agoCitation needed. Chromebooks seem to be working for the edu sector.
- jeroenhd 4y agoNot just that, with people who have used smartphones and Chromebook all their lives now leaving college they're also slowly starting to pick up steam outside education. They're also often exceptional deals for the low end of laptops (sub 200 dollar range) because Windows and its bloat make those laptops even worse to use. I'd never recommend any laptop that cheap unless someone has no meaningful way to save up, but this segment is very much still alive. Honestly, I'm surprised the unification of smartphone and laptop hasn't reached those circles yet. A mid range phone and a cheap laptop shell that you can slide the phone into are a much better deal than a cheap laptop and a cheap phone. Samsung's DeX, for example, is fully competitive with ChromeOS and even most basic Windows use cases.
- kristianp 4y agoWhat cheap laptop shell are you using? I've plugged my old phone into my usb-c monitor and the attached wireless mouse and keyboard just worked.
- BuckyBeaver 4y agoMotorola tried this over a decade ago. The product was called the Atrix: https://www.businessinsider.com/motorola-atrix-4g-review-2011-2 https://www.businessinsider.com/motorola-atrix-4g-review-201...
- kreddor 4y agoThey're still kinda doing it: https://www.motorola.com/us/ready-for/p https://www.motorola.com/us/ready-for/p
- jonchang 4y agoIt's because of fingerprinting. See https://webkit.org/tracking-prevention/#anti-fingerprinting https://webkit.org/tracking-prevention/#anti-fingerprinting for the official standards position.
- schemescape 4y agoCould it just be hidden behind a prompt to enable it on a given site? I feel like they’re just using fingerprinting as an excuse to not implement functionality that people want. Of course, I don’t really understand the problem space, so it’s likely I’m missing something.
- throwntoday 4y ago> I feel like they’re just using fingerprinting as an excuse to not implement functionality that people want. Do you actually believe this? Do you not default to more practical explinations like, maybe they don't consider it worthwhile to support because of engineering cost vs people that actually use it? For example, I'd say 9/10 people I know who aren't tech literate have no idea the Health app exists on their iPhone. This includes people with Apple watches. Similarly it should be obvious that basically nobody ever knew about or used that one feature you liked.
- schemescape 4y agoI think engineering/support cost might be an excellent argument against implementing MIDI support in a browser, but the claim I responded to was that MIDI support wasn't on the table due to fingerprinting concerns (which are not obviously well-founded, from my outsider's perspective). When I said "functionality that people want", I didn't mean to imply that there was a critical mass of people that made MIDI support in a browser obviously worthwhile, I just meant that some people want it and they're being told it won't happen because of fingerprinting.
- zarzavat 4y agoWhen you make a web browser engine, you don't get to choose whether a use case is marginal or not (FWIW I use WebMIDI frequently in Chrome). You implement the standards or you perish. Nobody wants a web browser that "chooses" not to work on some % of websites. Users choose, browsers implement. They are welcome to gate this feature behind a per-site permission prompt if they think it's insecure.
- rektide 4y agoIt's such a cool capability. Adds so much creative possibility. Huzzah. I hope some day we get to a WebMIDI 2.0, to expose some of the many many new super-rad features in MIDI 2.0. This want iconifies a lot for me, as sensible & highly desireable straighforwardhish follow-up I have little expectation we'll see anytime soon. I generally love the web platform, find it does a solid job, has decent API shape & decisions. Stuff gets made, & pretty well. But there's definitely a dearth of spec workers & browser maintainers out there to pitch in after the first drops, especially after some 1.0 implementations make it out the door. Just like in normal software development, there's a budget for new development, but maintenance & improvement can be severely lacking. Attention for what we have, tlc, is sparser than the places where new things happen. WebMIDI is alas one of these great worthy & amazing specs that at some point we need to re-up, come around to again, and I want so much to imagine that happening. I feel like WebShare (and Target) was another great example- lots of really good improvements asked for in issues, growing potential, but the interest from the top has moved on.
- jacquesm 4y agoThere are lots of really nice tools out there using WebMIDI, sequencers, drum machines, synths etc.
- lproven 4y agoAnother one of mine -- thanks, @LinuxBender!
- LinuxBender 4y agoIt's a good article. I think you inspired some people to dig out some of their instruments.
- lproven 4y agoCheers! I would love it if that happened. :-)
- SaintGhurka 4y agoI have a Casio 101 keyboard that I bought in 1987 and a $15 MIDI-to-USB cable. It's hard to describe how satisfying it is to see it continue to work as an input device for a computer manufactured in 2022.
- abruzzi 4y agoI love that a protocol from 1983 is still in very active use. Either it was very well thought out, or the userbase has very limited needs. (actually a little of both.)
- brudgers 4y agoIt is also the domain is limited. I mean a piano only has 88 keys and a few pedals and there are maybe 8 octaves or so in Common Practice. And MIDI also has SYSEX to handle arbitrary data.
- cramjabsyn 4y agoAnd CCs to handle faders and knobs. And PC to handle patch recall. And separate rx/tx busses. And ability to carry clock. And support for 16 simultaneous channels. Yeah it’s actually really well thought out I’d say
- adw 4y agoDave Smith, may he rest in peace, and Ikutaro Kakehashi deserve all of the flowers. https://www.grammy.com/news/technical-grammy-award-ikutaro-kakehashi-and-dave-smith https://www.grammy.com/news/technical-grammy-award-ikutaro-k... Dave was a brilliant designer, both analogue and digital, but not so great a businessperson; his company, Sequential, who made some of the most beloved electronic instruments - not least the Prophet series - went bankrupt and Yamaha bought the name. Dave went to work for Yamaha and Korg, and then Seer Systems, where he designed the first ever “soft synth” (professional-standard PC synthesiser plugin), Reality. He had all of the acclaim, and I’m sure he did OK, but he did not have the financial success the quality of his work deserved. Nevertheless, he then founded Dave Smith Instruments, maybe the start of the analogue synth revival (which is going gangbusters now; Eurorack is the coolest hardware hacking scene on the planet). DSi did pretty well, which was great, but here’s what really reveals how beloved Dave was; his old friend Ikutaro had a word with his friend, the president of Yamaha, and more or less asked; “we all love Dave. You’re not using the Sequential name. How about it?” and Yamaha went… “you, know, yeah” and gave him the Sequential name - which still had significant brand equity - for free. Seriously: https://www.sequential.com/2015/01/sequential-back/ https://www.sequential.com/2015/01/sequential-back/ > Instrumental in restoring the Sequential name was Roland’s Founder, Ikutaro Kakehashi, a longtime colleague and friend of Smith’s. “I feel that it’s important to get rid of unnecessary conflict among electronic musical instrument companies,” said Kakehashi. “That is exactly the spirit of MIDI. For this reason, I personally recommended that the President of Yamaha, Mr. Nakata, return the rights to the Sequential name to Dave Smith. And I’m glad to see such a wonderful result—a new product with the Sequential name.” And in 2021, he sold now-Sequential again under much happier circumstances; $24m to the well-regarded British gear manufacturer Focusrite. The music gear industry has more than its share of villains - google Uli Behringer sometime - but Dave and Ikutaro were real ones, and the best parts of the industry (including the big Japanese manufacturers, Korg, Roland/Boss, and Yamaha) move in their spirit. And a large part of that is because of the existence of MIDI.
- jacquesm 4y agoThis is really good news, finally I can stop telling users of pianojacq.com that they have to use Chrome or jump through all kinds of hoops to make this work on FF. Will test this out soon and change the code if necessary to make it work. Edit: see other comment in this thread, no dice for now :( I'll have to do some more digging as to why it doesn't work.
- TheRealPomax 4y agoTo be fair, those "hoops" were "install JazzMIDI", which as far as hoops go, was a pretty non-hoop.
- notatoad 4y agoit is if you're on a computer you can't install things on
- jacquesm 4y agoYou'd be surprised how many people consider installing a plug-in for their browser to be an insurmountable obstacle.
- TheRealPomax 4y agoNot really, but if you're taking a class, "install this plugin before we go on" is the same level of insurmountable as "please install vs code so that we're all using the same editor even if you have a different preferred editor".
- jcelerier 4y ago> Not really, but if you're taking a class, "install this plugin before we go on" is the same level of insurmountable as "please install vs code so that we're all using the same editor even if you have a different preferred editor". and as someone who sometimes have people installing VS Code as part of classroom settings, I can tell you that this can easily become a 2 hours ordeal + some help mails after the class when you have 30 students who are entirely computer-illiterate
- cassepipe 4y agoYay! And now pianojacq.com from HN member will work in Firefox! I can now uninstall chromium.
- jacquesm 4y ago:) Already on it... I will likely have to tweak the startup code a bit, look for an update tomorrow. Edit: Ok, just tried it after upgrading FF, it doesn't work at all when used locally ("secure context required", as if there is anything more secure than using a local file...), and when using it on the server it does get past the initialization but the device list isn't populated, so whatever they are doing it isn't 100% compatible with the way Chrome does it. I'll have to do some more digging, sorry! Edit2: We're not quite there yet it seems: https://bugzilla.mozilla.org/show_bug.cgi?id=1805582 https://bugzilla.mozilla.org/show_bug.cgi?id=1805582 The 'expected behavior' would be that the permissions dialog pops up but it doesn't so for now we'll have to wait until that is fixed. Pity, but it's very close now.
- cassepipe 4y agoSorry, somehow I figured it would just work. Thanks for giving it another try ! By the way, where do you get your MIDI files from ?
- jacquesm 4y agoI either make the MIDI files myself or find them online. My workflows for making them: - either painstakingly transcribe a piece note-for note using midieditor or - find a youtube video of a good rendition - download as MP3 - convert to midi using https://piano-scribe.glitch.me/ https://piano-scribe.glitch.me/ (I wrote my own software for this step but Piano Scribe is about 8% better even if it is slower so I use that now) - fix up the output using midieditor (still takes a lot of time, but it's quicker than starting from nothing) This even works well when you have no score. Best of luck! If you have a problematic file drop me an email.
- neurostimulant 4y agoHave you tried plugging the midi device *before* opening Firefox?
- kgwxd 4y agoLatency feels pretty bad for all the sites I could get it to work using an MPK Mini II.
- jacquesm 4y agoDoes it work on pianojacq.com for you? I can't get it to work for me and I'm wondering if I could make some kind of workaround.
- kgwxd 4y agoYesterday I couldn't figure out how to get it to work, or even what was supposed to happen, but today I hooked up my controller, restarted the browser (learned that's necessary yesterday), opened settings which by default was set to "Input: Blank" and "Output: MPKMINI2", switched it to "Input: MPKMINI2" and "Output: BUILTIN AUDIO" and I can now play along with the notes step by step. It's really fun actually :)
- tekstar 4y agoThe WebMIDI standard has a problem, which is that only the main UI thread can talk to the WebMIDI devices directly. So even if you schedule your MIDI messages in the audio thread, to emit them on the hardware device you need to pass them to the main thread and then emit the messages from there, incurring whatever delays imposed by the main thread as it handles user input
- jacquesm 4y agoYou can do this fairly rapidly, as long as the tab has enough cycles at its disposal. The real problems start when you try to do a lot of display, computation and other interaction at the same time.
- luckydata 4y agoCan't wait until I can use Melodics in a browser, it would make it possible to use a raspberry pi or a cheap chromebox to run the app on a TV screen in my drum shed to practice. Check it out, it's https://www.melodics.com/ https://www.melodics.com/ and I'm not affiliated in any way, I just hope I catch the eye of the devs and they indulge me :)
- airbreather 4y agoso does this mean I can easily use my novation launchpad as a macro keyboard?
- kristianp 4y agoYou might have to write an extension for that!
- LegitShady 4y agoif you dont mind autohotkey, people have made both midi in and out. I used to use AHK midi keyboard for some macros but ended up not liking it in the long run.
- trbleclef 4y agoFinally... I have had to use Chrome in my classroom because of the ease with which MIDI works. This is great!
- DiabloD3 4y agoIf only we could get native side tabs, like all other sane browsers have.
- TheRealPomax 4y agoYou mean the thing you install an addon for, because there is literally no reason to make that a built-in function when there's a perfectly good addon for it?
- jacquesm 4y agoWhich occupies twice the space because the unusable tabs at the top remain.
- DiabloD3 4y agoThe standard reply to this complaint is "use chrome.css", which sure, you and I can... but Mozilla has repeatedly threatened to remove support for it altogether. I don't even have to write the css, I can just use https://github.com/ranmaru22/firefox-vertical-tabs https://github.com/ranmaru22/firefox-vertical-tabs, but in Edge, I can just select the option... not install an extension, click things in a hidden page, make a directory deep in $APPDATA, put a CSS file in that directory, and then also paste more CSS into said extension's custom CSS field, then restart browser.
- TheRealPomax 4y agoYou're already clearly a power user: hardly a chore to google a solution here? This is so far outside of normal browser needs that having to set an about:config value is kind of... just fine?
- DiabloD3 4y agoExtension for required core functionality is surface area for an exploitable security issue. The Edge development team has been adding features to their browser just to limit that surface area: don't need extensions if its built in.
- cramjabsyn 4y agoNovation has a pretty impressive web midi implementation used for managing the configuration on some of their controllers and synths. nice to see that becoming a thing outside chrome
- TheRealPomax 4y agoNow if only they made one that wasn't web based. If I want to configure my LaunchKey on desktop, I'm still stuck with a huge electron app instead of a normal config application.
- nohankyou 4y agoThis is the same for the Nektar Pacer, the physical interface is a bit of work to get through, but someone made an amazing web midi configuration tool allowing complex configurations to be made or transferred between units.
- DantesKite 4y agoWhat does this mean in practice? That I’d be able to play a web app written in JavaScript with my piano? Cause that’s pretty cool.
- freeone3000 4y agoAnd from! A webpage can act as a sequencer for local playback or DAW import.
- TheRealPomax 4y agoIt took SO long to get to this point, including several years of SysEx discussion, and an absolutely horrendous new addon concept that would have opened the door to Google and Microsoft going "well if Firefox is doing this, so can we" that thankfully got ditched entirely in favour of the model that's in place now. It only took <checks bugzilla> over a decade, but we now finally, FINALLY, have proper midi support in Firefox. And in the mean time, Chrome has had midi support for over 7 years now. Did Firefox do it better? Probably. Should it have taken this long? No. Not even remotely. The whole SysEx nonsense discussion alone took up literal years.
- notatoad 4y agoare midi keyboards something special, or does this mean firefox relaxing it's hardware policy? last i checked bugzilla entries for implementing WebSerial and WebUSB were closed with the explanation that firefox believed it was harmful for web browsers to interact with hardware. edit: nope, looks like their position is still the same >Such an API would bridge the web and the physical world... Exposing that sort of capability to the web without adequate safeguards presents a significant threat to those devices. https://mozilla.github.io/standards-positions/#webserial https://mozilla.github.io/standards-positions/#webserial
- adw 4y agohttps://twitter.com/adambroach/status/1582854151196721152 https://twitter.com/adambroach/status/1582854151196721152 I love what MIDI has given us, but MIDI devices are not designed for adversarial environments. I absolutely would want this to be mandatory opt-in (per session every single time) at the very least.
- cpeterso 4y agoFingerprinting of WebMIDI devices is already happening in the wild. It was discovered because Firefox prompted for WebMIDI access on some random e-commerce websites, whereas Chrome silently allowed websites to access MIDI devices. https://twitter.com/denschub/status/1582730985778556931 https://twitter.com/denschub/status/1582730985778556931
- userbinator 4y agoDefinitely another feature that should be put behind a whitelist.
- sfink 4y agoWhitelists/allowlists are tricky, because they create a bias towards existing, larger players. If you're creating some new gadget, you now have to convince the browser makers to allow it through. And the browser makers need to come up with some way to have a level of confidence that requesters are not just trojan horse manufacturers. Or so lax on security that a rogue website can use your USB connection to reprogram the device's firmware to emulate an ethernet device that will MitM your network. You can let the user accept new entries, but then you're back having to give random nontechnical people enough context and information to make the correct choice when a random website causes the permission dialog to appear. Empirically, that doesn't go too well.
- tgv 4y agoThere's so little reason to allow a browser to access USB.
- hutzlibu 4y agoThere are many legitimate reasons for webapps to do so, like game controller for games (or programming usb connected robots), sensors, or like in this case, connect a synthesizer to it, but little reason to allow random websites to have that. I just would wish, there was a more clear distinction between them. I think the connection from the browser vendors to the ad companies are not helping with that.
- franky47 4y agoAside from the music applications, MIDI is a great protocol to tinker with for beginners who wish to exchange data between a microcontroller [1] and a computer, because of its simplicity. [1] https://github.com/FortySevenEffects/arduino_midi_library https://github.com/FortySevenEffects/arduino_midi_library
- hulitu 4y agoOh the irony: "The last new version of Firefox for 2022 is out on Mozilla's FTP server" But firefox droped ftp, didn't it ?
- joewalker 4y agoFirefox, Chrome and Safari all dropped support for FTP. I suspect the Register is referring to the domain name of the server rather than the protocol: https://ftp.mozilla.org/pub/firefox/releases/108.0/ https://ftp.mozilla.org/pub/firefox/releases/108.0/ Clearly the domain name is there for historical reasons.
- frankzander 4y agoCan anyone explain to me, what's cool on web midi? I me for me it's totally useless. I have a lot of sequencer, synth and midi help plugins in the DAW ... what does a JS interface to the web offers other than the next 100th "I just wrote a little useless javascript music script"-show HN posts? For me it doesn't solve any problem or satisfy any need. It's just another other thing almost nobody uses in the browser.
- petepete 4y agoDoes nobody do it because support's only just been added? Could it be the next step in collaborative remote music making?
- frankzander 4y agoCollaborative music making is IMHO more than pushing midi events around. And TBH this is nowadays fully possible but AFAIK not in real time.
- rurtrack 4y agoIt is fully possible, as I've built such app. Marketing is tricky, but 2023 looks like a great year for my product. Working hard for it :) nice to see these kind of talks, it's inspiring
- frankzander 4y agoWell good luck with that. I doubt that you can beat 15ms line latency to at least 5ms ;-)
- rurtrack 4y agoThe way I've built my app, gets rid of latency altogether. Simply ceases to be an issue. It is a big bet, long road ahead of me
- terlisimo 4y ago
- Am4TIfIsER0ppos 4y agoI'm so glad we lost XUL so we could get this essential feature!
- danShumway 4y agoI'm excited to see where this goes, but last time I played around with MIDI in Chrome I remember the latency being kind of terrible (could just be my computer setup or the apps being poorly optimized). Even ignoring MIDI, audio worklets in browsers don't have perfect latency, so it makes me nervous about the potential. Are there web MIDI apps that have good enough to actually play along with or composes music in real time? Is this just an issue with my setup? Would be kind of nice to at least have this available in workers, the MDN page (https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_AP...) makes it seem like this needs to be done in the main thread.
- TheActualWalko 4y agoI'm working on a serious in-browser audio app which takes advantage of web midi! wavtool.com It has extremely good latency on Mac OS, absolutely good enough to play along with and compose music in real time.
- TheActualWalko 4y agoIf anyone would like to try this out with a pro-oriented in-browser audio app with webmidi support, I'm making one! Check out wavtool.com.