Csound Csound-dev Csound-tekno Search About

[Cs-dev] Csound Emscripten

Date2013-12-03 19:25
FromEdward Costello
Subject[Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-03 19:51
FromRory Walsh
SubjectRe: [Cs-dev] Csound Emscripten
The fact that this runs on any browser does help to ignore some of the
drawbacks. Nice interface. Is the page dynamic? It would be great to
have a list of Csound opcode examples on the left. Single click and
load the corresponding csd, and then away you go, an interactive
Csound manual. The latency between the widgets and the audio is far
more noticeable than in the pnacl, can that be addressed? Great stuff.
Csound is sprouting up everywhere these days!

On 3 December 2013 19:25, Edward Costello  wrote:
> Hi,
>
> I put up a website to show some examples of using the Csound library
> compiled to javascript using Emscripten, a project Steven and I have been
> working on. This method of running Csound on the web has a number of
> drawbacks in terms of performance, reliability and lack of thread support,
> but it can run on any browser that supports Web Audio because it is just
> javascript.
> Firefox is probably the best browser to run on as Emscripten compiles to a
> small subset of javascript called asm.js which Firefox has optimised for, it
> does however run simple csds fine on other browsers (haven’t tested IE
> though). This is all very preliminary so there are going to be a lot a bugs,
> I haven’t been able to do that much testing. Just thought that people would
> be interested in seeing it working.
>
> http://eddyc.github.io/CsoundEmscripten/
>
> Ed
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-03 19:51
FromRory Walsh
SubjectRe: [Cs-dev] Csound Emscripten
btw, it rans straight out of the box on my Linux machine. No need to
update anything.

On 3 December 2013 19:51, Rory Walsh  wrote:
> The fact that this runs on any browser does help to ignore some of the
> drawbacks. Nice interface. Is the page dynamic? It would be great to
> have a list of Csound opcode examples on the left. Single click and
> load the corresponding csd, and then away you go, an interactive
> Csound manual. The latency between the widgets and the audio is far
> more noticeable than in the pnacl, can that be addressed? Great stuff.
> Csound is sprouting up everywhere these days!
>
> On 3 December 2013 19:25, Edward Costello  wrote:
>> Hi,
>>
>> I put up a website to show some examples of using the Csound library
>> compiled to javascript using Emscripten, a project Steven and I have been
>> working on. This method of running Csound on the web has a number of
>> drawbacks in terms of performance, reliability and lack of thread support,
>> but it can run on any browser that supports Web Audio because it is just
>> javascript.
>> Firefox is probably the best browser to run on as Emscripten compiles to a
>> small subset of javascript called asm.js which Firefox has optimised for, it
>> does however run simple csds fine on other browsers (haven’t tested IE
>> though). This is all very preliminary so there are going to be a lot a bugs,
>> I haven’t been able to do that much testing. Just thought that people would
>> be interested in seeing it working.
>>
>> http://eddyc.github.io/CsoundEmscripten/
>>
>> Ed
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-03 20:01
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  

Date2013-12-03 20:06
FromRory Walsh
SubjectRe: [Cs-dev] Csound Emscripten
I'd say it is more a step forwards and to the side ;) I think Victor's
pnacl/chrome experiments are still a little ahead of Google's own
developments!

On 3 December 2013 20:01,   wrote:
>
> Quoting Rory Walsh :
>
>> btw, it rans straight out of the box on my Linux machine. No need to
>> update anything.
>
>
> We too, on Linux/Seamonkey.  Agree that the latency is noticeable but....
> Not having nor wanting Chrome this sees a step forward.  How are the
> widgets specified?
>
> ==John ff
>
>
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-03 20:41
FromEdward Costello
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-04 09:06
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
I tried on Android using Chrome. I get sound but it’s full of dropouts. My impression is that with the current browser technology,
javascript still lags far behind native speeds. New engines will improve this.
I think it’s worth trying it, though. 

Victor
On 3 Dec 2013, at 20:41, Edward Costello  wrote:

> Its great that its working on linux I haven’t checked it working on anything other than Mavericks.
> 
> I have noticed that especially on Firefox the latency for the widgets is quite noticeable. This I think is browser specific as the latency on Safari is barely noticeable at all.
> 
> The widgets are specified using standard html elements, in the widget demo the ‘range’ widget is used to produce a slider. When a widgets value is changed it calls a setControlChannelValue method for the csound object, this is declared in the CsoundObj.js file.
> -- 
> Edward Costello
> 
> On Tuesday 3 December 2013 at 21:06, Rory Walsh wrote:
> 
>> I'd say it is more a step forwards and to the side ;) I think Victor's
>> pnacl/chrome experiments are still a little ahead of Google's own
>> developments!
>> 
>> On 3 December 2013 20:01,  wrote:
>>> 
>>> Quoting Rory Walsh :
>>> 
>>>> btw, it rans straight out of the box on my Linux machine. No need to
>>>> update anything.
>>> 
>>> 
>>> We too, on Linux/Seamonkey. Agree that the latency is noticeable but....
>>> Not having nor wanting Chrome this sees a step forward. How are the
>>> widgets specified?
>>> 
>>> ==John ff
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Sponsored by Intel(R) XDK
>>> Develop, test and display web and hybrid apps with a single code base.
>>> Download it for free now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 11:22
FromEdward Costello
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-04 13:30
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
If you don’t like Chrome, you could try Chromium. I think version 31 will run the csound pnacl code.
On 3 Dec 2013, at 20:01, jpff@cs.bath.ac.uk wrote:

> 
> Quoting Rory Walsh :
> 
>> btw, it rans straight out of the box on my Linux machine. No need to
>> update anything.
> 
> 
> We too, on Linux/Seamonkey.  Agree that the latency is noticeable but....
> Not having nor wanting Chrome this sees a step forward.  How are the  
> widgets specified?
> 
> ==John ff
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 19:28
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
Ed, 

how do we get messages off Csound (in the previous code they went to the console, but here I don’t see them).
I am going to show your work here in the Ubiquitous Music Workshop and I wanted to adapt your examples to
show Csound messages.

Victor

On 3 Dec 2013, at 19:25, Edward Costello  wrote:

> Hi,
> 
> I put up a website to show some examples of using the Csound library compiled to javascript using Emscripten, a project Steven and I have been working on. This method of running Csound on the web has a number of drawbacks in terms of performance, reliability and lack of thread support, but it can run on any browser that supports Web Audio because it is just javascript. 
> Firefox is probably the best browser to run on as Emscripten compiles to a small subset of javascript called asm.js which Firefox has optimised for, it does however run simple csds fine on other browsers (haven’t tested IE though). This is all very preliminary so there are going to be a lot a bugs, I haven’t been able to do that much testing. Just thought that people would be interested in seeing it working.
> 
> http://eddyc.github.io/CsoundEmscripten/
> 
> Ed
>  
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 19:37
FromEdward Costello
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-04 19:48
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
I’ll try safari, because it does not show on Chrome.
On 4 Dec 2013, at 19:37, Edward Costello  wrote:

> They should be there. As there are a number of other elements on the page you should see a few warnings and errors from some of the GUI, but if you have the console open and press compile you should see new messages come out. Works here on Firefox and Safari and Chromium, actually Chromium just shows csound messages without the UI errors.
> 
> -- 
> Edward Costello
> 
> On Wednesday 4 December 2013 at 20:28, Victor Lazzarini wrote:
> 
>> Ed,
>> 
>> how do we get messages off Csound (in the previous code they went to the console, but here I don’t see them).
>> I am going to show your work here in the Ubiquitous Music Workshop and I wanted to adapt your examples to
>> show Csound messages.
>> 
>> Victor
>> 
>> On 3 Dec 2013, at 19:25, Edward Costello  wrote:
>> 
>>> Hi,
>>> 
>>> I put up a website to show some examples of using the Csound library compiled to javascript using Emscripten, a project Steven and I have been working on. This method of running Csound on the web has a number of drawbacks in terms of performance, reliability and lack of thread support, but it can run on any browser that supports Web Audio because it is just javascript.
>>> Firefox is probably the best browser to run on as Emscripten compiles to a small subset of javascript called asm.js which Firefox has optimised for, it does however run simple csds fine on other browsers (haven’t tested IE though). This is all very preliminary so there are going to be a lot a bugs, I haven’t been able to do that much testing. Just thought that people would be interested in seeing it working.
>>> 
>>> http://eddyc.github.io/CsoundEmscripten/
>>> 
>>> Ed
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 19:49
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
Oh yes I can see it now on Chrome, thanks.
On 4 Dec 2013, at 19:37, Edward Costello  wrote:

> They should be there. As there are a number of other elements on the page you should see a few warnings and errors from some of the GUI, but if you have the console open and press compile you should see new messages come out. Works here on Firefox and Safari and Chromium, actually Chromium just shows csound messages without the UI errors.
> 
> -- 
> Edward Costello
> 
> On Wednesday 4 December 2013 at 20:28, Victor Lazzarini wrote:
> 
>> Ed,
>> 
>> how do we get messages off Csound (in the previous code they went to the console, but here I don’t see them).
>> I am going to show your work here in the Ubiquitous Music Workshop and I wanted to adapt your examples to
>> show Csound messages.
>> 
>> Victor
>> 
>> On 3 Dec 2013, at 19:25, Edward Costello  wrote:
>> 
>>> Hi,
>>> 
>>> I put up a website to show some examples of using the Csound library compiled to javascript using Emscripten, a project Steven and I have been working on. This method of running Csound on the web has a number of drawbacks in terms of performance, reliability and lack of thread support, but it can run on any browser that supports Web Audio because it is just javascript.
>>> Firefox is probably the best browser to run on as Emscripten compiles to a small subset of javascript called asm.js which Firefox has optimised for, it does however run simple csds fine on other browsers (haven’t tested IE though). This is all very preliminary so there are going to be a lot a bugs, I haven’t been able to do that much testing. Just thought that people would be interested in seeing it working.
>>> 
>>> http://eddyc.github.io/CsoundEmscripten/
>>> 
>>> Ed
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 19:50
FromSteven Yi
SubjectRe: [Cs-dev] Csound Emscripten
Hi Ed,

This is awesome. :)  I think even at this point it demonstrates a lot.
If they can run 3D game engines with Emscripten, I'd like to think
there's a lot of optimization we can do to improve things.

Question: I don't remember where we last left it, but did you compile
the libs with -O0 still or move to -O2?  I'm thinking we might try
bumping things to -O2 and removing the export-all stuff since the only
JS functions we'd really need to concern ourselves with are the ones
in the Embind file.

Also, would everyone be alright if we integrated this work into the
main CS6 repo?  We did have to make a few changes to Csound code to
allow for compiling without Pthreads.  My thought when I first did
some of the changes was that it would be generic, but I'm thinking now
to make it compiler dependent (i.e. ifdef(EMSCRIPTEN) instead of
ifdef(HAVE_PTHREADS)).

Thanks!
steven

On Wed, Dec 4, 2013 at 6:22 AM, Edward Costello
 wrote:
> Yeah, I think its lucky it works at all let alone on mobile devices. I  also
> think there is probably a fair amount of testing and optimisation that can
> be done but due to the nature of audio processing it may be difficult to get
> it working reliably with javascript. Well its still early days in terms of
> this kind of technology, perhaps asm.js will catch on and improve over time,
> even web audio is in it’s infancy and I don’t think the ScriptProcessorNode
> (which gives direct access to samples in javascript) was meant to be abused
> in this way.
>
> --
> Edward Costello
>
> On Wednesday 4 December 2013 at 10:06, Victor Lazzarini wrote:
>
> I tried on Android using Chrome. I get sound but it’s full of dropouts. My
> impression is that with the current browser technology,
> javascript still lags far behind native speeds. New engines will improve
> this.
> I think it’s worth trying it, though.
>
> Victor
> On 3 Dec 2013, at 20:41, Edward Costello  wrote:
>
> Its great that its working on linux I haven’t checked it working on anything
> other than Mavericks.
>
> I have noticed that especially on Firefox the latency for the widgets is
> quite noticeable. This I think is browser specific as the latency on Safari
> is barely noticeable at all.
>
> The widgets are specified using standard html elements, in the widget demo
> the ‘range’ widget is used to produce a slider. When a widgets value is
> changed it calls a setControlChannelValue method for the csound object, this
> is declared in the CsoundObj.js file.
> --
> Edward Costello
>
> On Tuesday 3 December 2013 at 21:06, Rory Walsh wrote:
>
> I'd say it is more a step forwards and to the side ;) I think Victor's
> pnacl/chrome experiments are still a little ahead of Google's own
> developments!
>
> On 3 December 2013 20:01,  wrote:
>
>
> Quoting Rory Walsh :
>
> btw, it rans straight out of the box on my Linux machine. No need to
> update anything.
>
>
>
> We too, on Linux/Seamonkey. Agree that the latency is noticeable but....
> Not having nor wanting Chrome this sees a step forward. How are the
> widgets specified?
>
> ==John ff
>
>
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 20:11
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
I don’t see a problem integrating the code into the Csound repo.
And yes, it is very good work. It must have been a hard job to get it to build correctly.

One thing I noticed when trying to run Trapped in the earlier version Ed had 
given me was that it would fail with lots of memory warnings.

Victor
On 4 Dec 2013, at 19:50, Steven Yi  wrote:

> Hi Ed,
> 
> This is awesome. :)  I think even at this point it demonstrates a lot.
> If they can run 3D game engines with Emscripten, I'd like to think
> there's a lot of optimization we can do to improve things.
> 
> Question: I don't remember where we last left it, but did you compile
> the libs with -O0 still or move to -O2?  I'm thinking we might try
> bumping things to -O2 and removing the export-all stuff since the only
> JS functions we'd really need to concern ourselves with are the ones
> in the Embind file.
> 
> Also, would everyone be alright if we integrated this work into the
> main CS6 repo?  We did have to make a few changes to Csound code to
> allow for compiling without Pthreads.  My thought when I first did
> some of the changes was that it would be generic, but I'm thinking now
> to make it compiler dependent (i.e. ifdef(EMSCRIPTEN) instead of
> ifdef(HAVE_PTHREADS)).
> 
> Thanks!
> steven
> 
> On Wed, Dec 4, 2013 at 6:22 AM, Edward Costello
>  wrote:
>> Yeah, I think its lucky it works at all let alone on mobile devices. I  also
>> think there is probably a fair amount of testing and optimisation that can
>> be done but due to the nature of audio processing it may be difficult to get
>> it working reliably with javascript. Well its still early days in terms of
>> this kind of technology, perhaps asm.js will catch on and improve over time,
>> even web audio is in it’s infancy and I don’t think the ScriptProcessorNode
>> (which gives direct access to samples in javascript) was meant to be abused
>> in this way.
>> 
>> --
>> Edward Costello
>> 
>> On Wednesday 4 December 2013 at 10:06, Victor Lazzarini wrote:
>> 
>> I tried on Android using Chrome. I get sound but it’s full of dropouts. My
>> impression is that with the current browser technology,
>> javascript still lags far behind native speeds. New engines will improve
>> this.
>> I think it’s worth trying it, though.
>> 
>> Victor
>> On 3 Dec 2013, at 20:41, Edward Costello  wrote:
>> 
>> Its great that its working on linux I haven’t checked it working on anything
>> other than Mavericks.
>> 
>> I have noticed that especially on Firefox the latency for the widgets is
>> quite noticeable. This I think is browser specific as the latency on Safari
>> is barely noticeable at all.
>> 
>> The widgets are specified using standard html elements, in the widget demo
>> the ‘range’ widget is used to produce a slider. When a widgets value is
>> changed it calls a setControlChannelValue method for the csound object, this
>> is declared in the CsoundObj.js file.
>> --
>> Edward Costello
>> 
>> On Tuesday 3 December 2013 at 21:06, Rory Walsh wrote:
>> 
>> I'd say it is more a step forwards and to the side ;) I think Victor's
>> pnacl/chrome experiments are still a little ahead of Google's own
>> developments!
>> 
>> On 3 December 2013 20:01,  wrote:
>> 
>> 
>> Quoting Rory Walsh :
>> 
>> btw, it rans straight out of the box on my Linux machine. No need to
>> update anything.
>> 
>> 
>> 
>> We too, on Linux/Seamonkey. Agree that the latency is noticeable but....
>> Not having nor wanting Chrome this sees a step forward. How are the
>> widgets specified?
>> 
>> ==John ff
>> 
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 20:45
FromEdward Costello
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-04 21:09
FromSteven Yi
SubjectRe: [Cs-dev] Csound Emscripten
Ah, thanks for the update!  Was hoping we could figure out a simple
flag change to get better performance. Not so simple. :P  I guess
we'll have to do some kind of profiling if that's possible.  Maybe
turn off messages and other things from Csound too.

On Wed, Dec 4, 2013 at 3:45 PM, Edward Costello
 wrote:
> I have been compiling with O2 now, I tried O3 but that fails which the
> emscripten people say is to be expected. Yes if removing the export-all
> stuff will make performance improvements I think this is definitely the way
> to go.
> At the moment I stopped trying to make an embind file because they have
> turned off compiling to asm.js with embind due to compilation errors, also
> they are not allowing the passing of raw pointers into methods that are not
> pointers to classes. What I have now is just an object oriented style C file
> that declares a CsoundObj struct  and a number of functions that take the
> struct as the first argument and wrap a few of the csoundAPIs functions,
> these  CsoundObj functions are then wrapped into a javascript class. This
> will need to be improved on a good bit, perhaps making it similar to the C++
> or Obj-C  csound classes would be best.
> Victor, I tried to get Trapped running myself but there are a few things
> that aren’t working properly, one I can remember off the top of my head is
> that Gen5 wasn’t working. I haven’t had a chance to investigate what might
> be wrong yet though.
>
> --
> Edward Costello
>
> On Wednesday 4 December 2013 at 21:11, Victor Lazzarini wrote:
>
> I don’t see a problem integrating the code into the Csound repo.
> And yes, it is very good work. It must have been a hard job to get it to
> build correctly.
>
> One thing I noticed when trying to run Trapped in the earlier version Ed had
> given me was that it would fail with lots of memory warnings.
>
> Victor
> On 4 Dec 2013, at 19:50, Steven Yi  wrote:
>
> Hi Ed,
>
> This is awesome. :) I think even at this point it demonstrates a lot.
> If they can run 3D game engines with Emscripten, I'd like to think
> there's a lot of optimization we can do to improve things.
>
> Question: I don't remember where we last left it, but did you compile
> the libs with -O0 still or move to -O2? I'm thinking we might try
> bumping things to -O2 and removing the export-all stuff since the only
> JS functions we'd really need to concern ourselves with are the ones
> in the Embind file.
>
> Also, would everyone be alright if we integrated this work into the
> main CS6 repo? We did have to make a few changes to Csound code to
> allow for compiling without Pthreads. My thought when I first did
> some of the changes was that it would be generic, but I'm thinking now
> to make it compiler dependent (i.e. ifdef(EMSCRIPTEN) instead of
> ifdef(HAVE_PTHREADS)).
>
> Thanks!
> steven
>
> On Wed, Dec 4, 2013 at 6:22 AM, Edward Costello
>  wrote:
>
> Yeah, I think its lucky it works at all let alone on mobile devices. I also
> think there is probably a fair amount of testing and optimisation that can
> be done but due to the nature of audio processing it may be difficult to get
> it working reliably with javascript. Well its still early days in terms of
> this kind of technology, perhaps asm.js will catch on and improve over time,
> even web audio is in it’s infancy and I don’t think the ScriptProcessorNode
> (which gives direct access to samples in javascript) was meant to be abused
> in this way.
>
> --
> Edward Costello
>
> On Wednesday 4 December 2013 at 10:06, Victor Lazzarini wrote:
>
> I tried on Android using Chrome. I get sound but it’s full of dropouts. My
> impression is that with the current browser technology,
> javascript still lags far behind native speeds. New engines will improve
> this.
> I think it’s worth trying it, though.
>
> Victor
> On 3 Dec 2013, at 20:41, Edward Costello  wrote:
>
> Its great that its working on linux I haven’t checked it working on anything
> other than Mavericks.
>
> I have noticed that especially on Firefox the latency for the widgets is
> quite noticeable. This I think is browser specific as the latency on Safari
> is barely noticeable at all.
>
> The widgets are specified using standard html elements, in the widget demo
> the ‘range’ widget is used to produce a slider. When a widgets value is
> changed it calls a setControlChannelValue method for the csound object, this
> is declared in the CsoundObj.js file.
> --
> Edward Costello
>
> On Tuesday 3 December 2013 at 21:06, Rory Walsh wrote:
>
> I'd say it is more a step forwards and to the side ;) I think Victor's
> pnacl/chrome experiments are still a little ahead of Google's own
> developments!
>
> On 3 December 2013 20:01,  wrote:
>
>
> Quoting Rory Walsh :
>
> btw, it rans straight out of the box on my Linux machine. No need to
> update anything.
>
>
>
> We too, on Linux/Seamonkey. Agree that the latency is noticeable but....
> Not having nor wanting Chrome this sees a step forward. How are the
> widgets specified?
>
> ==John ff
>
>
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 23:06
FromEdward Costello
SubjectRe: [Cs-dev] Csound Emscripten
AttachmentsNone  None  None  None  

Date2013-12-04 23:25
FromRichard Dobson
SubjectRe: [Cs-dev] Csound Emscripten
Ow, it will need to. Just about anyone could have told them that 
approach would not work. Without it it will be just another passive 
media player with visualisations, and technically more or less dead in 
the water.

Richard Dobson

On 04/12/2013 23:06, Edward Costello wrote:
> Yeah, it’ll need a bit of attention alright. There are many errors that
> appear on final compilation that could be causing speed issues as well.
> On the Web Audio front I found out some bad news there earlier about the
> javascript audio processing callback, apparently it operates on the main
> thread so any blocking done by the webpage will cause dropouts in audio
> playback. Thats a bummer but the working group is discussing changing
> this in the future so audio can be on a background thread, hopefully
> this gets changed soon.
>


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-04 23:50
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound Emscripten
That would make sense, because expon is also not working, so there is a problem with the code for exponential expressions.
On 4 Dec 2013, at 20:45, Edward Costello  wrote:

> Victor, I tried to get Trapped running myself but there are a few things that aren’t working properly, one I can remember off the top of my head is that Gen5 wasn’t working. I haven’t had a chance to investigate what might be wrong yet though.


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net