diff --git a/DrumKit.sln b/DrumKit.sln new file mode 100644 index 0000000..b14fa24 --- /dev/null +++ b/DrumKit.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrumKit", "DrumKit\DrumKit.csproj", "{9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|ARM.ActiveCfg = Debug|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|ARM.Build.0 = Debug|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|ARM.Deploy.0 = Debug|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x64.ActiveCfg = Debug|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x64.Build.0 = Debug|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x64.Deploy.0 = Debug|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x86.ActiveCfg = Debug|x86 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x86.Build.0 = Debug|x86 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Debug|x86.Deploy.0 = Debug|x86 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|Any CPU.Build.0 = Release|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|Any CPU.Deploy.0 = Release|Any CPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|ARM.ActiveCfg = Release|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|ARM.Build.0 = Release|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|ARM.Deploy.0 = Release|ARM + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x64.ActiveCfg = Release|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x64.Build.0 = Release|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x64.Deploy.0 = Release|x64 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x86.ActiveCfg = Release|x86 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x86.Build.0 = Release|x86 + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/DrumKit.v11.suo b/DrumKit.v11.suo new file mode 100644 index 0000000..973c967 Binary files /dev/null and b/DrumKit.v11.suo differ diff --git a/DrumKit/App.xaml b/DrumKit/App.xaml new file mode 100644 index 0000000..47bf33e --- /dev/null +++ b/DrumKit/App.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/DrumKit/App.xaml.cs b/DrumKit/App.xaml.cs new file mode 100644 index 0000000..4106c6c --- /dev/null +++ b/DrumKit/App.xaml.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 + +namespace DrumKit +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used when the application is launched to open a specific file, to display + /// search results, and so forth. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + if (!rootFrame.Navigate(typeof(MainPage), args.Arguments)) + { + throw new Exception("Failed to create initial page"); + } + } + // Ensure the current window is active + Window.Current.Activate(); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/DrumKit/Assets/Drums/big_drum_of.png b/DrumKit/Assets/Drums/big_drum_of.png new file mode 100644 index 0000000..412a66d Binary files /dev/null and b/DrumKit/Assets/Drums/big_drum_of.png differ diff --git a/DrumKit/Assets/Drums/big_drum_on.png b/DrumKit/Assets/Drums/big_drum_on.png new file mode 100644 index 0000000..2ef7180 Binary files /dev/null and b/DrumKit/Assets/Drums/big_drum_on.png differ diff --git a/DrumKit/Assets/Drums/drum_of.png b/DrumKit/Assets/Drums/drum_of.png new file mode 100644 index 0000000..fbf9357 Binary files /dev/null and b/DrumKit/Assets/Drums/drum_of.png differ diff --git a/DrumKit/Assets/Drums/drum_on.png b/DrumKit/Assets/Drums/drum_on.png new file mode 100644 index 0000000..36c66cb Binary files /dev/null and b/DrumKit/Assets/Drums/drum_on.png differ diff --git a/DrumKit/Assets/Drums/plate_off.png b/DrumKit/Assets/Drums/plate_off.png new file mode 100644 index 0000000..ea8fe3c Binary files /dev/null and b/DrumKit/Assets/Drums/plate_off.png differ diff --git a/DrumKit/Assets/Drums/plate_on.png b/DrumKit/Assets/Drums/plate_on.png new file mode 100644 index 0000000..88f4865 Binary files /dev/null and b/DrumKit/Assets/Drums/plate_on.png differ diff --git a/DrumKit/Assets/Logos/Logo.png b/DrumKit/Assets/Logos/Logo.png new file mode 100644 index 0000000..e26771c Binary files /dev/null and b/DrumKit/Assets/Logos/Logo.png differ diff --git a/DrumKit/Assets/Logos/SmallLogo.png b/DrumKit/Assets/Logos/SmallLogo.png new file mode 100644 index 0000000..1eb0d9d Binary files /dev/null and b/DrumKit/Assets/Logos/SmallLogo.png differ diff --git a/DrumKit/Assets/Logos/SplashScreen.png b/DrumKit/Assets/Logos/SplashScreen.png new file mode 100644 index 0000000..c951e03 Binary files /dev/null and b/DrumKit/Assets/Logos/SplashScreen.png differ diff --git a/DrumKit/Assets/Logos/StoreLogo.png b/DrumKit/Assets/Logos/StoreLogo.png new file mode 100644 index 0000000..dcb6727 Binary files /dev/null and b/DrumKit/Assets/Logos/StoreLogo.png differ diff --git a/DrumKit/Assets/Sounds/Crash05.wav b/DrumKit/Assets/Sounds/Crash05.wav new file mode 100644 index 0000000..ba3a8d7 Binary files /dev/null and b/DrumKit/Assets/Sounds/Crash05.wav differ diff --git a/DrumKit/Assets/Sounds/Floor04.wav b/DrumKit/Assets/Sounds/Floor04.wav new file mode 100644 index 0000000..d69afa6 Binary files /dev/null and b/DrumKit/Assets/Sounds/Floor04.wav differ diff --git a/DrumKit/Assets/Sounds/Hat04.WAV b/DrumKit/Assets/Sounds/Hat04.WAV new file mode 100644 index 0000000..34e2c82 Binary files /dev/null and b/DrumKit/Assets/Sounds/Hat04.WAV differ diff --git a/DrumKit/Assets/Sounds/HiHatOpen04.wav b/DrumKit/Assets/Sounds/HiHatOpen04.wav new file mode 100644 index 0000000..84ebdcb Binary files /dev/null and b/DrumKit/Assets/Sounds/HiHatOpen04.wav differ diff --git a/DrumKit/Assets/Sounds/Kick07.wav b/DrumKit/Assets/Sounds/Kick07.wav new file mode 100644 index 0000000..0259a09 Binary files /dev/null and b/DrumKit/Assets/Sounds/Kick07.wav differ diff --git a/DrumKit/Assets/Sounds/Ride04.wav b/DrumKit/Assets/Sounds/Ride04.wav new file mode 100644 index 0000000..3ea0b0a Binary files /dev/null and b/DrumKit/Assets/Sounds/Ride04.wav differ diff --git a/DrumKit/Assets/Sounds/Snare08.wav b/DrumKit/Assets/Sounds/Snare08.wav new file mode 100644 index 0000000..544e22f Binary files /dev/null and b/DrumKit/Assets/Sounds/Snare08.wav differ diff --git a/DrumKit/Assets/Sounds/TomHigh04.wav b/DrumKit/Assets/Sounds/TomHigh04.wav new file mode 100644 index 0000000..a5f84a9 Binary files /dev/null and b/DrumKit/Assets/Sounds/TomHigh04.wav differ diff --git a/DrumKit/Assets/Sounds/TomLow04.wav b/DrumKit/Assets/Sounds/TomLow04.wav new file mode 100644 index 0000000..3d2f960 Binary files /dev/null and b/DrumKit/Assets/Sounds/TomLow04.wav differ diff --git a/DrumKit/Assets/bg.png b/DrumKit/Assets/bg.png new file mode 100644 index 0000000..32bc151 Binary files /dev/null and b/DrumKit/Assets/bg.png differ diff --git a/DrumKit/Assets/default b/DrumKit/Assets/default new file mode 100644 index 0000000..c0aeb56 --- /dev/null +++ b/DrumKit/Assets/default @@ -0,0 +1,40 @@ +[Kick] + position=.41,.2 + size=.3 + image=ms-appx:///Assets/Drums/big_drum_of.png + sound,0=ms-appx:///Assets/Sounds/Kick07.wav +[Snare] + position=.16,.34 + size=.25 + image=ms-appx:///Assets/Drums/drum_of.png + sound,0=ms-appx:///Assets/Sounds/Snare08.wav +[High Tom] + position=.33,.05 + size=.22 + image=ms-appx:///Assets/Drums/drum_of.png + sound,0=ms-appx:///Assets/Sounds/TomHigh04.wav +[Low Tom] + position=.55,.05 + size=.22 + image=ms-appx:///Assets/Drums/drum_of.png + sound,0=ms-appx:///Assets/Sounds/TomLow04.wav +[Floor Tom] + position=.66,.44 + size=.29 + image=ms-appx:///Assets/Drums/drum_of.png + sound,0=ms-appx:///Assets/Sounds/Floor04.wav +[HiHat] + position=.03,.55 + size=.21 + image=ms-appx:///Assets/Drums/plate_off.png + sound,0=ms-appx:///Assets/Sounds/HiHatOpen04.wav +[Crash] + position=.1,.02 + size=.25 + image=ms-appx:///Assets/Drums/plate_off.png + sound,0=ms-appx:///Assets/Sounds/Crash05.wav +[Ride] + position=.72,.04 + size=.25 + image=ms-appx:///Assets/Drums/plate_off.png + sound,0=ms-appx:///Assets/Sounds/Ride04.wav diff --git a/DrumKit/Common/StandardStyles.xaml b/DrumKit/Common/StandardStyles.xaml new file mode 100644 index 0000000..6ad467a --- /dev/null +++ b/DrumKit/Common/StandardStyles.xaml @@ -0,0 +1,1833 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mouse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DrumKit/Drum.cs b/DrumKit/Drum.cs new file mode 100644 index 0000000..5d1992c --- /dev/null +++ b/DrumKit/Drum.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Imaging; +using Windows.UI.Xaml.Navigation; + +namespace DrumKit +{ + class Drum + { + #region Attributes + private Uri imageSource; + private Point position; + private double size; + #endregion + + #region Public properties + /// + /// Gets or sets the name of the drum. + /// + public string Name { get; set; } + + /// + /// Gets or sets the image uri. If enabled, the image is loaded. + /// + public Uri ImageSource { + get { return this.imageSource; } + set { this.SetImageSource(value); } + } + + /// + /// Gets or sets the position of the element on the screen. + /// + public Point Position { + get { return this.position; } + set { this.SetPosition(value); } + } + + /// + /// Gets the size of the image displayed on the screen. + /// + public double Size { + get { return this.size; } + set { this.size = value; } + } + + /// + /// Sound sources + /// + public Dictionary SoundSources + { + get; + private set; + } + #endregion + + #region Constructor + public Drum() + { + // Initialize sources + this.SoundSources = new Dictionary(); + this.imageSource = null; + + // Set up other vars + this.position = new Point(0, 0); + this.size = 0; + this.Name = ""; + } + + #endregion + + #region Setters + public void SetImageSource(Uri imagesrc) + { + // Set property + this.imageSource = imagesrc; + } + + public void SetPosition(Point location) + { + // Set property + this.position = location; + } + + public void SetSoundSource(int intensity, Uri source) + { + // Set up sound source + if (this.SoundSources.ContainsKey(intensity)) + this.SoundSources[intensity] = source; + + else this.SoundSources.Add(intensity, source); + } + + #endregion + + } +} diff --git a/DrumKit/DrumKit.csproj b/DrumKit/DrumKit.csproj new file mode 100644 index 0000000..82efd6a --- /dev/null +++ b/DrumKit/DrumKit.csproj @@ -0,0 +1,181 @@ + + + + + Debug + AnyCPU + {9A5D3F55-DFD5-45DB-99FF-C82EFCC3294D} + AppContainerExe + Properties + DrumKit + DrumKit + en-US + 512 + {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + DrumKit_TemporaryKey.pfx + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE;NETFX_CORE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE;NETFX_CORE + prompt + 4 + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + ARM + false + prompt + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + x64 + false + prompt + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + x86 + false + prompt + true + + + + App.xaml + + + + MainPage.xaml + + + + + + + + + + Designer + + + + + + + + + + + + + + + Designer + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + C:\Users\Tiberiu\Downloads\SharpDX\Bin\Standard-winrt\SharpDX.dll + + + C:\Users\Tiberiu\Downloads\SharpDX\Bin\Standard-winrt\SharpDX.XAudio2.dll + + + + + 11.0 + + + + \ No newline at end of file diff --git a/DrumKit/DrumKit.csproj.user b/DrumKit/DrumKit.csproj.user new file mode 100644 index 0000000..e98010e --- /dev/null +++ b/DrumKit/DrumKit.csproj.user @@ -0,0 +1,6 @@ + + + + False + + \ No newline at end of file diff --git a/DrumKit/MainPage.xaml b/DrumKit/MainPage.xaml new file mode 100644 index 0000000..f0811a5 --- /dev/null +++ b/DrumKit/MainPage.xaml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + REC + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DrumKit/MainPage.xaml.cs b/DrumKit/MainPage.xaml.cs new file mode 100644 index 0000000..3f51b9c --- /dev/null +++ b/DrumKit/MainPage.xaml.cs @@ -0,0 +1,201 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 + +namespace DrumKit +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + DrumRepository drumRepo; + SoundPlayer player = new SoundPlayer(); + List uiImages; + List