1j01 / midi-recorder

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

Chrome browser often crashes (Should stress test recording) #18

Open 1j01 opened 2 years ago

1j01 commented 2 years ago

I've noticed that Chrome likes to crash a lot when doing long recordings, but I'm not sure how much of that is due to memory usage. It would be good to investigate this directly, using memory profiling, and test data. I have a demo mode, accessed with demo() in the console, but I suspect this may be a bug in Chrome's MIDI handling rather than a memory usage problem, since it's not just the tab that crashes, but the entire browser. (That said it could be a combination of things somehow, and it would be cool if the app could use the chunk storage feature (currently only for backup) to create arbitrarily long recordings; the problem is in reconstructing them; it'd need a streaming download, which there are new APIs for, but the MIDI file library probably doesn't support.)

1j01 commented 8 months ago

This browser crashing behavior is frustrating, not because it crashes the entire browser, but because it almost exclusively occurs when 1. I'm not looking, and thus don't notice that it's no longer recording, and 2. I'm really getting into it, playing my heart out — characteristic of a longer recording session with more notes, perhaps. The idea that my best work is not recorded (even if I narrativize or recharacterize it after the fact to some extent) takes a psychological toll.

My best music occurs when I'm not thinking about recording even a little bit, which is part of why I created this tool. Thus, occasionally I lose especially good work by not checking if recording is working. Occasionally it fails to connect to the MIDI device and needs a page refresh, or my computer will simply be off, but more often these days (since I've created this app and almost always have it running), I lose work due to Chrome crashing.

I try to remind myself that I haven't actually been sharing my music with the world, and that the utility of recording is contingent upon that future sharing (and curation) and possibly further use in music production. (I wonder if I start sharing my music, if that will change how I feel. Will I lose the respite of this recontextualization?)

I also try to remind myself that I have a very nice recording recovery feature — which I've made heavy use of! Somehow I keep forgetting about it and still have a minor heart attack when I find Chrome has crashed after I've played something truly beautiful. But it can't recover the tail end of recordings, and I'd have to listen back to hear how much is saved, and (impossible to fully know) how much is lost. And I don't usually want to do that, as it's rather sad to think about, and I would rather try to enjoy what I had just played, or try to move on and play on, although often instead I'll try to imitate what I played, futilely, and the self-consciousness inherent in an attempt at self-imitation, if not the defeated mood after losing such a work the first time around, makes it, well, fall apart.

I've never known a MIDI recording setup that provides for true peace of mind. The "remember to hit record" paradigm caused me more anguish than this crashing ever did! Not least because it probably made me feel stupid every time, ha! Now I can blame Google — most of the time.