DrumkitX - Bringing the X, as in DirectX, to your Windows Phone 8 Drumkit
- Posted: Apr 22, 2013 at 6:00 AM
- 7,977 Views
Today's Mobile Monday project is a simple project yet one that shows off a number of things. For one it show meshing C# and DirectX/C++. For another it shows off the DirectX Toolkit and finally who doesn't like to play a little (get it, little?) drums?
A Windows Phone 8 port of the Drumkit XNA example using Direct3D and XAudio for fast graphics and low latency sample playback. This demo app lets you play percussion sounds by tapping the screen. You can record your beats, play them back later and also play drums on top of your latest recording.
- Compatible with Windows Phone 8 phones
- Tested with Nokia Lumia 920 and Nokia Lumia 820
- Developed with Visual Studio 2012 Express for Windows Phone 8
Here's a snip from the technical documentation
The basic structure of DrumkitX was generated with the Windows Phone XAML and Direct3D App wizard in Visual Studio. The following diagram is a high-level overview of the architecture:
DrumkitX is the managed component part of the solution. It is structured like a regular XAML app with pages and C# code-behind classes. In the XAML and Direct3D App template, the Direct3D content is rendered onto a DrawingSurface control that is laid out in regular XAML like any other interface element.
DrumkitXComp is the native C++ component that takes care of graphics and audio using Direct3D and XAudio2. It knows nothing of the managed component, it is only provided with a surface to draw onto.
The native component uses the DirectX Toolkit to simplify resource handling and drawing, specifically loading textures with DDSTextureLoader and drawing them with SpriteBatch.
And a snip from the solution;
Finally the app itself, which compiled and ran for me with no problems...
On the outside it's simple, but shows off a number of interesting things you can do...