Live data from Hacker News

HTML5 Piano

mrcoles.com

51–60 of 68 posts

Re: HTML5 Piano

#52
A few years ago myself and a friend wrote a simulator for a 90's toy called "Smart Start" ("Pense Bem" in Brazil), which has a crude piano (square wave only) mode as well.

It is still online at http://labs.hardinfo.org/pb/.

To play, turn it on (green button), then press "Memória Tons" (third button from the right in the last row).

Re: HTML5 Piano

#54
post #11

It's nice you can do something in HTML5 that you could have done in Flash 10 years ago. (Of course, I know, this is all according to standards and all. But still.)

The sad part is you really still can't do this in HTML5, not if you want it to run on the most popular smartphone platform (Android).

Wouldn't it work on firefox for android?

Re: HTML5 Piano

#56

Earlier quoted context omitted.

They were trained on this type of gear, so they are most expressive with it. A lifetime of muscle memory can't be undone. What about children who are just beginning today? I'm looking forward to a new generation of musicians whose native instrument is the touch panel. It seems odd to interface with modern technology using an 18th century physical interface. Its neat to watch Deadmau5 "play" his setup. I can only imag…

Anecdotal: I understand that children who have learned to play on electronic (physical) keyboards (e.g. Yamaha stage piano) have problems when they encounter the mechanical actions on uprights and grands. What will happen is a slow change in playing style , so things will sound different . Sort of like the change from arch to Torte bow for violins, only more radical.

I grew up playing the piano, then went on hiatus for two or three years, then took a year of harpsichord lessons (harpsichords have significantly lighter action. And narrower keys.) Now playing a piano is downright painful--I'm no longer used to the finger and wrist strength required to get a key down, nor am I used to the stretching required to hit larger intervals.

The plural of anecdote is not "data", but I, for one, will no longer understate the difficulty in transitioning to a new type of action.

Re: HTML5 Piano

#57

One of my friends coded up something like this, except you can play with the keys on your keyboard and it sounds like a piano. Very cool!

Press the right most rectangle on the top to enable "play by keyboard" mode. I agree it is very cool.

Oh awesome, I missed that! This one's better designed :)

Re: HTML5 Piano

#58
post #11

It's nice you can do something in HTML5 that you could have done in Flash 10 years ago. (Of course, I know, this is all according to standards and all. But still.)

The sad part is you really still can't do this in HTML5, not if you want it to run on the most popular smartphone platform (Android).

Give it about a month and Chrome for Android will provide web audio API support. It's currently in chrome for android beta

Our web app that plays audio in sync on multiple devices works in iOS, Chrome (non mobile) & Firefox Aurora. Were eagerly awaiting for the newest Chrome for Android to drop.

Re: HTML5 Piano

#59
post #11

It's nice you can do something in HTML5 that you could have done in Flash 10 years ago. (Of course, I know, this is all according to standards and all. But still.)

The sad part is you really still can't do this in HTML5, not if you want it to run on the most popular smartphone platform (Android).

Run it in Firefox on Android. Android default browser is junk.

Re: HTML5 Piano

#60

I understand the sound data are generated by JavaScript. How many distinct sounds are generated? How much space is required to store this data? Are the notes of a chord combined by JavaScript or the browser?

Each note is generated as a separate sound file when the piano first loads. They're all short wave files. So when you hit a bunch of notes at once, it's just playing several sound files at once.

If you click the square in the upper right, you'll get options to change the waveform and volume response. There are some other options too, like shifting by an octave or changing the color of the piano :)

Better things could be done by using the web audio APIs, but I explicitly started this project wanting to build audio using data URIs.

Post reply on HN