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

Comments (8)

  1. Link Listing – January 21, 2008

  2. WPF Intellisense-like method selection pop-up window [Via: igormoochnick ] Code Camps Toronto Code…

  3. BasP says:

    Count this as one vote to see that video… it sounds pretty cool.

  4. karl1406 says:

    Yes, Karl votes for a video too!

    Question:  What do I have to do, to get Surface and the SDK.  We are Microsoft Partners.



  5. Charlou* says:

    A link to this video would be appreciated here too !

    As Karl said, what is the current Surface SDK policy towards partners ?

    Thanks a lot !

  6. When Steve Clayton happened upon a Surface computer in Redmond, he didn&#39;t just play with it, he filmed

  7. News says:

    On top of the Grand Piano and Firefly game they’ve already released, it appears the Microsoft Surface

  8. AnandVVN says:

    it is very cool and looks very neat, I just can imagine a lot of application of surface. Would love to see that video.

Skip to main content