Huh, this doesn't seem to handle commas or semicolons at all. I can't immediately see why, since string.toUpperCase() maps "," to "," and ";" to ";", as it should. And switching input to
That's because the keydown event uses keyCode instead of charCode, and the two don't always match. Try typing Shift+U and then '[' on this page to see what I mean: http://unixpapa.com/js/testkey.html.
Since KeyboardJS is already loaded via requirejs, we can require it and then use it to get the keyCode for each character in the for loop.
var KeyboardJS = require('lib/keyboard');
[...]
for (var i = 0; i < input.length; ++i) {
var code = KeyboardJS.key.code(input.charAt(i));
if (code) {
soundArray.push(code);
} else {
soundArray.push(32);
}
}
I particularly like input = "qwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvw"
I think that the 'bv's following 'yhgr' might be 'vc' instead -- sounds closer to me. I gotta say, I really like this layout, even if it's slightly less than intuitive for me.
I love the idea of having a layout where all patterns are movable. Going diagonally up-right gives you whole tone steps, diagonally down-right gives you semitone steps. An octave is QT, a major triad is QSD, a minor triad is QWD, a major scale is QZSXDRVT or AWXECFTG or ASEDRVGB. I could pick this up right away, in some ways it's easier than the piano, which I've played a lot. I really wish there was touch response, but computer keyboards don't support it.
The behavior of cmd as the pedal is a little weird. When you release the pedal, the sound should stop. Maybe it's just a Mac bug, though.
The top row seems to be an octave higher than it should be, that interferes with moveability. Though I understand you probably wanted to expand the range.
Interesting layout. Horizontal rows are diminished triads, so it takes a minute to figure out the pattern for your standard maj/min chords. It's very counterintuitive for someone familiar with piano and guitar (or at least me), but that can be a good thing.
Well, the cool thing is that the layout means that all chords are completely movable. Take the pattern for a C major chord: QSD. If you shift over one key for each finger, you get an F# major chord: EFG. You can move that same finger pattern anywhere and always get a major chord, unlike, say, a piano or guitar (assuming you're playing in standard).
The idea of fully movable chords was drilled into my head by the design of the Ableton Push, and I've always loved it, though I think that's far more intuitive than this.
I fully agree. This is one aspect of the common keyboard layout that makes me sad: you have to learn many different patterns for every key. With this you only need to learn functional patterns (major, minor, etc.) and suddenly you know them for all keys. Other layouts have been attempted (see the janko layout), but they never caught on. I wonder if the mobility of accordions is one reason they've been able to have more variation.
How does the ableton push solve this problem? Looking at a video it almost felt like they were switching modes for a scale (almost like a harp does with its pedals). I'm probably off here, but I couldn't quickly find docs on how it worked.
The Ableton Push has several different configurations. I think you can use patterns based on any scale you want (including chromatic). Jordan Rudess did a little video series exploring the push: https://www.youtube.com/watch?v=cz39lPgqfhE
Yeah, after 10 minutes of playing with it chords are starting to feel intuitive. You can do a lot of basic chording once you memorize the major and minor inversions.
Awesome. The first thing I did was run my finger across the qwerty row from left to right, which immediately made me think of Toccata and Fugue, prompting me to pick out this excerpt:
Transposed down a half step to D-flat minor to better fit this thing's range. It's not a perfect transcription by any means (the arpeggio suffers from limited polyphony, for one), but it's pretty cool that it was so easy to get this far!
Is nice that you can open the JavaScript console (F12) and it shows the name of the notes (along the musical octave).
Is a shame there are some chords that you can't play (chord: pressing notes at the same time), such as "yup". But I think is a hardware limitation rather than a bug in the JavaScript.
A quick heads-up: I left the page open to play with it later and about an hour and a half afterwards, it apparently started blaring quite alarming noise out of nowhere. Didn't hear it myself but it freaked out the unlucky person in the room.
This may be an easy question for others, but not for me- how does it load the app code? When I view the source, it only shows the loading of google analytics and require.js, but the console/Debugger shows 10 .js files?! Thanks.
Nice! I noticed pressing alt+key will hold the note, but you might want to change that to shift+key since 'w','q','t' and 'n' won't work (I got a little carried away).
I remember a few years back there was a site similar to this idea and you could actually share! I think you could add an option to append to fragment #
edit: is this open source such that people can contribute?
Someone should make a keyboard that assigns nice sounding intervals to the most common digrams/trigrams so that typing normal text produces better music.
Well, if you like the general sound of playing the home row in this layout, then simply remapping this thing for Dvorak might get you somewhat far toward that goal since the home row actually contains the vowels and common consonants.
The scales produced by typing along one row reminded me of the castle theme from Super Mario World. If my javascript-foo was greater, I would write a function that types this, but alas.
This is the best part of the app! A simple string is simplified music notation for this keyboard, and if you are a touch typist, that means you can play anything on the fly!