1j01 / midi-recorder

🎹 The easiest way to record MIDI. No install. Automatically records.
https://midi-recorder.web.app/
MIT License
77 stars 19 forks source link

Firefox #2

Closed 1j01 closed 5 years ago

1j01 commented 5 years ago

Chrome doesn't work with OBS due to hardware acceleration, so I want to use this in Firefox.

I can use Display Capture, but Window Capture would let me see the MIDI visualization in OBS while OBS is focused, without adding another monitor to my computer - and it'd be less prone to showing information I don't intend to, i.e. windows I have open while alt+tabbing.

Framegrab of me using the setup:

vlcsnap-2019-07-09-16h54m27s497

What OBS looks like if I switch to OBS:

OBS with display capture when the display i'm sharing between midi visualization and OBS

Some pics of the setup for context:

camera over electric piano on a long pole, held up with a single piece of string

head on view, and showing monitor on with video feed

It's held up with a mic holder that has a clamp end, shimmed with a scrap of cloth around the end of the PVC pole, and some bits of rubber to protect the shelf it's clamped to, and held up with a single piece of string. I happened to have a hook and a window curtain rod bulb in opportune places. The hook was way further away, but I just wrapped it around from the shorter side a second time and that balanced it out.

(Note: lighting is not good here; the open window there is not helpful, and the lamp only helps compliment the artificial (ceiling) light at night, filling in the shadows that the black keys cast.)

The Error

TypeError: elToReplaceContentOfOnError is null

erm, well that looks like an error handling error presumably there's some error behind that...

1j01 commented 5 years ago

Fixed the error handling code. Unfortunately the error message behind that error is:

Your browser doesn't support MIDI access.

Firefox doesn't support the Web MIDI API

1j01 commented 5 years ago

I tried using the Jazz-Soft Web MIDI API extension for Firefox (with dependencies), and tried restarting the browser, no luck; tried restarting the computer and launching firefox as the first thing, no luck. 😕 I saw one test page work, but most examples didn't.

Another way this OBS setup could work would be to include the midi visualization in a Browser source, and then send that page MIDI/MIDI-like events over websockets or something, since the Browser source doesn't support Web MIDI. But that'd be annoyingly contrived.

Also I could disable hardware acceleration in chrome like people suggest - it doesn't seem like a good idea in general (would make things slower), but maybe just while I'm streaming?

1j01 commented 5 years ago

For now I'm disabling hardware acceleration in chrome.