Csound Csound-dev Csound-tekno Search About

csound emscripten cannot read channel (getChannel)

Date2016-01-29 19:06
FromTarmo Johannes
Subjectcsound emscripten cannot read channel (getChannel)

Hi!

 

I am trying to use Csound Javascript (Csound emscripten) for analysing some audio and forwarding it to other javasript functions for visual work.

 

When I use Csound-emscripten 6.03, csound works, but I get no value from the channels, the value cuonter2 stays always undefined.

A stripped down code:

 

--------

index.html

 

<title>Animation test - analyse audio</title>

<script src="javascripts/libcsound.js"></script>

<script src="javascripts/CsoundObj.js"></script>

<script src="javascripts/FileManager.js"></script>

</head>

<body>

<h1>Csound Emscripten sound analysis test</h1>

<script>

 

var csound = new CsoundObj();

var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);

fileManger.fileUploadFromServer("test.csd", function() {

csound.compileCSD("test.csd");

csound.startAudioCallback();

csound.addControlChannel("counter2",999);

var counter2=csound.getControlChannelValue("counter2");

console.log("COUNTER2", counter2);

});

fileManger.fileUploadFromServer("test7.mp3", function() {/*csound.readScore("i 1 0 600");*/});

 

</script>

------------------

in test.csd

i set

 

chnset 11,"counter2"

 

in the orchestra

-----------

 

 

If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)

 

uncaught exception: abort("Assertion failed: Cannot call unknown function CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709

stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892

abort@http://localhost:8000/javascripts/libcsound.js:24:32633

assert@http://localhost:8000/javascripts/libcsound.js:1:6940

getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093

cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656

CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17

@http://localhost:8000/:23:15

 

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

 

 

I must say, I am also a bit afraid of csound js - it used not to be very stable in different browsers, perhaps I should go for webaudio straight... What do you think?

 

Thanks,

tarmo


Date2016-01-30 13:03
FromEd Costello
SubjectRe: csound emscripten cannot read channel (getChannel)
Have you tried adding the control channel then starting the callback?

On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:

Hi!

 

I am trying to use Csound Javascript (Csound emscripten) for analysing some audio and forwarding it to other javasript functions for visual work.

 

When I use Csound-emscripten 6.03, csound works, but I get no value from the channels, the value cuonter2 stays always undefined.

A stripped down code:

 

--------

index.html

 

<title>Animation test - analyse audio</title>

<script src="javascripts/libcsound.js"></script>

<script src="javascripts/CsoundObj.js"></script>

<script src="javascripts/FileManager.js"></script>

</head>

<body>

<h1>Csound Emscripten sound analysis test</h1>

<script>

 

var csound = new CsoundObj();

var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);

fileManger.fileUploadFromServer("test.csd", function() {

csound.compileCSD("test.csd");

csound.startAudioCallback();

csound.addControlChannel("counter2",999);

var counter2=csound.getControlChannelValue("counter2");

console.log("COUNTER2", counter2);

});

fileManger.fileUploadFromServer("test7.mp3", function() {/*csound.readScore("i 1 0 600");*/});

 

</script>

------------------

in test.csd

i set

 

chnset 11,"counter2"

 

in the orchestra

-----------

 

 

If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)

 

uncaught exception: abort("Assertion failed: Cannot call unknown function CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709

stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892

abort@http://localhost:8000/javascripts/libcsound.js:24:32633

assert@http://localhost:8000/javascripts/libcsound.js:1:6940

getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093

cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656

CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17

@http://localhost:8000/:23:15

 

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

 

 

I must say, I am also a bit afraid of csound js - it used not to be very stable in different browsers, perhaps I should go for webaudio straight... What do you think?

 

Thanks,

tarmo

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
--
Edward Costello
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

Date2016-01-30 15:06
FromTarmo Johannes
SubjectRe: csound emscripten cannot read channel (getChannel)

Thanks!

No, unfortunatey it did not help. I tried:

  csound.compileCSD("test.csd");
                csound.addControlChannel("counter2",999);
                csound.startAudioCallback();
                var counter2=csound.getControlChannelValue("counter2");
                console.log("COUNTER2", counter2);


But counter2 stays undefined stil...


tarmo



30.01.2016 15:03 kirjutas kuupäeval "Ed Costello" <phasereset@gmail.com>:
Have you tried adding the control channel then starting the callback?

On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:

Hi!

 

I am trying to use Csound Javascript (Csound emscripten) for analysing some audio and forwarding it to other javasript functions for visual work.

 

When I use Csound-emscripten 6.03, csound works, but I get no value from the channels, the value cuonter2 stays always undefined.

A stripped down code:

 

--------

index.html

 

<title>Animation test - analyse audio</title>

<script src="javascripts/libcsound.js"></script>

<script src="javascripts/CsoundObj.js"></script>

<script src="javascripts/FileManager.js"></script>

</head>

<body>

<h1>Csound Emscripten sound analysis test</h1>

<script>

 

var csound = new CsoundObj();

var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);

fileManger.fileUploadFromServer("test.csd", function() {

csound.compileCSD("test.csd");

csound.startAudioCallback();

csound.addControlChannel("counter2",999);

var counter2=csound.getControlChannelValue("counter2");

console.log("COUNTER2", counter2);

});

fileManger.fileUploadFromServer("test7.mp3", function() {/*csound.readScore("i 1 0 600");*/});

 

</script>

------------------

in test.csd

i set

 

chnset 11,"counter2"

 

in the orchestra

-----------

 

 

If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)

 

uncaught exception: abort("Assertion failed: Cannot call unknown function CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709

stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892

abort@http://localhost:8000/javascripts/libcsound.js:24:32633

assert@http://localhost:8000/javascripts/libcsound.js:1:6940

getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093

cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656

CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17

@http://localhost:8000/:23:15

 

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

 

 

I must say, I am also a bit afraid of csound js - it used not to be very stable in different browsers, perhaps I should go for webaudio straight... What do you think?

 

Thanks,

tarmo

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
--
Edward Costello
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

Date2016-01-30 21:40
FromEd Costello
SubjectRe: csound emscripten cannot read channel (getChannel)
OK, I don't think addControlChannel exists, it should be setControlChannel I think.
Ed

On Sat, 30 Jan 2016 at 15:06 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:

Thanks!

No, unfortunatey it did not help. I tried:

  csound.compileCSD("test.csd");
                csound.addControlChannel("counter2",999);
                csound.startAudioCallback();


                var counter2=csound.getControlChannelValue("counter2");
                console.log("COUNTER2", counter2);


But counter2 stays undefined stil...


tarmo



30.01.2016 15:03 kirjutas kuupäeval "Ed Costello" <phasereset@gmail.com>:
Have you tried adding the control channel then starting the callback?

On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:

Hi!

 

I am trying to use Csound Javascript (Csound emscripten) for analysing some audio and forwarding it to other javasript functions for visual work.

 

When I use Csound-emscripten 6.03, csound works, but I get no value from the channels, the value cuonter2 stays always undefined.

A stripped down code:

 

--------

index.html

 

<title>Animation test - analyse audio</title>

<script src="javascripts/libcsound.js"></script>

<script src="javascripts/CsoundObj.js"></script>

<script src="javascripts/FileManager.js"></script>

</head>

<body>

<h1>Csound Emscripten sound analysis test</h1>

<script>

 

var csound = new CsoundObj();

var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);

fileManger.fileUploadFromServer("test.csd", function() {

csound.compileCSD("test.csd");

csound.startAudioCallback();

csound.addControlChannel("counter2",999);

var counter2=csound.getControlChannelValue("counter2");

console.log("COUNTER2", counter2);

});

fileManger.fileUploadFromServer("test7.mp3", function() {/*csound.readScore("i 1 0 600");*/});

 

</script>

------------------

in test.csd

i set

 

chnset 11,"counter2"

 

in the orchestra

-----------

 

 

If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)

 

uncaught exception: abort("Assertion failed: Cannot call unknown function CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709

stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892

abort@http://localhost:8000/javascripts/libcsound.js:24:32633

assert@http://localhost:8000/javascripts/libcsound.js:1:6940

getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093

cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656

CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17

@http://localhost:8000/:23:15

 

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

 

 

I must say, I am also a bit afraid of csound js - it used not to be very stable in different browsers, perhaps I should go for webaudio straight... What do you think?

 

Thanks,

tarmo

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
--
Edward Costello
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
--
Edward Costello
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

Date2016-02-01 20:58
FromTarmo Johannes
SubjectRe: csound emscripten cannot read channel (getChannel)
Hi,

I pulled CsoundEmpscripten from git
https://github.com/eddyc/CsoundEmscripten.git
and this worked. 

I don't know, if there is something wrong with the .zip version in Csound 
official downloads, probably my installation).

I added an example for showing getControlChannel (not getControlChannelValue 
as it used to be before, I guess) and made to you a pull request. Please have 
a look if it is sutiable!

tarmo


On Saturday 30 January 2016 13:03:13 you wrote:
> Have you tried adding the control channel then starting the callback?
> 
> On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes 
> wrote:
> > Hi!
> > 
> > 
> > 
> > I am trying to use Csound Javascript (Csound emscripten) for analysing
> > some audio and forwarding it to other javasript functions for visual work.
> > 
> > 
> > 
> > When I use Csound-emscripten 6.03, csound works, but I get no value from
> > the channels, the value cuonter2 stays always undefined.
> > 
> > A stripped down code:
> > 
> > 
> > 
> > --------
> > 
> > index.html
> > 
> > 
> > 
> > Animation test - analyse audio
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 

Csound Emscripten sound analysis test

> > > > > > > > ------------------ > > > > in test.csd > > > > i set > > > > > > > > chnset 11,"counter2" > > > > > > > > in the orchestra > > > > ----------- > > > > > > > > > > > > If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux) > > > > > > > > uncaught exception: abort("Assertion failed: Cannot call unknown function > > CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at > > jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709 > > > > stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892 > > > > abort@http://localhost:8000/javascripts/libcsound.js:24:32633 > > > > assert@http://localhost:8000/javascripts/libcsound.js:1:6940 > > > > getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093 > > > > cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656 > > > > CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17 > > > > @http://localhost:8000/:23:15 > > > > > > > > If this abort() is unexpected, build with -s ASSERTIONS=1 which can give > > more information. > > > > > > > > > > > > I must say, I am also a bit afraid of csound js - it used not to be very > > stable in different browsers, perhaps I should go for webaudio straight... > > What do you think? > > > > > > > > Thanks, > > > > tarmo > > 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

Date2016-02-02 11:06
FromEd Costello
SubjectRe: csound emscripten cannot read channel (getChannel)
Oh, you probably don't want to be using the github one. I haven't been updating that, the most up to date emscripten Csound should be with with main source in the Csound repo.

On Mon, 1 Feb 2016 at 20:59 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
Hi,

I pulled CsoundEmpscripten from git
https://github.com/eddyc/CsoundEmscripten.git
and this worked.

I don't know, if there is something wrong with the .zip version in Csound
official downloads, probably my installation).

I added an example for showing getControlChannel (not getControlChannelValue
as it used to be before, I guess) and made to you a pull request. Please have
a look if it is sutiable!

tarmo


On Saturday 30 January 2016 13:03:13 you wrote:
> Have you tried adding the control channel then starting the callback?
>
> On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee>
> wrote:
> > Hi!
> >
> >
> >
> > I am trying to use Csound Javascript (Csound emscripten) for analysing
> > some audio and forwarding it to other javasript functions for visual work.
> >
> >
> >
> > When I use Csound-emscripten 6.03, csound works, but I get no value from
> > the channels, the value cuonter2 stays always undefined.
> >
> > A stripped down code:
> >
> >
> >
> > --------
> >
> > index.html
> >
> >
> >
> > <title>Animation test - analyse audio</title>
> >
> > <script src="javascripts/libcsound.js"></script>
> >
> > <script src="javascripts/CsoundObj.js"></script>
> >
> > <script src="javascripts/FileManager.js"></script>
> >
> > </head>
> >
> > <body>
> >
> > <h1>Csound Emscripten sound analysis test</h1>
> >
> > <script>
> >
> >
> >
> > var csound = new CsoundObj();
> >
> > var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);
> >
> > fileManger.fileUploadFromServer("test.csd", function() {
> >
> > csound.compileCSD("test.csd");
> >
> > csound.startAudioCallback();
> >
> > csound.addControlChannel("counter2",999);
> >
> > var counter2=csound.getControlChannelValue("counter2");
> >
> > console.log("COUNTER2", counter2);
> >
> > });
> >
> > fileManger.fileUploadFromServer("test7.mp3", function()
> > {/*csound.readScore("i 1 0 600");*/});
> >
> >
> >
> > </script>
> >
> > ------------------
> >
> > in test.csd
> >
> > i set
> >
> >
> >
> > chnset 11,"counter2"
> >
> >
> >
> > in the orchestra
> >
> > -----------
> >
> >
> >
> >
> >
> > If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)
> >
> >
> >
> > uncaught exception: abort("Assertion failed: Cannot call unknown function
> > CsoundObj_process (perhaps LLVM optimizations or closure removed it?)") at
> > jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709
> >
> > stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892
> >
> > abort@http://localhost:8000/javascripts/libcsound.js:24:32633
> >
> > assert@http://localhost:8000/javascripts/libcsound.js:1:6940
> >
> > getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093
> >
> > cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656
> >
> > CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17
> >
> > @http://localhost:8000/:23:15
> >
> >
> >
> > If this abort() is unexpected, build with -s ASSERTIONS=1 which can give
> > more information.
> >
> >
> >
> >
> >
> > I must say, I am also a bit afraid of csound js - it used not to be very
> > stable in different browsers, perhaps I should go for webaudio straight...
> > What do you think?
> >
> >
> >
> > Thanks,
> >
> > tarmo
> > 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
--
Edward Costello
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

Date2016-02-02 12:44
FromTarmo Johannes
SubjectRe: csound emscripten cannot read channel (getChannel)
Hi,

Now I got the .zip version from Csound Download page also working in another 
computer (it failed at first with not loading the whole page) but after 
starting the github version, worked OK. I don't know where the secret is 
(probably browser chache or soemthing?) but now it seems to work. Will test 
more later.

Please have alook also to the pull request, maybe it is good idea to add it.

Thanks!
tarmo

On Tuesday 02 February 2016 11:06:19 you wrote:
> Oh, you probably don't want to be using the github one. I haven't been
> updating that, the most up to date emscripten Csound should be with with
> main source in the Csound repo.
> 
> On Mon, 1 Feb 2016 at 20:59 Tarmo Johannes 
> 
> wrote:
> > Hi,
> > 
> > I pulled CsoundEmpscripten from git
> > https://github.com/eddyc/CsoundEmscripten.git
> > and this worked.
> > 
> > I don't know, if there is something wrong with the .zip version in Csound
> > official downloads, probably my installation).
> > 
> > I added an example for showing getControlChannel (not
> > getControlChannelValue
> > as it used to be before, I guess) and made to you a pull request. Please
> > have
> > a look if it is sutiable!
> > 
> > tarmo
> > 
> > On Saturday 30 January 2016 13:03:13 you wrote:
> > > Have you tried adding the control channel then starting the callback?
> > > 
> > > On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <
> > 
> > tarmo.johannes@otsakool.edu.ee>
> > 
> > > wrote:
> > > > Hi!
> > > > 
> > > > 
> > > > 
> > > > I am trying to use Csound Javascript (Csound emscripten) for analysing
> > > > some audio and forwarding it to other javasript functions for visual
> > 
> > work.
> > 
> > > > When I use Csound-emscripten 6.03, csound works, but I get no value
> > 
> > from
> > 
> > > > the channels, the value cuonter2 stays always undefined.
> > > > 
> > > > A stripped down code:
> > > > 
> > > > 
> > > > 
> > > > --------
> > > > 
> > > > index.html
> > > > 
> > > > 
> > > > 
> > > > Animation test - analyse audio
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 

Csound Emscripten sound analysis test

> > > > > > > > > > > > > > > > ------------------ > > > > > > > > in test.csd > > > > > > > > i set > > > > > > > > > > > > > > > > chnset 11,"counter2" > > > > > > > > > > > > > > > > in the orchestra > > > > > > > > ----------- > > > > > > > > > > > > > > > > > > > > > > > > If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux) > > > > > > > > > > > > > > > > uncaught exception: abort("Assertion failed: Cannot call unknown > > > > function > > > > > > CsoundObj_process (perhaps LLVM optimizations or closure removed > > > > it?)") at > > > > > > jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709 > > > > > > > > stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892 > > > > > > > > abort@http://localhost:8000/javascripts/libcsound.js:24:32633 > > > > > > > > assert@http://localhost:8000/javascripts/libcsound.js:1:6940 > > > > > > > > getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093 > > > > > > > > cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656 > > > > > > > > CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17 > > > > > > > > @http://localhost:8000/:23:15 > > > > > > > > > > > > > > > > If this abort() is unexpected, build with -s ASSERTIONS=1 which can > > > > give > > > > > > more information. > > > > > > > > > > > > > > > > > > > > > > > > I must say, I am also a bit afraid of csound js - it used not to be > > > > very > > > > > > stable in different browsers, perhaps I should go for webaudio > > > > straight... > > > > > > What do you think? > > > > > > > > > > > > > > > > Thanks, > > > > > > > > tarmo > > > > 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

Date2016-02-02 13:36
FromEd Costello
SubjectRe: csound emscripten cannot read channel (getChannel)
Yeah, when working with web stuff, sometimes you will have to disable the cache in your browser so it doesn't just reload any old javascript files.
Thats a good idea to add a demo for control channels, I have actually implemented a callback for when Csound sends control signals back to the browser and that also is also missing a demo. When I have time I will add those to the demo pages.
Thanks
Ed

On Tue, 2 Feb 2016 at 12:44 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
Hi,

Now I got the .zip version from Csound Download page also working in another
computer (it failed at first with not loading the whole page) but after
starting the github version, worked OK. I don't know where the secret is
(probably browser chache or soemthing?) but now it seems to work. Will test
more later.

Please have alook also to the pull request, maybe it is good idea to add it.

Thanks!
tarmo

On Tuesday 02 February 2016 11:06:19 you wrote:
> Oh, you probably don't want to be using the github one. I haven't been
> updating that, the most up to date emscripten Csound should be with with
> main source in the Csound repo.
>
> On Mon, 1 Feb 2016 at 20:59 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee>
>
> wrote:
> > Hi,
> >
> > I pulled CsoundEmpscripten from git
> > https://github.com/eddyc/CsoundEmscripten.git
> > and this worked.
> >
> > I don't know, if there is something wrong with the .zip version in Csound
> > official downloads, probably my installation).
> >
> > I added an example for showing getControlChannel (not
> > getControlChannelValue
> > as it used to be before, I guess) and made to you a pull request. Please
> > have
> > a look if it is sutiable!
> >
> > tarmo
> >
> > On Saturday 30 January 2016 13:03:13 you wrote:
> > > Have you tried adding the control channel then starting the callback?
> > >
> > > On Fri, 29 Jan 2016 at 19:06 Tarmo Johannes <
> >
> > tarmo.johannes@otsakool.edu.ee>
> >
> > > wrote:
> > > > Hi!
> > > >
> > > >
> > > >
> > > > I am trying to use Csound Javascript (Csound emscripten) for analysing
> > > > some audio and forwarding it to other javasript functions for visual
> >
> > work.
> >
> > > > When I use Csound-emscripten 6.03, csound works, but I get no value
> >
> > from
> >
> > > > the channels, the value cuonter2 stays always undefined.
> > > >
> > > > A stripped down code:
> > > >
> > > >
> > > >
> > > > --------
> > > >
> > > > index.html
> > > >
> > > >
> > > >
> > > > <title>Animation test - analyse audio</title>
> > > >
> > > > <script src="javascripts/libcsound.js"></script>
> > > >
> > > > <script src="javascripts/CsoundObj.js"></script>
> > > >
> > > > <script src="javascripts/FileManager.js"></script>
> > > >
> > > > </head>
> > > >
> > > > <body>
> > > >
> > > > <h1>Csound Emscripten sound analysis test</h1>
> > > >
> > > > <script>
> > > >
> > > >
> > > >
> > > > var csound = new CsoundObj();
> > > >
> > > > var fileManger = new FileManager(['csd', 'wav','mp3'], console.log);
> > > >
> > > > fileManger.fileUploadFromServer("test.csd", function() {
> > > >
> > > > csound.compileCSD("test.csd");
> > > >
> > > > csound.startAudioCallback();
> > > >
> > > > csound.addControlChannel("counter2",999);
> > > >
> > > > var counter2=csound.getControlChannelValue("counter2");
> > > >
> > > > console.log("COUNTER2", counter2);
> > > >
> > > > });
> > > >
> > > > fileManger.fileUploadFromServer("test7.mp3", function()
> > > > {/*csound.readScore("i 1 0 600");*/});
> > > >
> > > >
> > > >
> > > > </script>
> > > >
> > > > ------------------
> > > >
> > > > in test.csd
> > > >
> > > > i set
> > > >
> > > >
> > > >
> > > > chnset 11,"counter2"
> > > >
> > > >
> > > >
> > > > in the orchestra
> > > >
> > > > -----------
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > If I use csound-emscripten 6.06 I get error (Firefox 43.03, Linux)
> > > >
> > > >
> > > >
> > > > uncaught exception: abort("Assertion failed: Cannot call unknown
> >
> > function
> >
> > > > CsoundObj_process (perhaps LLVM optimizations or closure removed
> >
> > it?)") at
> >
> > > > jsStackTrace@http://localhost:8000/javascripts/libcsound.js:1:20709
> > > >
> > > > stackTrace@http://localhost:8000/javascripts/libcsound.js:1:20892
> > > >
> > > > abort@http://localhost:8000/javascripts/libcsound.js:24:32633
> > > >
> > > > assert@http://localhost:8000/javascripts/libcsound.js:1:6940
> > > >
> > > > getCFunc@http://localhost:8000/javascripts/libcsound.js:1:7093
> > > >
> > > > cwrap@http://localhost:8000/javascripts/libcsound.js:1:8656
> > > >
> > > > CsoundObj@http://localhost:8000/javascripts/CsoundObj.js:33:17
> > > >
> > > > @http://localhost:8000/:23:15
> > > >
> > > >
> > > >
> > > > If this abort() is unexpected, build with -s ASSERTIONS=1 which can
> >
> > give
> >
> > > > more information.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I must say, I am also a bit afraid of csound js - it used not to be
> >
> > very
> >
> > > > stable in different browsers, perhaps I should go for webaudio
> >
> > straight...
> >
> > > > What do you think?
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > tarmo
> > > > 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
--
Edward Costello
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