Csound Csound-dev Csound-tekno Search About

[Cs-dev] User-defined layout in Csound6 for Android

Date2014-06-21 18:54
FromMichael Gogins
Subject[Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2014-06-21 21:40
FromDave Seidel
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-06-21 22:13
FromMichael Gogins
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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 Gogins
Irreducible 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:
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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-06-22 00:23
FromAndres Cabrera
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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).

I would suggest against using yet another XML format. In retrospect, it would've been ideal for CsoundQt to use the same format for widgets as cabbage.

Cheers,
Andrés


On Sat, Jun 21, 2014 at 4:13 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
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 Gogins
Irreducible 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:
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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-06-22 00:44
FromDave Seidel
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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:
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).

I would suggest against using yet another XML format. In retrospect, it would've been ideal for CsoundQt to use the same format for widgets as cabbage.

Cheers,
Andrés


On Sat, Jun 21, 2014 at 4:13 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
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 Gogins
Irreducible 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:
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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-06-22 01:24
FromMichael Gogins
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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:
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).

I would suggest against using yet another XML format. In retrospect, it would've been ideal for CsoundQt to use the same format for widgets as cabbage.

Cheers,
Andrés


On Sat, Jun 21, 2014 at 4:13 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
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 Gogins
Irreducible 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:
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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-06-22 19:28
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  

Date2014-06-22 20:39
FromVictor Lazzarini
SubjectRe: [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 :
> 
>> 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).
>> 
>> I would suggest against using yet another XML format. In retrospect, it
>> would've been ideal for CsoundQt to use the same format for widgets as
>> cabbage.
>> 
>> Cheers,
>> Andrés
>> 
>> 
>> On Sat, Jun 21, 2014 at 4:13 PM, Michael Gogins 
>> wrote:
>> 
>>> 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 Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Sat, Jun 21, 2014 at 4:40 PM, Dave Seidel 
>>> wrote:
>>> 
>>>> 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:
>>>> 
>>>>> 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:
>>>>> 
>>>>>   1. There is a new  tag (element) in the CSD
>>>>>   file. The user will be able to specify any kind of Android  
>>>>> layout in the
>>>>>   standard manner in this element. I do not believe there is any need to
>>>>>   change any core Csound code, as I believe that the CSD parsing code as
>>>>>   written will simply skip over any unrecognized tags.
>>>>>   2. There will be a simple naming convention for the view to channel
>>>>>   mapping. Views of the right class that have tags beginning with
>>>>>   "csoundChannel:" will be mapped. The tag text following  
>>>>> "csoundChannel:"
>>>>>   will be used as the channel name. E.g. the tag "csoundChannel:lowpass
>>>>>   cutoff" will be mapped to Csound channel "lowpass  
>>>>> cutoff".Please note, the
>>>>>   view tag is not the same as the view text, this is to permit  
>>>>> future use of
>>>>>   TextViews to send data to or receive data from Csound string channels.
>>>>>   3. In the listener for playing Csound, the CsoundAppActivity class
>>>>>   will attempt to locate this tag in the CSD file. If the  
>>>>> element is found,
>>>>>   the CsoundAppActivity layout will be re-created using this  
>>>>> element in place
>>>>>   of the layout in main.xml that is built into the app.
>>>>>   4. The CsoundAppActivity class will then iterate over the child
>>>>>   views of the layout, recursively, and build up a list of all  
>>>>> child views
>>>>>   (widgets) in the activity.
>>>>>   5. The CsoundAppActivity class will then iterate over the list of
>>>>>   child views. Sliders, buttons, trackpads, and perhaps others, will be
>>>>>   passed to the appropriate CsoundObj.addSlider,  
>>>>> CsoundObj.addButton, and so
>>>>>   on calls. As I understand it, this completely prepares the  
>>>>> widget listener
>>>>>   and Csound channel for that widget. As noted, the name of the Csound
>>>>>   channel will be derived from the view's tag.
>>>>>   6. It would still be the case the numerical values of control values
>>>>>   would be normalized between 0 and 1.
>>>>> 
>>>>> 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 Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>>> http://p.sf.net/sfu/hpccsystems
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>> http://p.sf.net/sfu/hpccsystems
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>>> Find What Matters Most in Your Big Data with HPCC Systems
>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>> http://p.sf.net/sfu/hpccsystems
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-06-25 13:03
FromMichael Gogins
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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 Gogins
Irreducible 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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


Date2014-06-25 21:45
FromAndres Cabrera
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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:
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 Gogins
Irreducible 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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-06-25 22:10
FromMichael Gogins
SubjectRe: [Cs-dev] User-defined layout in Csound6 for Android
AttachmentsNone  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 Gogins
Irreducible 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:
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:
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 Gogins
Irreducible 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:
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:
  1. There is a new <CsoundAppActivityLayout> tag (element) in the CSD file. The user will be able to specify any kind of Android layout in the standard manner in this element. I do not believe there is any need to change any core Csound code, as I believe that the CSD parsing code as written will simply skip over any unrecognized tags.
  2. There will be a simple naming convention for the view to channel mapping. Views of the right class that have tags beginning with "csoundChannel:" will be mapped. The tag text following "csoundChannel:" will be used as the channel name. E.g. the tag "csoundChannel:lowpass cutoff" will be mapped to Csound channel "lowpass cutoff".Please note, the view tag is not the same as the view text, this is to permit future use of TextViews to send data to or receive data from Csound string channels.
  3. In the listener for playing Csound, the CsoundAppActivity class will attempt to locate this tag in the CSD file. If the element is found, the CsoundAppActivity layout will be re-created using this element in place of the layout in main.xml that is built into the app.
  4. The CsoundAppActivity class will then iterate over the child views of the layout, recursively, and build up a list of all child views (widgets) in the activity.
  5. The CsoundAppActivity class will then iterate over the list of child views. Sliders, buttons, trackpads, and perhaps others, will be passed to the appropriate CsoundObj.addSlider, CsoundObj.addButton, and so on calls. As I understand it, this completely prepares the widget listener and Csound channel for that widget. As noted, the name of the Csound channel will be derived from the view's tag.
  6. It would still be the case the numerical values of control values would be normalized between 0 and 1.
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 Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft

_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel