├── LICENSE.md ├── Notes ├── A.wav ├── B.wav ├── C.wav ├── D.wav ├── E.wav ├── F.wav └── G.wav ├── Piano └── piano2.jpg ├── README.md └── Scripts ├── vbScriptA.cs ├── vbScriptB.cs ├── vbScriptC1.cs ├── vbScriptC2.cs ├── vbScriptD.cs ├── vbScriptE.cs ├── vbScriptF.cs └── vbScriptG.cs /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Raj Pathare 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Notes/A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/A.wav -------------------------------------------------------------------------------- /Notes/B.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/B.wav -------------------------------------------------------------------------------- /Notes/C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/C.wav -------------------------------------------------------------------------------- /Notes/D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/D.wav -------------------------------------------------------------------------------- /Notes/E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/E.wav -------------------------------------------------------------------------------- /Notes/F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/F.wav -------------------------------------------------------------------------------- /Notes/G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Notes/G.wav -------------------------------------------------------------------------------- /Piano/piano2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajPathare/ARNotes/b05cedcca1710d3bb4221cc61474f006f2a708e8/Piano/piano2.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ARNotes 2 | 3 | An AR-based Piano(Keyboard) app which responds to your real-time key press . 4 | 5 | 6 | ## Steps to be followed 7 | 8 | * Take a print-out of the given piano (image),it is recommmended to take a medium-sized print for better usability. 9 | 10 | ![piano2](https://user-images.githubusercontent.com/31897425/41667362-627207a0-74ca-11e8-857f-dfa96e5a36b6.jpg) 11 | 12 | * Download and install the application,the dropbox link for the same is provided above. 13 | * After installing the application,open it and focus your camera on the print-out (the piano). 14 | * Press the keys and enjoy playing your favourite instrument with some added twist. 15 | 16 | 17 | 18 | ## Built With 19 | 20 | * [Unity3D](https://unity3d.com/) 21 | * [Vuforia sdk](https://www.vuforia.com/) 22 | 23 | 24 | ## License 25 | 26 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Scripts/vbScriptA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptA : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("ANote"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptB.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptB : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("BNote"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptC1.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptC1 : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("C1Note"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptC2.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptC2 : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("C2Note"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptD.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptD : MonoBehaviour, IVirtualButtonEventHandler 7 | { 8 | 9 | private GameObject vbButtonObject; 10 | public AudioClip MusicClip; 11 | public AudioSource MusicSource; 12 | 13 | // Use this for initialization 14 | void Start() 15 | { 16 | 17 | vbButtonObject = GameObject.Find("DNote"); 18 | vbButtonObject.GetComponent().RegisterEventHandler(this); 19 | MusicSource.clip = MusicClip; 20 | 21 | } 22 | 23 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) 24 | { 25 | 26 | Debug.Log("Button down"); 27 | MusicSource.Play(); 28 | 29 | 30 | } 31 | 32 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) 33 | { 34 | 35 | Debug.Log("Button up"); 36 | 37 | } 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Scripts/vbScriptE.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptE : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("ENote"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptF.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptF : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("FNote"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Scripts/vbScriptG.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Vuforia; 5 | 6 | public class vbScriptG : MonoBehaviour,IVirtualButtonEventHandler { 7 | 8 | private GameObject vbButtonObject; 9 | public AudioClip MusicClip; 10 | public AudioSource MusicSource; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | 15 | vbButtonObject = GameObject.Find("GNote"); 16 | vbButtonObject.GetComponent().RegisterEventHandler(this); 17 | MusicSource.clip = MusicClip; 18 | 19 | } 20 | 21 | public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { 22 | 23 | Debug.Log("Button down"); 24 | MusicSource.Play(); 25 | 26 | 27 | } 28 | 29 | public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { 30 | 31 | Debug.Log("Button up"); 32 | 33 | } 34 | 35 | } 36 | --------------------------------------------------------------------------------