Settings

Theme

Show HN: Fourhands is a P2P MIDI jam room for pianists

fourhands.jminjie.com

50 points by jm_l 5 years ago · 25 comments

Reader

jm_lOP 5 years ago

Hey all, I put this together over the holidays after initial tests showed that delay around 10-20ms was achievable with WebRTC. The jams are only 2 person and only MIDI, but for that reason it's also fairly flexible and requires little set up compared to other options (see https://github.com/jminjie/fourhands for discussion on prior art)

tiew9Vii 5 years ago

You might be interested in this YouTube channel https://youtube.com/c/paulwwells. The last series of videos is someone who created a remote piano teaching aid/device that does midi over ip https://plugandplink.com/.

There’s also a few YouTube content producers you could reach out to who might be interested as jamming in lockdown.

https://youtube.com/c/ColeLam, very talented young kid.

https://youtube.com/c/BrendanKavanaghDrK and https://youtube.com/user/pianoboogieking are two others.

tekstar 5 years ago

I'm working in the same space, but it's a sequencer so only notes entered into the DAW are shared amongst participants, and the playhead isn't synced.

Still very early days but you can try it out at https://sequencer.party - you can share session URLs with friends and jam.

  • nwsm 5 years ago

    Awesome. I've been thinking a lot about a full DAW in this manner recently.

corytheboyd 5 years ago

Nice! Really similar to something I’m working on, though I am targeting music lessons instead of jam sessions. I decided to add delay to schedule note rendering as you mentioned you do for another project of yours, since “near real time” has proven useful enough for quick communication during lessons.

I think it’s cool we had the same idea, very validating and p2p is such an interesting technology to me!

ktzar 5 years ago

https://www.multiplayerpiano.com/ is a similar one

  • jm_lOP 5 years ago

    This seems to be using a central server as a relay (which is why they can have n participants). It works pretty well but the latency tends to be too high to actually jam. (Similar to my toy example at piano.jminjie.com)

quxpar 5 years ago

This is an exciting idea!

I seem to get a 'room is full' error when I try to connect between my macbook and imac. Any tips?

  • jm_lOP 5 years ago

    Try making a new room, and also make sure there's only two clients in the room.

yingw787 5 years ago

After months of really bad audio in teleconferencing calls, hearing crisp keyboard playback was a refreshing experience. Highly recommend to check out the demo!

DoofusOfDeath 5 years ago

Very cool! Any idea what the impact of network latencies and jitter is on the overall experience?

  • jm_lOP 5 years ago

    Since webrtc uses UDP jitter is occasionally an issue. If you monitor the ping on the site you'll likely see occasional jumps to 100-200ms every once in a while. These can cause irregularities in the rhythms but for the most part you can still make out the phrase even when there's jitter. (I think this is kind of like how we can read those scrambled word sentences because we read not letter-by-letter, but word-by-word.)

    For a jitterlesss demo you can also check out piano.jminjie.com (central server, not p2p), where I've introduced an artificial delay so that the notes can be snet with timing info, and scheduled ahead of time to avoid jitter.

    Latency can also impede a smooth jamming experience, but seems to be manageable in general when it's under 20ms one-way delay (I have been able to achieve this on a wired connection at 50 miles distance in the middle of the day). There's also relationship between bpm of the song and acceptable latency similar to the concept behind sampling frequencies (https://en.wikipedia.org/wiki/Sampling_(signal_processing)). The faster you're playing, the more latency matters.

    • radiowave 5 years ago

      Given that MIDI expects 100% reliable delivery, I'm curious to know if there's any special technique used here to prevent (e.g.) intermittent packet loss causing stuck notes.

      • jm_lOP 5 years ago

        I'm not sending all the MIDI data, just a simple 3-integer representation:

        1. command 2. note (or byte1) 3. velocity (or byte2)

        From testing you don't tend to get stuck notes (though in theory this could happen if a note-up command was lost forever and never sent), though you do see some jitter.

arrakeen 5 years ago

neat idea-- i had never considered MIDI as a low-data transmission method for live jamming

tyingq 5 years ago

Very cool! Maybe add some blank space at the bottom of the page so the "Buy me a coffee" graphic doesn't obscure the page text.

onlinejk 5 years ago

Typo at the bottom: achieved vice acheived.

(Feels petty, but was encouraged by your positive response to the coffee icon recommendation.)

Sending this to my music buddy!

gnulinux 5 years ago

Doesn't work on Firefox, says:

> No browser support for MIDI. Consider trying Chrome or Edge

vg2642119 5 years ago

Awsome

nikhilunni 5 years ago

This is awesome!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection