Hacker News new | past | comments | ask | show | jobs | submit login
Programming on a Piano Keyboard (elekslabs.com)
221 points by yuriyguts on June 24, 2014 | hide | past | web | favorite | 36 comments

Fun idea! The note mappings shown at the end of the article seem quite specific to producing the code written for the demo, but I could imagine a more general mapping. Velocity also allows for some interesting possibilities, such as uppercase/lowercase. Rather than mapping chords to individual letters, notes could map to letters and chords involving those letters could map to common patterns with the letters as mnemonics.

notes could map to letters and chords involving those letters could map to common patterns with the letters as mnemonics

This is the basic working principle of the stenotype, which enables extremely fast typing (200wpm+) but needs a lot of practice to learn. A MIDI keyboard does seem like an ideal input device for this, if anyone wants to take this idea further they could try to make it work with Plover (http://stenoknight.com/wiki/Main_Page )

Actually, a midi keyboard has a longer way from keyup to keydown because you need to express differences in the velocities.

Then again, many more people have midi keyboards than steno machines, so it might be worth the try to adapt it for plover.

An even more awesome idea would be to use something like the EWI or the Eigenharp pico as a steno device, since those are more portable than either a midi keyboard or a normal keyboard. Not sure about the Eigenharp, but for the EWI you'd have to use another firmware (than the current one which translates fingerings into single midi notes and doesn't support chording), which sadly puts it out of the frame.

watching it i thought the opposite would be better

playing the piano i would often struggle with not enough finger opening/movement.

i seeing how slow he 'typed' that code, i think the other way around would make more sense. i.e. learning the piano with a matrix keyboard.

We just need pressure sensitive switches. but after that, you would get much more agility. not to mention be able to play pieces that are impossible without 4 hands.

There's actually a whole class of keyboards like this [1], the most popular being the Jankó keyboard [2]. Here's [3] a cool demo by a Jankó virtuoso.

[1] http://en.wikipedia.org/wiki/Jank%C3%B3_keyboard

[2] http://en.wikipedia.org/wiki/Isomorphic_keyboard

[3] https://www.youtube.com/watch?v=cK4REjqGc9w

As someone who regularly uses such a device, I agree fully.


You're right, those particular mappings were mainly for demo purposes. I guess it would be quite inefficient to use the approach from the video on a regular basis. If I used it in real life, I'd probably map the keys to complex macros, unmapped IDE commands, or other features that are hard to memorize on a regular keyboard.

In addition to @JoshTriplett's idea about velocity, I guess knobs and faders might have some interesting applications too.

P.S. Btw, it's a "she", it's my colleague performing :)

You can use the eigenharp as a matrix, pressure sensitive 'piano' http://www.eigenlabs.com/

Awesome hack. It'd be interesting to run the rules in reverse: i.e. take some code, run it backward through the mapping and see what music comes out.

(P.S. you can't really call it C# minor if there are no cadences, ya know, in C# minor.)

Check out OSCulator if you're on a Mac. http://www.osculator.net/ You can route MIDI, plus a number of other types of physical controllers like a Wii Remote to keyboard commands, mouse movements, AppleScripts, and more.

Refreshing hack news, after all that startup BS.

My God, you'd think this were a news site, run by a startup accelerator, that used to be called Startup News!

What's your motivation for making this comment? Do you actually think that this approach will change anyone's opinion on a subject you (clearly) feel very strongly about? Or are you just trying to post what you think the most passers-by will agree with, as loudly and as noticeably as possible?

As an aforementioned passerby, i laughed audibly when i read his comment. Then the irony of you calling out his sarcasm instead of the OP's comment slamming startup news was itself refreshing. Well done.

I'm quite surprised Hello World in C# could ever sound so lovely.

My suggestion for the sustain pedal is enable/disable all breakpoints.

Sustain needs to be caps lock, obviously.

Interesting. I did something a little like this a while back. The way I worked it, it spanned two octaves, and chords in the lower octave determined a one-to-one mapping in the upper. It seemed about as usable as any unfamiliar keyboard, though I didn't play with it for more than about 20 minutes in total.

There's a lot of this sort of thing going on right now actually. I've been experimenting with dynamic interfaces on a tablet and found it to be strangely satisfying to have task-oriented controls come into view when they're likely to be needed.

I guess this is as sensible as the author's master thesis titled 'Adaptive Object-Oriented Architecture of Information Systems Based on High-Level Petri Nets', where apparently he ran out of keywords to put together.

Counting the number of words is, no doubt, a sensible way to assess the academic value of something. Sure, REST may sound better than 'Architectural Styles and the Design of Network-based Software Architectures', but let's stick to http://ycombinator.com/newsguidelines.html, section "In Comments".

"How can you tell a programmer from a musician? Ask them what C# is." LOL

Typing via a mapping to the keys is a normal feature in some integrated synthesizers. E.g. the K2600 does it... certantly beats entering in labels for patches via a little wheel or 9-key.

I like the idea of using a MIDI trigger pad for things like keyboard shortcuts or text snippets. I'm sure you could make something similar on the cheap with an arduino.

Can it make the opposite and turn code into music?

Nice to see that the key mapping was projected to sound good, not only random notes being played.

one of the earliest typewriters had a piano type keyboard. [0] http://www.nytstore.com/Typewriter-Patent--1868_p_8837.html

The old Styx song "Too Much Time on My Hands" comes to mind :-D

Still looks like fun, though.

I imagine working in Emacs would sound like Mozart playing.

For Emacs, I'd recommend a full-fledged church organ setup.

So VI would be god hehe

vim would be like dubstep. vwwwwwww (drop the beat!) d.

most experienced vim users would type dt<letter> or d5wd2w (so you don't have to count everything you go in increments)

and also by experience, one should know that everytime you press that many w, you WILL type a b or h :) vwwwwwwwwwwbbd.

You know, I typed it out in shorthand at first, but it didn't have the same visual effect. haha

That's it, I'm writing a plugin that plays dubstep while you type.

Probably requires the same amount of hand strength.

Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact