[Csnd] Csound Projects managed with NPM

Hi All,

I did a proof-of-concept for an NPM-based Csound project. The example
project is here:

It uses an NPM package of Csound user-defined opcodes published here:

There are two scripts setup, one for realtime rendering w/live-coding
and another for rendering to disk. Each uses a separate CSD with
different settings but they share orc/sco code.

I was able to publish my UDO library to NPM, add it as a dependency to
the csound-npm-example project, run "yarn install" to download the
dependencies, then use "yarn start" or "yarn render".

The goal of this is to explore what's possible building upon NPM. So
far it works to have UDO code published and consumed pretty easily
from a project. It should be straightforward to package other resource
files into NPM packages (i.e., hrtf, reverb impulse responses, sets of
waves, datasets, etc.). A couple of things that'll be further
explored:

* Compilation of native opcode libraries using cmake-js
* Reuse of csound-based NPM packages in webaudio csound projects
(i.e., projects like libsyi should be easy to consume whether doing a
desktop or webpage project). I believe this should work now but just
need to test.

If you're already doing web development with NPM, this toolchain and
ecosystem should feel very comfortable. It should also prove useful
with versioned dependencies.

I'll continue to update the project as the above is further explored.
Additionally, I will look at creating a starter script (i.e., `npx
create-csound-project`) to bootstrap new projects. Feel free to add
PRs or issues to the github page.

Thanks and all best,
Steven

p.s. - Thanks to Ed Costello for discussions and assistance in this
initial experiment!

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

Exciting!
Thanks!
I will keep an eye on it ,
Tarmo