importScripts() was what was in the API for a long while, but I modified it in 6.15.0 to initialize() and added the ability to send in an AudioContext to use, which was important for making the Csound nodes work in a larger Webaudio graph.
That said, the new version of WebAudio Csound has undergone many changes for 6.16.0 and the process has changed again. New code looks like:
const cs = await Csound(); // may pass in arguments as object to Csound
Or since it is a promise you can use:
Csound().then(() => {
});
6.16.0-beta is already published to NPM for testing though we are waiting for a few more changes to publish beta4, which we’ll then announce for testing. We’ll have the above documented in tutorials.
I get the Csound orc/score playing, but it seems to be playing though it’s own audioContext, not the one that I’ve passed to the Csound constructor. (this is verified by adjusting levels downstream of the custom op in Cables)
Seems like you need to connect csound node to a target node in Cable’s audio graph. By default, csound will connect directly to the audioContext. You can see an example of re-routing the signal to another webaudio node here: