Settings

Theme

Programming on a Piano Keyboard

elekslabs.com

221 points by yuriyguts 12 years ago · 38 comments

Reader

JoshTriplett 12 years ago

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.

  • userbinator 12 years ago

    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 )

    • sqrt17 12 years ago

      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.

  • gcb0 12 years ago

    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.

UrlichtZwei 12 years ago

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.)

kylerosenberg 12 years ago

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.

totoroisalive 12 years ago

Refreshing hack news, after all that startup BS.

  • quarterto 12 years ago

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

    • NoodleIncident 12 years ago

      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?

      • liquidise 12 years ago

        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.

andreastt 12 years ago

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

dspig 12 years ago

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

dllthomas 12 years ago

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.

rch 12 years ago

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.

eng_monkey 12 years ago

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.

  • yuriygutsOP 12 years ago

    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".

fasteo 12 years ago

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

nullc 12 years ago

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.

samweinberg 12 years ago

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.

grondilu 12 years ago

Can it make the opposite and turn code into music?

fjcaetano 12 years ago

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

auvi 12 years ago

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

nocman 12 years ago

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

Still looks like fun, though.

thegeomaster 12 years ago

I imagine working in Emacs would sound like Mozart playing.

  • mhd 12 years ago

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

  • totoroisalive 12 years ago

    So VI would be god hehe

    • beeskneecaps 12 years ago

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

      • gcb0 12 years ago

        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.

        • beeskneecaps 12 years ago

          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.

  • beeskneecaps 12 years ago

    Probably requires the same amount of hand strength.

Keyboard Shortcuts

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