Discussion:
supercollider.js 0.4.0
felix
2014-08-07 10:41:05 UTC
Permalink
http://supercolliderjs.readthedocs.org/en/latest/index.html


This is a node js package for working with sclang and scsynth

what's new: much improved interpreting of supercollider code

node js javascript:

var scjs = require('supercolliderjs');

scjs.sclang.boot()
.then(function(sclang) {

sclang.interpret('(1..8).pyramid')
.then(function(result) {
// result is a native javascript array
console.log('= ' + result);
}, function(error) {
// syntax or runtime errors
// are returned as javascript objects
console.log(error);
});

});

Example result:

[ 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2,
3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8 ]



Example error:

{ type: 'Error',
error:
{ selector: 'pleaseDontDoThisToMe',
what: 'DoesNotUnderstandError',
args: [],
receiver: { asString: '1', class: 'Integer' },
class: 'DoesNotUnderstandError',
path: '5f4b9581-1c83-11e4-bff4-77673f16fd9d',
errorString: 'ERROR: Message \'pleaseDontDoThisToMe\' not
understood by Integer 1' } }
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Kuivila, Ronald
2014-08-08 15:41:58 UTC
Permalink
Hi Felix,

On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)

What do I need to do?

Cheers,

RJK


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
felix
2014-08-08 15:49:01 UTC
Permalink
its:

npm install -g supercolliderjs

not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
felix
2014-08-08 15:49:15 UTC
Permalink
its:

npm install -g supercolliderjs

not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Kuivila, Ronald
2014-08-08 22:03:43 UTC
Permalink
BTW: have you looked at Charlie Roberts' Interface.server?

RJK

On Aug 8, 2014, at 11:49 AM, felix <felix-***@public.gmane.org<mailto:***@crucial-systems.com>> wrote:

its:

npm install -g supercolliderjs

not supercollider.js


On Fri, Aug 8, 2014 at 5:41 PM, Kuivila, Ronald <rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org<mailto:rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org>> wrote:
Hi Felix,

On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)

What do I need to do?

Cheers,

RJK


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/



--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
felix
2014-08-08 23:02:59 UTC
Permalink
yes !

I was planning on doing some stuff with it. I've been doing a bunch of
music stuff with html/js. but most of it doesn't use knobs, sliders or
such standard things.
Post by Kuivila, Ronald
BTW: have you looked at Charlie Roberts' Interface.server?
RJK
npm install -g supercolliderjs
not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Kuivila, Ronald
2014-08-08 23:46:22 UTC
Permalink
Interface.server is pretty handy for providing visitor interaction to installations or many laptops.
I’m interested in the possibility of a constantly evolving interface, but the SC hook isn’t quite there yet.
But Id did teach myself about the whole html/css/js thing doing some work on the interface editor
he wrote that is kind of lying fallow.

So, I am wondering about incorporating interface.js as a library in your project. (Of course, I haven’t yet
exercised your project to know much about it….)


RJK

On Aug 8, 2014, at 7:02 PM, felix <crucialfelix-***@public.gmane.org<mailto:crucialfelix-***@public.gmane.org>> wrote:


yes !

I was planning on doing some stuff with it. I've been doing a bunch of music stuff with html/js. but most of it doesn't use knobs, sliders or such standard things.




On Sat, Aug 9, 2014 at 12:03 AM, Kuivila, Ronald <rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org<mailto:rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org>> wrote:
BTW: have you looked at Charlie Roberts' Interface.server?

RJK

On Aug 8, 2014, at 11:49 AM, felix <felix-***@public.gmane.org<mailto:***@crucial-systems.com>> wrote:

its:

npm install -g supercolliderjs

not supercollider.js


On Fri, Aug 8, 2014 at 5:41 PM, Kuivila, Ronald <rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org<mailto:rkuivila-KaPM4R2U43T2fBVCVOL8/***@public.gmane.org>> wrote:
Hi Felix,

On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)

What do I need to do?

Cheers,

RJK


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/



--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Tristan Strange
2014-09-24 10:39:42 UTC
Permalink
Hi Felix, thanks for putting this together...

I've just started tinkering with the first example in the docs but the
server I've written wont start and throws the following error relating to
VST_PATH:

stderr - err! VST_PATH

events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at LocalServer.EventEmitter.emit (events.js:74:15)
at Socket.<anonymous>
(/home/tris/code/node_modules/supercolliderjs/lib/nodejs/scsynth.js:111:10)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)

I've pointed VST_PATH at an empty folder at /home/me/.vst

Is there a simple work around for this?

What's SC up to with VSTs anyway? Does supercollider.js provide a means of
chatting to them or something?

Cheers,
Tristan
Post by Kuivila, Ronald
Interface.server is pretty handy for providing visitor interaction to
installations or many laptops.
I’m interested in the possibility of a constantly evolving interface, but
the SC hook isn’t quite there yet.
But Id did teach myself about the whole html/css/js thing doing some work
on the interface editor
he wrote that is kind of lying fallow.
So, I am wondering about incorporating interface.js as a library in your
project. (Of course, I haven’t yet
exercised your project to know much about it
.)
RJK
yes !
I was planning on doing some stuff with it. I've been doing a bunch of
music stuff with html/js. but most of it doesn't use knobs, sliders or
such standard things.
Post by Kuivila, Ronald
BTW: have you looked at Charlie Roberts' Interface.server?
RJK
npm install -g supercolliderjs
not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Tristan Strange
2014-09-24 10:52:48 UTC
Permalink
oh and just to double check VST_PATH is an environment variable I need to
set?
Post by Tristan Strange
Hi Felix, thanks for putting this together...
I've just started tinkering with the first example in the docs but the
server I've written wont start and throws the following error relating to
stderr - err! VST_PATH
events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at LocalServer.EventEmitter.emit (events.js:74:15)
at Socket.<anonymous>
(/home/tris/code/node_modules/supercolliderjs/lib/nodejs/scsynth.js:111:10)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
I've pointed VST_PATH at an empty folder at /home/me/.vst
Is there a simple work around for this?
What's SC up to with VSTs anyway? Does supercollider.js provide a means of
chatting to them or something?
Cheers,
Tristan
Post by Kuivila, Ronald
Interface.server is pretty handy for providing visitor interaction to
installations or many laptops.
I’m interested in the possibility of a constantly evolving interface,
but the SC hook isn’t quite there yet.
But Id did teach myself about the whole html/css/js thing doing some work
on the interface editor
he wrote that is kind of lying fallow.
So, I am wondering about incorporating interface.js as a library in
your project. (Of course, I haven’t yet
exercised your project to know much about it
.)
RJK
yes !
I was planning on doing some stuff with it. I've been doing a bunch of
music stuff with html/js. but most of it doesn't use knobs, sliders or
such standard things.
Post by Kuivila, Ronald
BTW: have you looked at Charlie Roberts' Interface.server?
RJK
npm install -g supercolliderjs
not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
felix
2014-09-24 11:15:00 UTC
Permalink
its not an environment variable, its just capitalized.

what's happening is that scsynth posted to stderr, supercollider.js then
emits an 'error'

this.process.stderr.on('data', function(data) {
self.log.stderr('err! ' + data);
self.emit('error', data);
});

I thought I could just emit 'error' and if anybody is interested then they
can do something with the message.

But I guess node has a special case if the event is 'error'

http://nodejs.org/api/events.html#events_class_events_eventemitter

When an EventEmitter instance experiences an error, the typical action is
to emit an 'error' event. Error events are treated as a special case in
node. If there is no listener for it, then the default action is to print a
stack trace and exit the program.


But in this case the error is not serious, its just scsynth mumbling into
stderr.

for now you can

scsynth.on('error', function(msg) {
console.log(msg);
});

and that will stop the process from quitting.

I'll change the behavior in the next release.

and I have no idea what the VST_PATH thing is. if you start up scsynth from
the language you should see the message posted to the lang's post window
Post by Tristan Strange
oh and just to double check VST_PATH is an environment variable I need to
set?
Post by Tristan Strange
Hi Felix, thanks for putting this together...
I've just started tinkering with the first example in the docs but the
server I've written wont start and throws the following error relating to
stderr - err! VST_PATH
events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at LocalServer.EventEmitter.emit (events.js:74:15)
at Socket.<anonymous>
(/home/tris/code/node_modules/supercolliderjs/lib/nodejs/scsynth.js:111:10)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
I've pointed VST_PATH at an empty folder at /home/me/.vst
Is there a simple work around for this?
What's SC up to with VSTs anyway? Does supercollider.js provide a means
of chatting to them or something?
Cheers,
Tristan
Post by Kuivila, Ronald
Interface.server is pretty handy for providing visitor interaction to
installations or many laptops.
I’m interested in the possibility of a constantly evolving interface,
but the SC hook isn’t quite there yet.
But Id did teach myself about the whole html/css/js thing doing some
work on the interface editor
he wrote that is kind of lying fallow.
So, I am wondering about incorporating interface.js as a library in
your project. (Of course, I haven’t yet
exercised your project to know much about it
.)
RJK
yes !
I was planning on doing some stuff with it. I've been doing a bunch
of music stuff with html/js. but most of it doesn't use knobs, sliders or
such standard things.
Post by Kuivila, Ronald
BTW: have you looked at Charlie Roberts' Interface.server?
RJK
npm install -g supercolliderjs
not supercollider.js
Post by Kuivila, Ronald
Hi Felix,
On my machine, ‘supercollider.js’ is not in the mpm registry.
(I pulled the git repository and ran npm search to no avail.)
What do I need to do?
Cheers,
RJK
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Loading...