Re: [Csnd-dev] CMask ported to WebAssembly as part of csound-extended

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] CMask ported to WebAssembly as part of csound-extended

Doctor B
Michael,

Awesome.  Will this be added to the manual and the next general release?  Hope so.

-dB

_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: 
http://www.boulangerlabs.com/#about
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: [hidden email]
facebook: https://www.facebook.com/richard.boulanger.58

On Tue, Apr 3, 2018 at 3:43 PM, Michael Gogins <[hidden email]> wrote:
I have, after successfully asking the author to change the license of
CMask to one compatible with csound-extended, ported Andre Bartetzki's
CMask program to WebAssembly and it now is part of the WebAssembly
build of csound-extended.

A live demo can be viewed at
https://gogins.github.io/csound-extended/cmask.html.

This little project has been instructive for me. First, I found it is
fairly easy to port existing C/C++ algorithmic code to WebAssembly and
it incorporate the results into csound-extended. Second, just as
expected, anything with a JavaScript interface will work with anything
else with a JavaScript interface. Third, currently the integration of
multiple WebAssembly modules in one Web page is not possible without
some hacking.

In this case, I simply built CMask as a WebAssembly library and linked
it into the csound-extended module. In other cases, it is possible to
load different WebAssembly modules in different function scopes (you
can't do that simply by using a different <script> element for each
WebAssembly module).

In the future, it should be possible to simply use any WebAssembly
module as an ECMAScript module, and this problem should go away.

Regards,
Mike

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

Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] CMask ported to WebAssembly as part of csound-extended

Michael Gogins-2
Thanks for your interest in this project!

Due to the recent reorganization of the Csound repository, some of my
projects have been moved out of the core Csound repository and into a
new csound-extended repository. This CMask port is in the
csound-extended repository and thus is not likely to be documented in
the manual.

Csound-extended manages its own releases which currently are available
for Linux, Android, and WebAssembly.

The idea of a "release" for WebAssembly does not fully apply. A
WebAssembly module lives on a Web server and anyone can access it from
there.

I do, however, maintain a zip archive containing the WebAssembly build
of Csound and the example Web pages. The current release is at
https://github.com/gogins/csound-extended/releases/download/v0.1.0/csound-extended-wasm-6.11.1.zip
and includes the cmask feature and example.

In addition, since the Andre Bartetzki gave permission to change the
CMask license to MPL 2.0, it would now be possible to create a Csound
opcode for CMask, for example one that takes a string containing the
CMask parameters and directly schedules score events generated
thereby. However, the CMask source code is C++ and would probably have
to be a plugin opcode, since the core Csound developers seem to have
decided not to host any C++ code in the Csound library itself.

Regards,
Mike

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


On Tue, Apr 3, 2018 at 5:38 PM, Dr. Richard Boulanger
<[hidden email]> wrote:

> Michael,
>
> Awesome.  Will this be added to the manual and the next general release?
> Hope so.
>
> -dB
>
> _____________________________________________
> Dr. Richard Boulanger
> Professor of Electronic Production and Design
> Professional Writing and Music Technology Division
> Berklee College of Music
> ______________________________________________
> President of Boulanger Labs - http://boulangerlabs.com
> Author & Editor of The Csound Book -
> http://mitpress.mit.edu/books/csound-book
> Author & Editor of The Audio Programming Book -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________
> about: http://www.boulangerlabs.com/#about
> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:
> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
> ______________________________________________
> email: [hidden email]
> facebook: https://www.facebook.com/richard.boulanger.58
>
> On Tue, Apr 3, 2018 at 3:43 PM, Michael Gogins <[hidden email]>
> wrote:
>>
>> I have, after successfully asking the author to change the license of
>> CMask to one compatible with csound-extended, ported Andre Bartetzki's
>> CMask program to WebAssembly and it now is part of the WebAssembly
>> build of csound-extended.
>>
>> A live demo can be viewed at
>> https://gogins.github.io/csound-extended/cmask.html.
>>
>> This little project has been instructive for me. First, I found it is
>> fairly easy to port existing C/C++ algorithmic code to WebAssembly and
>> it incorporate the results into csound-extended. Second, just as
>> expected, anything with a JavaScript interface will work with anything
>> else with a JavaScript interface. Third, currently the integration of
>> multiple WebAssembly modules in one Web page is not possible without
>> some hacking.
>>
>> In this case, I simply built CMask as a WebAssembly library and linked
>> it into the csound-extended module. In other cases, it is possible to
>> load different WebAssembly modules in different function scopes (you
>> can't do that simply by using a different <script> element for each
>> WebAssembly module).
>>
>> In the future, it should be possible to simply use any WebAssembly
>> module as an ECMAScript module, and this problem should go away.
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] CMask ported to WebAssembly as part of csound-extended

Doctor B
Michael,

Thanks for the details.
Thanks for the sources.
Thanks for doing and sharing this wonderful work.
I would love to see and use a CMask opcode!
Hope it happens.
Loving this.
Best

-dB

_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: 
http://www.boulangerlabs.com/#about
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: [hidden email]
facebook: https://www.facebook.com/richard.boulanger.58

On Tue, Apr 3, 2018 at 5:30 PM, Michael Gogins <[hidden email]> wrote:
Thanks for your interest in this project!

Due to the recent reorganization of the Csound repository, some of my
projects have been moved out of the core Csound repository and into a
new csound-extended repository. This CMask port is in the
csound-extended repository and thus is not likely to be documented in
the manual.

Csound-extended manages its own releases which currently are available
for Linux, Android, and WebAssembly.

The idea of a "release" for WebAssembly does not fully apply. A
WebAssembly module lives on a Web server and anyone can access it from
there.

I do, however, maintain a zip archive containing the WebAssembly build
of Csound and the example Web pages. The current release is at
https://github.com/gogins/csound-extended/releases/download/v0.1.0/csound-extended-wasm-6.11.1.zip
and includes the cmask feature and example.

In addition, since the Andre Bartetzki gave permission to change the
CMask license to MPL 2.0, it would now be possible to create a Csound
opcode for CMask, for example one that takes a string containing the
CMask parameters and directly schedules score events generated
thereby. However, the CMask source code is C++ and would probably have
to be a plugin opcode, since the core Csound developers seem to have
decided not to host any C++ code in the Csound library itself.

Regards,
Mike

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


On Tue, Apr 3, 2018 at 5:38 PM, Dr. Richard Boulanger
<[hidden email]> wrote:
> Michael,
>
> Awesome.  Will this be added to the manual and the next general release?
> Hope so.
>
> -dB
>
> _____________________________________________
> Dr. Richard Boulanger
> Professor of Electronic Production and Design
> Professional Writing and Music Technology Division
> Berklee College of Music
> ______________________________________________
> President of Boulanger Labs - http://boulangerlabs.com
> Author & Editor of The Csound Book -
> http://mitpress.mit.edu/books/csound-book
> Author & Editor of The Audio Programming Book -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________
> about: http://www.boulangerlabs.com/#about
> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:
> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
> ______________________________________________
> email: [hidden email]
> facebook: https://www.facebook.com/richard.boulanger.58
>
> On Tue, Apr 3, 2018 at 3:43 PM, Michael Gogins <[hidden email]>
> wrote:
>>
>> I have, after successfully asking the author to change the license of
>> CMask to one compatible with csound-extended, ported Andre Bartetzki's
>> CMask program to WebAssembly and it now is part of the WebAssembly
>> build of csound-extended.
>>
>> A live demo can be viewed at
>> https://gogins.github.io/csound-extended/cmask.html.
>>
>> This little project has been instructive for me. First, I found it is
>> fairly easy to port existing C/C++ algorithmic code to WebAssembly and
>> it incorporate the results into csound-extended. Second, just as
>> expected, anything with a JavaScript interface will work with anything
>> else with a JavaScript interface. Third, currently the integration of
>> multiple WebAssembly modules in one Web page is not possible without
>> some hacking.
>>
>> In this case, I simply built CMask as a WebAssembly library and linked
>> it into the csound-extended module. In other cases, it is possible to
>> load different WebAssembly modules in different function scopes (you
>> can't do that simply by using a different <script> element for each
>> WebAssembly module).
>>
>> In the future, it should be possible to simply use any WebAssembly
>> module as an ECMAScript module, and this problem should go away.
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] CMask ported to WebAssembly as part of csound-extended

luis jure
In reply to this post by Michael Gogins-2
el 2018-04-03 a las 18:30 Michael Gogins escribió:

> it would now be possible to create a Csound opcode for CMask, for
> example one that takes a string containing the CMask parameters and
> directly schedules score events generated thereby.

like wow.

given my modest and old-fashioned taste and inclination, that would be one
of the greatest additions to Csound that i can imagine...



--