-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
56 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,7 @@ local.properties | |
# Proguard folder generated by Eclipse | ||
proguard/ | ||
.idea | ||
|
||
# IntelliJ | ||
*.iml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: android | ||
jdk: openjdk7 | ||
android: | ||
components: | ||
- build-tools-21.1.2 | ||
- extra-android-m2repository | ||
- android-19 | ||
licenses: | ||
- '.+' | ||
before_install: | ||
- chmod +x gradlew | ||
script: | ||
- ./gradlew check |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,18 @@ | ||
JFugue-for-Android | ||
================== | ||
|
||
[![Build Status](https://travis-ci.org/kshoji/JFugue-for-Android.svg?branch=master)](https://travis-ci.org/kshoji/JFugue-for-Android) | ||
|
||
Music library [JFugue](http://www.jfugue.org/) porting for Android<br /> | ||
Based on the version 4.0.3. | ||
|
||
*Currently, work in progress* | ||
|
||
Usage | ||
===== | ||
|
||
Initialization / Termination | ||
-------------- | ||
At the main Activity or Fragment, append `MidiSystem.initialize(Context)` in `onCreate` and append `MidiSystem.terminate()` in `onDestroy`. | ||
|
||
```java | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
|
||
MidiSystem.initialize(this); | ||
} | ||
|
||
@Override | ||
protected void onDestroy() { | ||
super.onDestroy(); | ||
MidiSystem.terminate(); | ||
} | ||
``` | ||
|
||
Use of JFugue | ||
------------- | ||
See the [original documents](http://www.jfugue.org/examples.html). | ||
|
||
## Playing C scale: | ||
```java | ||
Player player = new Player(); | ||
player.play("C D E F G A B"); | ||
``` | ||
|
||
Different from the original JFugue, `Player.play(...)` **doesn't block the current thread**. | ||
To wait finishing playing, `player.getSequencer().addMetaEventListener(...)` can be used. | ||
|
||
For example: | ||
```java | ||
player.getSequencer().addMetaEventListener(new MetaEventListener() { | ||
@Override | ||
public void meta(MetaMessage metaMessage) { | ||
if (MetaMessage.TYPE_END_OF_TRACK == metaMessage.getType()) { | ||
// XXX playing finished | ||
} | ||
} | ||
}); | ||
``` | ||
|
||
## Writing MusicXML to file: | ||
```java | ||
FileOutputStream file = context.openFileOutput("music.xml", MODE_PRIVATE); | ||
|
||
MusicXmlRenderer renderer = new MusicXmlRenderer(); | ||
MusicStringParser parser = new MusicStringParser(); | ||
parser.addParserListener(renderer); | ||
|
||
Pattern pattern = new Pattern("C D E F G A B |"); | ||
parser.parse(pattern); | ||
|
||
Serializer serializer = new Serializer(file, "UTF-8"); | ||
serializer.setIndent(4); | ||
serializer.write(renderer.getMusicXMLDoc()); | ||
|
||
file.flush(); | ||
file.close(); | ||
``` | ||
See [the wiki page](https://github.com/kshoji/JFugue-for-Android/wiki) for configurations and using of this library. | ||
About the JFugue features, see [the original documents](http://www.jfugue.org/examples.html). | ||
|
||
License | ||
======= | ||
- JFugue for Android's license is same as the original, [LGPL](https://www.gnu.org/licenses/lgpl.html). | ||
- Other modified referencial library's license is also same as original. See each directories' license file for more information. | ||
- Other modified referential library's license is also same as original. See each directories' license file for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Jul 07 12:29:19 JST 2014 | ||
#Fri Feb 20 18:07:10 JST 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
-54 KB
(70%)
jfugue-android/snapshot/jp/kshoji/jfugue-android/4.0.3/jfugue-android-4.0.3.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/4.0.3/jfugue-android-4.0.3.aar.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
48d9c8fbc0202308c94eb085fbb54fd4 | ||
fcc39ac695d034789c83909fc7958594 |
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/4.0.3/jfugue-android-4.0.3.aar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
d6b2a9a28500304f78996a935ae7bb1b6555f589 | ||
cb82b7f1288c6c2e7259bb46a93c1801b72d9b37 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/4.0.3/jfugue-android-4.0.3.pom.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
17a0cd981872cb0b9c1277d9befef429 | ||
000e7a39ca6e765572e3adc09cdfb46d |
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/4.0.3/jfugue-android-4.0.3.pom.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f1eeed2f3ae431acbdbff14717986580e240ef97 | ||
93138d2d02f9fb523486482f3127087e8f82e3a6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/maven-metadata.xml.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2c07e5b967a6edf1f95dce9b64fc588c | ||
2d0df02f0edbad516f45fcdd03f153fe |
2 changes: 1 addition & 1 deletion
2
jfugue-android/snapshot/jp/kshoji/jfugue-android/maven-metadata.xml.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
d2239cb1e5f6e661f2f6c9d08244857892471e3c | ||
5d8a8ec6a47ef4ba166c9ff79f73b5066a43a3f2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="jp.kshoji.jfugueforandroid"> | ||
|
||
<application android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:icon="@drawable/ic_launcher" | ||
android:theme="@style/AppTheme"> | ||
|
||
</application> | ||
|
||
</manifest> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.