├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── Nitish.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── nitishp │ │ └── sheetmusicviewtest │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── nitishp │ │ │ └── sheetmusicviewtest │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ ├── activity_main.xml │ │ └── content_main.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── nitishp │ └── sheetmusicviewtest │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── images └── noteExample.png ├── settings.gradle └── sheetmusic ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── com │ └── nitishp │ └── sheetmusic │ └── ApplicationTest.java ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ └── nitishp │ │ └── sheetmusic │ │ ├── MusicBarView.java │ │ ├── NoteData.java │ │ └── NoteView.java └── res │ ├── drawable-hdpi │ ├── eighth_note_stem_facing_up.png │ ├── half_note_stem_facing_down.png │ ├── half_note_stem_facing_up.png │ ├── quarter_note_stem_facing_down.png │ ├── quarter_note_stem_facing_up.png │ └── whole_note.png │ ├── drawable-mdpi │ ├── eighth_note_stem_facing_up.png │ ├── half_note_stem_facing_down.png │ ├── half_note_stem_facing_up.png │ ├── quarter_note_stem_facing_down.png │ ├── quarter_note_stem_facing_up.png │ └── whole_note.png │ ├── drawable-xhdpi │ ├── eighth_note_stem_facing_up.png │ ├── half_note_stem_facing_down.png │ ├── half_note_stem_facing_up.png │ ├── quarter_note_stem_facing_down.png │ ├── quarter_note_stem_facing_up.png │ └── whole_note.png │ ├── drawable-xxhdpi │ ├── eighth_note_stem_facing_up.png │ ├── half_note_stem_facing_down.png │ ├── half_note_stem_facing_up.png │ ├── quarter_note_stem_facing_down.png │ ├── quarter_note_stem_facing_up.png │ └── whole_note.png │ └── values │ ├── attrs.xml │ └── strings.xml └── test └── java └── com └── nitishp └── sheetmusic └── ExampleUnitTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | *.iml 9 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | SheetMusicViewTest -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/Nitish.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | nitish 5 | paradkar 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SheetMusicView 2 | This is a simple library to help incorporate sheet music quickly into your android application. It is compatible with all API versions 8 and higher. 3 | 4 | # Example 5 | 6 | The following picture shows SheetMusicView in action: 7 | 8 | ![Example of sheetmusicview](/images/noteExample.png) 9 | 10 | # Usage 11 | 12 | Currently, the fastest way to include the view into your project is to include it into one of your layout XML files. The ```MusicBarView``` represents the seven lines that make up an empty music bar, and every single note that you want to insert into this bar is called a ```NoteView```. Make sure to include every ```NoteView``` nested inside of a ```MusicBarView```. An example of this can be seen by the following code snippet: 13 | 14 | ``` 15 | 19 | 24 | 29 | 34 | 39 | 44 | 45 | ``` 46 | 47 | # Installation 48 | 49 | This library is deployed with the help of jitpack. Add the following library dependency to your app's ```build.grade``` file: 50 | 51 | ``` 52 | dependencies { 53 | compile 'com.github.nitishp:sheetmusicview:v1.2.0' 54 | } 55 | ``` 56 | 57 | Also, add the following to your project's ```build.gradle``` file: 58 | 59 | ``` 60 | allprojects { 61 | repositories { 62 | maven { url "https://jitpack.io" } 63 | } 64 | } 65 | ``` 66 | 67 | 68 | # Contributing 69 | 70 | This is a library that I hope to grow into something that is in a lot better of a state than it is currently in. Some of the features that I hope to add include: 71 | 72 | * The ability to drag and drop notes into the view. 73 | * Making the view look more like a bar and possibly include treble and clef symbols. 74 | * Add easier support dynamically for changing the value of a note in code 75 | * Any other feature that you think would be useful for any user in the future! 76 | 77 | This is also the first Android library that I have ever written. If you find some style mistakes or other inefficiencies, please feel free to make a pull request or inform me on how I can make this library better! 78 | 79 | # License 80 | 81 | ``` 82 | Copyright 2016 Nitish Paradkar 83 | 84 | Licensed under the Apache License, Version 2.0 (the "License"); 85 | you may not use this file except in compliance with the License. 86 | You may obtain a copy of the License at 87 | 88 | http://www.apache.org/licenses/LICENSE-2.0 89 | 90 | Unless required by applicable law or agreed to in writing, software 91 | distributed under the License is distributed on an "AS IS" BASIS, 92 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 93 | See the License for the specific language governing permissions and 94 | limitations under the License. 95 | ``` -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.nitishp.sheetmusicviewtest" 9 | minSdkVersion 8 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.3.0' 26 | compile 'com.android.support:design:23.3.0' 27 | compile project(":sheetmusic") 28 | // compile 'com.github.nitishp:sheetmusicview:v1.2.0' 29 | } 30 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Nitish\AppData\Local\Android\sdk2/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/nitishp/sheetmusicviewtest/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.nitishp.sheetmusicviewtest; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/nitishp/sheetmusicviewtest/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.nitishp.sheetmusicviewtest; 2 | 3 | import android.os.Bundle; 4 | import android.support.design.widget.FloatingActionButton; 5 | import android.support.design.widget.Snackbar; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.support.v7.widget.Toolbar; 8 | import android.view.View; 9 | import android.view.Menu; 10 | import android.view.MenuItem; 11 | 12 | public class MainActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | } 19 | 20 | @Override 21 | public boolean onCreateOptionsMenu(Menu menu) { 22 | // Inflate the menu; this adds items to the action bar if it is present. 23 | getMenuInflater().inflate(R.menu.menu_main, menu); 24 | return true; 25 | } 26 | 27 | @Override 28 | public boolean onOptionsItemSelected(MenuItem item) { 29 | // Handle action bar item clicks here. The action bar will 30 | // automatically handle clicks on the Home/Up button, so long 31 | // as you specify a parent activity in AndroidManifest.xml. 32 | int id = item.getItemId(); 33 | 34 | //noinspection SimplifiableIfStatement 35 | if (id == R.id.action_settings) { 36 | return true; 37 | } 38 | 39 | return super.onOptionsItemSelected(item); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 17 | 22 | 27 | 32 | 37 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishp/SheetMusicView/0a30fdd43927f5e9d31c96c044cbc8ddb7b97484/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishp/SheetMusicView/0a30fdd43927f5e9d31c96c044cbc8ddb7b97484/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishp/SheetMusicView/0a30fdd43927f5e9d31c96c044cbc8ddb7b97484/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishp/SheetMusicView/0a30fdd43927f5e9d31c96c044cbc8ddb7b97484/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishp/SheetMusicView/0a30fdd43927f5e9d31c96c044cbc8ddb7b97484/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SheetMusicViewTest 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 |