[Csnd] wasm set options

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

[Csnd] wasm set options

hlolli
My questions rain in,
this time I'm struggling to set the messagelevel to 0 in my WASM instance.

I call a function from CsoundObj.js before starting the orchestra
_setOption("-m0")

I end with the following stacktrace:
TypeError: str.charCodeAt is not a function
    at stringToUTF8Array (evalmachine.<anonymous>:844:17)
    at stringToUTF8 (evalmachine.<anonymous>:893:10)
    at eval (eval at cwrap (evalmachine.<anonymous>:562:12), <anonymous>:6:9)
    at panaeolus.engine.CsoundWASM.panaeolus$engine$CsoundInterface$set_option$arity$2 (evalmachine.<anonymous>:651:83)
    at panaeolus$engine$set_option (evalmachine.<anonymous>:544:14)
    at evalmachine.<anonymous>:853:44
    at evalmachine.<anonymous>:921:43
    at panaeolus$engine$state_machine__4__auto____1 (evalmachine.<anonymous>:942:4)
    at panaeolus$engine$state_machine__4__auto__ (evalmachine.<anonymous>:958:53)
    at cljs$core$async$impl$ioc_helpers$run_state_machine (evalmachine.<anonymous>:133:74)

In the crwap call there's this ['number', 'string']

Maybe there should be a number before the string, if so what number?

Best,
Hlöðver
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] wasm set options

Steven Yi

Do you need to pass the Csound instance as the first argument? (Just a guess, not currently at computer)


On Sun, Sep 3, 2017, 4:08 PM Hlöðver Sigurðsson <[hidden email]> wrote:
My questions rain in,
this time I'm struggling to set the messagelevel to 0 in my WASM instance.

I call a function from CsoundObj.js before starting the orchestra
_setOption("-m0")

I end with the following stacktrace:
TypeError: str.charCodeAt is not a function
    at stringToUTF8Array (evalmachine.<anonymous>:844:17)
    at stringToUTF8 (evalmachine.<anonymous>:893:10)
    at eval (eval at cwrap (evalmachine.<anonymous>:562:12), <anonymous>:6:9)
    at panaeolus.engine.CsoundWASM.panaeolus$engine$CsoundInterface$set_option$arity$2 (evalmachine.<anonymous>:651:83)
    at panaeolus$engine$set_option (evalmachine.<anonymous>:544:14)
    at evalmachine.<anonymous>:853:44
    at evalmachine.<anonymous>:921:43
    at panaeolus$engine$state_machine__4__auto____1 (evalmachine.<anonymous>:942:4)
    at panaeolus$engine$state_machine__4__auto__ (evalmachine.<anonymous>:958:53)
    at cljs$core$async$impl$ioc_helpers$run_state_machine (evalmachine.<anonymous>:133:74)

In the crwap call there's this ['number', 'string']

Maybe there should be a number before the string, if so what number?

Best,
Hlöðver
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] wasm set options

hlolli
Yes oops, I do, it's actually the second parameter where I feed the string, was trying to hide that Im calling this function from clojurescript. And now I realize the number represents the csound instance, that I had figured out and forgotten. But the stacktrace is still there when given _setOption(csnd, "-m0");



On 3 September 2017 at 22:14, Steven Yi <[hidden email]> wrote:

Do you need to pass the Csound instance as the first argument? (Just a guess, not currently at computer)


On Sun, Sep 3, 2017, 4:08 PM Hlöðver Sigurðsson <[hidden email]> wrote:
My questions rain in,
this time I'm struggling to set the messagelevel to 0 in my WASM instance.

I call a function from CsoundObj.js before starting the orchestra
_setOption("-m0")

I end with the following stacktrace:
TypeError: str.charCodeAt is not a function
    at stringToUTF8Array (evalmachine.<anonymous>:844:17)
    at stringToUTF8 (evalmachine.<anonymous>:893:10)
    at eval (eval at cwrap (evalmachine.<anonymous>:562:12), <anonymous>:6:9)
    at panaeolus.engine.CsoundWASM.panaeolus$engine$CsoundInterface$set_option$arity$2 (evalmachine.<anonymous>:651:83)
    at panaeolus$engine$set_option (evalmachine.<anonymous>:544:14)
    at evalmachine.<anonymous>:853:44
    at evalmachine.<anonymous>:921:43
    at panaeolus$engine$state_machine__4__auto____1 (evalmachine.<anonymous>:942:4)
    at panaeolus$engine$state_machine__4__auto__ (evalmachine.<anonymous>:958:53)
    at cljs$core$async$impl$ioc_helpers$run_state_machine (evalmachine.<anonymous>:133:74)

In the crwap call there's this ['number', 'string']

Maybe there should be a number before the string, if so what number?

Best,
Hlöðver
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here