Csound Csound-dev Csound-tekno Search About

[Cs-dev] Plugin opcodes now running in Csound 6 for Android

Date2013-06-09 18:44
FromMichael Gogins
Subject[Cs-dev] Plugin opcodes now running in Csound 6 for Android
AttachmentsNone  None  
I'm now listening to one of Ian Mccurdy's Csound Haiku, which use the signal flow graph opcode library's alwayson opcode, on my phone. This is a plugin opcode library.

In order to get plugin opcodes working for Csound 6 on Android, this is what I did:

(1) Copied all .so files and other .so files on which they depend (including the gnu stlport lib) into CsoundAndroid/libs/<arch> folders

(2) Set OPCODE6DIR to the native library dir of the app BEFORE Csound starts. This field is public since Android 2.3.3 which is SDK 10.

                                        String OPCODE6DIR = getBaseContext().getApplicationInfo().nativeLibraryDir;
// Set these BEFORE starting Csound.
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);

(3) In CsoundAppActivity, use Java to preload these libs in order to debug the loading process. LuaJIT is still not loading, but I'm pretty sure it won't take much more to get it loading, it's the soname is wrong... This only works after the CsoundObj is created, and it only works after the first run which does not work. Still needs some debugging, but basically it works.

// Pre-load plugin opcodes, just to ensure that they 
// actually will load from Csound.
File file = new File(OPCODE6DIR);
File[] files = file.listFiles();
for (int i = 0; i < files.length; i++) {
String pluginPath = files[i].getAbsoluteFile().toString();
try {
CsoundAppActivity.this.postMessage("Loading Csound plugin:" + pluginPath);
System.load(pluginPath); 

} catch (Throwable e) {
Log.d("Csound6", e.toString());
}
}





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2013-06-09 18:59
FromVictor Lazzarini
SubjectRe: [Cs-dev] Plugin opcodes now running in Csound 6 for Android
That makes sense, because Csound will try to load plugins when it starts.

Victor
On 9 Jun 2013, at 18:44, Michael Gogins wrote:

> (2) Set OPCODE6DIR to the native library dir of the app BEFORE Csound starts. This field is public since Android 2.3.3 which is SDK 10.

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-10 17:19
FromSteven Yi
SubjectRe: [Cs-dev] Plugin opcodes now running in Csound 6 for Android
Hi Michael,

I was happy to read this email after getting back from my trip last
night. Fantastic!  Thanks very much for researching and figuring out a
solution for all this.

Looking forward to trying it out!
steven

On Sun, Jun 9, 2013 at 1:59 PM, Victor Lazzarini
 wrote:
> That makes sense, because Csound will try to load plugins when it starts.
>
> Victor
> On 9 Jun 2013, at 18:44, Michael Gogins wrote:
>
>> (2) Set OPCODE6DIR to the native library dir of the app BEFORE Csound starts. This field is public since Android 2.3.3 which is SDK 10.
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net