Hacker News new | ask | show | jobs
by Bewelge 857 days ago
This is such a cool concept, congrats on shipping!

I've been developing a webMIDI app myself for the past couple of years [0] and adding a multiplayer feature is something I've been eyeing for a while. May I ask how good the latency is?

Some feedback on the landing page:

- As others already pointed out, a video example showing the app would be really helpful.

- I think allowing visitors to try out the piano and only prompting to login when trying to access the remote features would work best

- All those buttons that are clickable/selectable but don't do anything when clicked were a little confusing.

On the app: - Connecting the keyboard worked flawlessly (and without any permission prompt). But I'd add some indication that a MIDI device is connected

- Pressing the keys using my mouse doesn't produce any sounds

- Pressing keys on my MIDI keyboard (Yamaha P120) will cause the keys to be selected indefinitely, so I can only ever press them once. Somehow the noteOff events don't seem to be getting registered. Make sure you also register noteOn events with velocity = 0 as a noteOff event (although I don't believe that that's the issue here) and I would suggest calling noteOff yourself if you register a noteOn event for a note that's already playing. That way you can prevent keys from getting stuck.

- I wouldn't hide keys automatically based on screen size. It does look better but imagine someone trying to play this on a tablet/phone where they can't change the scaling

Again, really cool concept and good luck with further development! Feel free to reach out if you want any help :-)

[0] app.midiano.com

2 comments

Oh nice, another HN'er that's on the same wavelength :) I'll give your app a spin and send you some feedback, meanwhile, maybe there are useful ideas in pianojacq.com that you can adopt.
Ohh Hi! I've come across pianojacq before! Definitely love how clean the sheet music looks and on first glance the way the song plays smoothly even when you hit the note a little late/early works really well! That's one aspect I really need to improve.

I see you're also using Vexflow. Are you using a library to go from Midi to Vexflow format? It's a rabbit hole I sometimes wish I hadn't entered :)

@OP Can really recommend VexFlow [0] when you do get to implementing sheet music.

[0] https://github.com/0xfe/vexflow

I used two separate libraries, one to convert the MIDI file into an in memory representation and Vexflow, then a whole pile of glue (not the nicest part of the code) to combine the two.

There are some aspects of that that I want to revisit such as the automatic recognition of decorations (for instance: trills) so that they can be shown properly but these are tricky problems and I want to avoid spending more time on pianojacq.com than on using it.

Lately I've added an ear training module but I'm not completely happy with it yet (hit Bb0 to enable a hidden menu if you want to play around with it).

You're both on the same midi channel too, so you'll play well together, and should compare notes and velocities, and send each other your running status.

(Where's my drum machine when I need a badoom psssssh?)

Let's not get ahead of ourselves in the punning department, wait your turn just like everybody else and remember to feed emacs and pip.
I really appreciate the feedback, Bewelge, these ideas are all very helpful to me! I'll be making changes based on each one.

I haven't measured the latency directly. But, I did try this with my sister who lives across the US while also on a phone call with her. When she speaks or plays a note, I hear it through the app sooner than over the phone. So it's at least better than that!