-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
176 lines (129 loc) · 6.75 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
ATM (Audio2Midi) for Android
Authors:
Max Kastanas <max2idea@users.sourceforge.net>
Naval Saini <navalnovel@gmail.com>
================================================================================
1. What is ATM?
ATM or Audio To Midi is a library for Android devices that recognized and
converts raw audio to midi notes. ATM is using Android ports of aubio, fftw, libsndfile,
and libsamplerate, see file THANKS for more info.
===============================================================================
2. Requirements:
a. Apache Ant (1.7.1)
http://ant.apache.org/bindownload.cgi
b. Android NDK (Android r5-linux)
http://developer.android.com/sdk/ndk/index.html
Unzip the contents under a directory ie:
/home/yourname/tools/android-sdk-linux_86
c. Android SDK (Android r08-linux)
http://developer.android.com/sdk/index.html
Unzip the contents under a directory ie:
/home/yourname/tools/android-ndk-r5
d. Include the Android SDK tools directory in your user PATH variable:
export PATH=$PATH:/home/dev/tools/android-sdk-linux_86/tools:/home/yourname/tools/android-ndk-r5
e. Download an SDK Android platform, in a command shell type: "android &"
to start up the "Android SDK and AVD Manager". Download an SDK
platform (Android 2.1 and above is recommended) under the
"Available Packages" section.
f. Java SDK (1.6 and above)
http://www.oracle.com/technetwork/java/javase/downloads/index.html
g. Netbeans (6.9 and above) - Optional if you want to use Netbeans as
the IDE:
http://netbeans.org/downloads/
h. Netbeans Android plugin (0.11 and above) - Optional if you are using
the Netbeans IDE:
http://kenai.com/projects/nbandroid/pages/Install
===============================================================================
2. Setup
a. Untar the tar.gz file:
tar -zxf audio2midi-0.9b.tar.gz
b. Update the properties files with the path to the sdk and ndk tools:
.../audio2midi/build.properties
sdk.dir=/home/yourname/tools/android-sdk-linux_86
ndk.dir=/home/yourname/tools/android-ndk-r5
c. Include the Android SDK platform directory in your user PATH variable
export PATH=$PATH:/home/dev/tools/android-sdk-linux_86/platforms-tools
d. Create a new Android device, in a command shell type: "android".
This will start the android SDK and AVD Manager
Under Virtual Devices create an AVD device and name it as "Android2.1"
e. Update (if needed) project file with the right virtual device as above:
.../audio2midi/nbproject/project.properties
platform.active=Android2.1
f. The relevant audio2midi android C code as well as Android ports for
libraries aubio, fftw, libsndfile, and libsamplerate can be found under
the ".../project/jni" directory.
===============================================================================
3. Build
a. To build the app make sure you're under the project directory:
$> cd /home/yourname/.../audio2midi
b. To build the application type:
$> ant jar
===============================================================================
4. Run
a. Now search under the .../audio2midi/dist directory for a .apk
file. You can copy the .apk file to your SD card by typing (make
sure the Android Emulator is on):
$> adb push Audio2Midi.apk /sdcard/
Then you can open it and install it from within your Android device
using a Filemanager like Astro. Make sure that you have turned on the
"Unknown Sources" Option under Application settings.
===============================================================================
6. Developing with Netbeans
To develop and build with Netbeans make sure you have installed the nbandroid
plugin (see requirements. Once you have that install a new Java platform under
the Tool -> Java Platforms and choose a Google Android platform, navigate
under the SDK platform directory you downloaded under step 1e. Finally, just
open the .../audio2midi directory as a Netbeans project.
===============================================================================
7. Debugging
You can use gdb to debug the app. Before you do so make sure you have the
following attribute in your AndroidManifest.xml file:
android:debuggable="true"
Now rebuild the application and start the Android Emulator, then in a command
shell type:
$> ndk-gdb --project=<path-to>/android/project
This will start gdb in remote debugging, similarly you can follow the same
steps to debug a physical device
===============================================================================
3. Install Demo
You can install a sample application that makes use of ATM from
http://code.google.com/p/audio2midi
===============================================================================
5. Android Emulator
If you don't have a device you can install and run the Audio To Midi Demo in the Android
emulator.
Note: Recording will only work on a physical device.
To do so follow these steps:
$> android
Under the virtual devices find your device "Android2.1" and start it up
In a command line type:
$> adb install AudioToMidi.apk
You can now find the Firewall Knock Operator app under the menu tap on
the icon to get started.
===============================================================================
4. License
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
===============================================================================
5. Release Notes
ATM v0.9b (Sep 12, 2011)
What's new:
- Support for Wav to Midi Notes conversion (only file as an input, synthesized MIDI output - no midi file)
- Support for PCM to Wav conversion
===============================================================================
6. TODO:
- Support for standard MIDI file format output
- Support for realtime conversion to MIDI (perhaps JACK, ALSA SEQ on rooted phones)
- Support for native MIDI playback (QSynth)
Copyright � 2011 ATM
http://code.google.com/audio2midi
Endofdoc