Csound Csound-dev Csound-tekno Search About

[Csnd] wasm set options

Date2017-09-03 21:07
FromHlöðver Sigurðsson
Subject[Csnd] wasm set options
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 Csound@listserv.heanet.ie 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

Date2017-09-03 21:14
FromSteven Yi
SubjectRe: [Csnd] wasm set options

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 <hlolli@gmail.com> 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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

Date2017-09-03 21:18
FromHlöðver Sigurðsson
SubjectRe: [Csnd] wasm set options
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 <stevenyi@gmail.com> 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 <hlolli@gmail.com> 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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