[Cs-dev] User-defined layout in Csound6 for Android
Date | 2014-06-21 18:54 |
From | Michael Gogins |
Subject | [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
I would like to enable users to define their own widget layouts in Csound6 for Android. That way people could rename the sliders and buttons, re-arrange the widgets, add new widgets, and so on, e.g. to take advantage of more screen space on tablets.
My preliminary design is as follows:
This facility would enable users to edit their widget layouts, channel names, etc., along with all the other contents of the CSD file right in the Csound6 app.
It all seems quite simple and straightforward, but I would appreciate any alternative designs, comments, "gotchas," corrections, or criticisms before I begin the work.
Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com |
Date | 2014-06-21 21:40 |
From | Dave Seidel |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
Mike, This sounds great, and I will certainly use it. The design sounds reasonable to me. - Dave
On Sat, Jun 21, 2014 at 1:54 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2014-06-21 22:13 |
From | Michael Gogins |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
I thought of a problem. The views (widgets) on the activity need to be initialized when the csd is loaded so that the user can adjust them before the performance begins. I think that is possible. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sat, Jun 21, 2014 at 4:40 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2014-06-22 00:23 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
Hi, How about using the cabbage widget format? It's simple to edit and then you could create android interfaces from cabbage or CsoundQt (which can export to the cabbage format).Cheers, Andrés On Sat, Jun 21, 2014 at 4:13 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2014-06-22 00:44 |
From | Dave Seidel |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
That would indeed be very helpful. I would love to be able to port at least a subset of my SrutiDrone instrument to Android, and it would be ideal if it started from an import/copy even if additional editing would be needed to tailor the design to the set widgets exposed by the app. Anyway, the best way to bootstrap a new tool is to be able the leverage existing work. - Dave On Sat, Jun 21, 2014 at 7:23 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
|
Date | 2014-06-22 01:24 |
From | Michael Gogins |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
I will think about that. I was just going to use the standard android schema which is very widely used. On Jun 21, 2014 7:24 PM, "Andres Cabrera" <mantaraya36@gmail.com> wrote:
|
Date | 2014-06-22 19:28 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None |
Date | 2014-06-22 20:39 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
+1 ======================== Dr Victor Lazzarini Senior Lecturer NUI Maynooth, Ireland victor dot lazzarini at nuim dot ie On 22 Jun 2014, at 19:28, jpff@cs.bath.ac.uk wrote: > More or less what I was going to say; let us or proliferate formats. > If there was one then other systems could use it as well. > > ==John ff > > Quoting Andres Cabrera |
Date | 2014-06-25 13:03 |
From | Michael Gogins |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
Well, my preliminary design cannot work because XML loaded for views in the Android SDK must be compiled to a binary format before the app is loaded! I am instead investigating WebGL with the dat.GUI toolkit, which is intended for users to control the behavior of WebGL demos. It has sliders and more, and is very lightweight and easy to use.
I'm kid of excited, because WebGL is built in to all recent browsers as part of HTML 5, and is fabulously good. See http://www.chromeexperiments.com/webgl/. The little controls on some of demos are this dat.GUI thing.
It means that if I add a WebView to the Csound6 app, then some JavaScript can use the dat.GUI widgets not only to control Csound channels. In addition, with JavaScript it also becomes possible to do whatever and any sort of OpenGL programming including interactions, animations, textures, shading, and what have you. We would be back to Gabriel Maldonad's original visual CsoundAV, only on Android devices, and thanks to the progress of technology, even more capable.
The same obviously could be done using Csound's emscripten or PNaCl builds. So then my current design is: (1) Leave the current user interface as the default.
(2) If there is a CsWebGL element in the csd file, it should contain HTML5 code which will be loaded into a WebView that will appear over over the default view. All interaction with Csound in that case will be via JavaScript on that page accessing the Csound object in the app. It will be possible to swipe back and forth between the WebView and the existing view.
This design or a similar design also could perhaps (not sure) be adopted by other Csound front ends like CsoundQt. This would obviate the issue of multiple formats. Again I ask for comments.
Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sat, Jun 21, 2014 at 1:54 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2014-06-25 21:45 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
I've actually been looking into using QML for this, allowing scriptable, user-defined widgets which you can send to your mobile device on the fly... But so little time :)
Cheers, Andrés On Wed, Jun 25, 2014 at 7:03 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2014-06-25 22:10 |
From | Michael Gogins |
Subject | Re: [Cs-dev] User-defined layout in Csound6 for Android |
Attachments | None None |
I am going to proceed with adding a WebView to Csound6 for Android. I looked at Victor's PNaCl examples and they give a good idea of what is possible. There are lots of HTML 5 and WebGL demos online that show going much further would easily be possible with the PNaCl build that already exists.
For Android, the key is that once you have a WebView for your app, you can push a Java object from the app into the WebView's JavaScript context and call the object's methods from JavaScript. So pretty much all that has to be done is push the running Csound into the WebView and the code in that WebView can control Csound. I'm sure there's more to it, but that seems to be the main idea.
I saw that the Qt SDK is going to seriously beef up this side of things, they are replacing the WebKit stuff with what they call the WebEngine: This is essentially the good bits of Chromium as far as I can tell. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 25, 2014 at 4:45 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
|