[Csnd] Android Build and Examples Committed to Csound5 GIT
Date | 2012-03-02 14:52 |
From | Steven Yi |
Subject | [Csnd] Android Build and Examples Committed to Csound5 GIT |
Hi All, As there is increasing discussion of arm and Android/iOS, Victor and I cleaned up what we had and have committed it to the Csound5 GIT repository. It is placed in csound5/android. Some notes if working from GIT: * The android folder is itself an Android project that can be opened in Eclipse; use Import Project to get that project into your workspace. * To use the project, you will need to build the native library. There is a build.sh file that automatically builds the .so's. It uses the Android NDK to do this. The build.sh was done to run SWIG, then call the NDK make. The Android.mk file in the android/jni folder is what builds the library. * Building libcsoundandroid.so requires libsndfile. You will need to grab the libsndfile-android.zip that is in the file releases of Csound on Sourceforge. This zip contains libsndfile sources organized into an Android NDK style build, together with an NDK Make file (Android.mk). The csound5/android/jni/Android.mk references libsndfile-android's Android.mk to build. * Change for build files you'll need to do: update ANDROID_NDK_PATH in build.sh: export ANDROID_NDK_ROOT=$HOME/work/android-ndk-r7 as well as update LIBSNDFILE_SRC_DIR in android/jni/Android.mk: LIBSNDFILE_SRC_DIR := $(LOCAL_PATH)/../../../android/libsndfile-android/jni/ * This build uses OpenSL, but also has code for AudioTrack. To use AudioTrack, you will need to modify CsoundObj.java. We have also put together a zip of the android folder that has precompiled libcsoundandroid.so. This library has everything done already, so you can just open the project in Eclipse, compile, and run. You can use this zip as a starter for your own project and won't have to worry about compiling csound and libsndfile yourself. The libsndfile-android.zip, csound-android.zip, and a pre-compiled CsoundAndroid.apk of the example project is available at: https://sourceforge.net/projects/csound/files/csound5/Android/ The APK file is directly installable on your Android device. I've created a short URL for it available at: http://bit.ly/wrVGgg for easier typing into your browser. You will need Android 2.3.3 or higher (platform version 9) to run this application. iOS will follow soon, likely in a few weeks. It has a similar folder/build system. We currently have documentation for iOS but not Android, but they are similar API's. For now, please look at the examples project for how to use the API, and feel free to ask questions here. Thanks! steven ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/csound-devel |
Date | 2012-03-02 15:21 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
That's great. Thank you Steven and Victor! Regards, Mike On Fri, Mar 2, 2012 at 9:52 AM, Steven Yi |
Date | 2012-03-02 16:09 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
I can confirm it works very well on my Google Nexus S. I would love a really simple csd browseable app with reserved channels for XY(touch screen) and maybe accelerometer data too. A no frills player that allows interaction with the screen. I'm sure it wouldn't take long to do but I just don't have time to write one at present. There's just aren't enough hours in the day for Csound. Perhaps I'll try to persuade one of my students to write one! Big up to Steven and Victor for the work put into this. Rory. On 2 March 2012 15:21, Michael Gogins |
Date | 2012-03-02 16:23 |
From | "Dr. Richard Boulanger" |
Subject | [Csnd] Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
Attachments | None None |
Dear Victor and Steven, This is wonderful news. Congratulations and thanks for all your incredible work on this. Congratulations also on your paper for the Linux Audio Developer's Conference on this subject. I am looking forward to reading it and possibly meeting up with you in California that weekend. (I will be performing at UC Santa Barbara with Curtis Roads on April 12, but will be rehearsing and recording in San Jose for five days prior to the 12th. If you, Victor, and Joachim arrive early, I could have you down to the Open Path Recording studio and/or meet you up at Stanford. Thomas Hass will be with me and Takahiko Tsuchiya - from the Hanover Conference will be with me.) My questions, for you and the developers.... Which is the best Android device to purchase that will allow Csounders to take advantage of this work? Which is the most powerful? Which is the most affordable? -dB ___________________________________ Dr. Richard Boulanger, Ph.D. Professor of Electronic Production and Design Professional Writing and Music Technology Division Berklee College of Music 1140 Boylston Street Boston, MA 02215-3693 617-747-2485 (office) 774-488-9166 (cell) ____________________________________ ____________________________________ ____________________________________ On Mar 2, 2012, at 9:52 AM, Steven Yi wrote:
|
Date | 2012-03-02 18:12 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
Well you can always replace the CSDs in the examples and go. Victor On 2 Mar 2012, at 16:09, Rory Walsh wrote: > I can confirm it works very well on my Google Nexus S. I would love a > really simple csd browseable app with reserved channels for XY(touch > screen) and maybe accelerometer data too. A no frills player that > allows interaction with the screen. I'm sure it wouldn't take long to > do but I just don't have time to write one at present. There's just > aren't enough hours in the day for Csound. Perhaps I'll try to > persuade one of my students to write one! Big up to Steven and Victor > for the work put into this. > Rory. > > > > > On 2 March 2012 15:21, Michael Gogins |
Date | 2012-03-02 18:18 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
That' true. I'm just thinking it would be nice for anyone who doesn't want to bother with coding Java or messing with existing examples. We built a Pd app here last year that basically did the same thing. It was nice because I could email patches to users and they only needed to download it in order to run it. I'm sure it won't be long before someone builds one! On 2 March 2012 18:12, Victor Lazzarini |
Date | 2012-03-02 18:38 |
From | Steven Yi |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
Hi Rory, The examples project shows how to use the accelerometer and how to do multi-touch code. You should be able to make something rather quickly by taking those examples and building upon them. One of the reasons we did small, focused examples was to highlight a different way to use the API, so that it'd be easier to learn in small bites as well as easier to find example code to take and use for your own work. (Sidenote: The multitouch example was one I found particularly interesting to do as it uses per-instance channels and shows how to communicate from a host to target data to just a single instance of an instrument by dynamically reading/writing from/to a channel.) Hopefully this work will open up some new and interesting uses of Csound for everyone, as well as draw in more developers curious to work with the Csound API as well as on Csound itself. We'll certainly be following up with feedback and incorporating things into Csound 6 work. I think bringing in mobile platforms and working to support them in conjunction with desktop platforms will bring up some interesting topics. The nice thing is that as we move forward, all of these platforms will get all of the advancements that are introduced into Csound. Also to note, supporting mobile platforms expands how cross-platform Csound is. The result of that is that you could make a music application for the desktop on Linux, OSX, and Windows, as well as make it an Android and iOS application, and perhaps even more platforms. The CSD then becomes a cross-platform representation not only for music but music engines and music software. For example, each of the examples in the Android Examples project was built based on a previously created iOS example. All we had to do was copy the CSD from the XCode project into the Eclipse one, then recreate the User-interface and glue through the CsoundObj class (the API is normalized between Android in Java and iOS in Objective-C). The same CSD's could be used in CsoundQT or used within a native application on the desktop. It was fascinating to work with and think about, the implications of this workflow. Anyways, I've probably spent too much time thinking about all this. :) I'm really looking forward though to seeing what people will do with all this. (Can't wait until I get through the next couple releases of blue myself so I can start on building blue mobile... :) ). steven On Fri, Mar 2, 2012 at 4:09 PM, Rory Walsh |
Date | 2012-03-02 18:40 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Cs-dev] Android Build and Examples Committed to Csound5 GIT |
Attachments | None None |
Blue Mobile will be awesome! Can't wait. -dB ___________________________________ Dr. Richard Boulanger, Ph.D. Professor of Electronic Production and Design Professional Writing and Music Technology Division Berklee College of Music 1140 Boylston Street Boston, MA 02215-3693 617-747-2485 (office) 774-488-9166 (cell) ____________________________________ ____________________________________ ____________________________________ On Mar 2, 2012, at 1:38 PM, Steven Yi wrote:
|