Surface Grand Piano

Rob and Thomas think one cool use of Surface would a piano app.  I agree :)  Believe it or not, this concept is actually one of the first tech samples we shipped to partners in early drops of the Surface SDK.  We chose this because 1) it's a good example of leveraging multi-input, 2) from an development perspective, it's a good example of the benefits Surface gets from leveraging WPF, and 3) most of the work was already done for us.

It turns out that the Expression Blend team shipped a Grand Piano sample with their tool to highlight the power of having developers & designers work closely together using tools built for their specific needs.  In that sample, each key on the Piano is simply a WPF Button control which is given a custom style which makes it look like a 3D piano key.  If you don't have Expression Blend installed, there's a Silverlight version of this that you can play with online.

Grand Piano 

So how did we Surface-enable this?  3 easy steps:

  • Replace <Window> in the XAML with <SurfaceWindow>
    • SurfaceWindow is a subclass of the WPF Window class which automatically does some initialization stuff that we require of all Surface apps (like making the window full-screen on the right display)
  • Replace <Button> in the XAML with <SurfaceButton>
    • SurfaceButton is a subclass of the WPF Button class which knows how to correctly respond to Surface input so you can press multiple buttons at once and use multiple fingers on each button.
  • Ask Celso on the Blend team to provide updated images for the piano keys
    • The ones shipped in the original version of this app have an optimization that assumes only one key will be pressed at a time.

I don't have a video handy to show this in action (it's pretty much exactly what you'd expect), but will create one if people express interest in the comments on this post.

Disclaimer: This was created purely as an SDK tech sample to help show partners how to leverage Blend and WPF with our SDK. It's not something we consider to be a "complete" app (there are tons of ways it could/should be expanded - including ideas Thomas mentioned on his blog) and it's not something our Demo crew uses at events to tell the Surface story (they prefer things that better fit our v1 business model and leverage all the multi-user & object recognition aspects of Surface).