crucialfelix / supercolliderjs-examples

Example applications and code for supercollider.js
MIT License
25 stars 1 forks source link

no sounds in webserver example #2

Closed gilfuser closed 7 years ago

gilfuser commented 7 years ago

Hi. I'm trying to test the webserver example in Linux, but I'm getting no sounds. The scserver starts but it remains silent. I'm on Linux btw. Here is what I have after npm run start:

> webserver@1.0.0 start /home/gil/scjs/supercolliderjs-examples/webserver
> gulp watch

[14:08:25] Requiring external module babel-register
[14:08:27] Using gulpfile ~/scjs/supercolliderjs-examples/webserver/gulpfile.babel.js
[14:08:27] Starting 'copy-assets'...
[14:08:27] Starting 'build-shared'...
[14:08:27] Starting 'copy-synthdefs'...
[14:08:27] Finished 'build-shared' after 27 ms
[14:08:27] Finished 'copy-synthdefs' after 57 ms
[14:08:27] Starting 'build-server'...
[14:08:27] Finished 'copy-assets' after 371 ms
[14:08:27] Starting 'build-client'...
[14:08:29] Finished 'build-server' after 1.99 s
[14:08:38] Version: webpack 1.13.3
         Asset     Size  Chunks             Chunk Names
    clicker.js  83.4 kB       0  [emitted]  main
clicker.js.map   598 kB       0  [emitted]  main

WARNING in clicker.js from UglifyJs
Dropping unused variable r [./~/socket.io-client/~/debug/browser.js:145,6]
Condition left of && always true [./~/json3/lib/json3.js:5,17]
Condition always false [./~/json3/lib/json3.js:14,20]
Condition always false [./~/json3/lib/json3.js:21,34]
Dropping unused variable curPlaceHolder [./~/socket.io-parser/binary.js:63,6]
Non-strict equality against boolean: == false [./~/wtf-8/wtf-8.js:5,19]
Condition always false [./~/wtf-8/wtf-8.js:5,19]
Non-strict equality against boolean: == false [./~/wtf-8/wtf-8.js:8,18]
Condition always false [./~/wtf-8/wtf-8.js:8,18]
Condition left of && always true [./~/wtf-8/wtf-8.js:213,2]
Condition always true [./~/engine.io-client/~/component-emitter/index.js:6,4]
Dropping unused variable r [./~/engine.io-client/~/debug/browser.js:145,6]
Condition always true [./~/socket.io-client/~/component-emitter/index.js:6,4]
[14:08:38] Finished 'build-client' after 11 s
[14:08:38] Starting 'build'...
[14:08:38] Finished 'build' after 8.21 μs
[14:08:38] Starting 'watch'...
[14:08:38] Starting 'run'...
[14:08:39] Finished 'run' after 779 ms
[14:08:39] Finished 'watch' after 810 ms
[14:08:39] [nodemon] 1.11.0
[14:08:39] [nodemon] to restart at any time, enter `rs`
[14:08:39] [nodemon] watching: /home/gil/scjs/supercolliderjs-examples/webserver/src/**/*
[14:08:39] [nodemon] starting `node dist/server/server.js`
[INFO] Open in your browser: http://localhost:3000
stdout : Faust: supercollider.cpp: sc_api_version = 2
           Faust: FaustGreyholeRaw numControls=7
stderr : {
             "type": "Buffer",
             "data": [
               110,
               111,
               32,
               109,
               111,
               114,
               101,
               32,
               99,
               115,
               76,
               65,
               68,
               83,
               80,
               65,
               32,
               112,
               108,
               117,
               103,
               105,
               110,
               115,
               10
             ]
           }
sendosc: {
             "oscType": "message",
             "address": "/notify",
             "args": [
               1
             ]
           }
rcvosc : [
             "/done",
             "/notify",
             0
           ]
sendosc: {
             "oscType": "message",
             "address": "/d_recv",
             "args": [
               {
                 "type": "Buffer",
                 "data": "53436766000201b616c6c70617373546f6e650001b3e99999a00003f800040000404000c2c6003c23d7a40a000c080003f00042100042dc003dcccccd3d4ccccd3a8fc99a4080003ce1d3e03bf3ab03b9acd403cd2f8363c6ce03c3257d3c73cada3c14dfcd3ddae8e3cafbd4d3d44bb0004000000000000000000044667265710000566667265710001370616e00024676174650003000177436f6e74726f6c1000000040011116456e7647656e10001500010000000003ffffffff0000ffffffff0001ffffffff0002ffffffff0003ffffffff0001ffffffff0004ffffffff0003ffffffff0005ffffffff0002ffffffff0006ffffffff0007ffffffff0008ffffffff0009ffffffff0000ffffffff0007ffffffff0008ffffffff0001ffffffff0003ffffffff0007ffffffff0008134c61671000200010000000000ffffffff0009154c465361772000200010000020000ffffffff00012c42696e6172794f705547656e200020001020003000000010000284c464e6f6973653110001000100ffffffff0002164d756c4164641000300010000050000ffffffff000affffffff000b1b556e6172794f705547656e1000100010110006000014524c5046200030001000004000000070000ffffffff000c2450616e32200030002000008000000000002ffffffff0002228416c6c706173734e2000400010000090000ffffffff000dffffffff000effffffff000f28416c6c706173734e20004000100000a0000ffffffff000dffffffff00011ffffffff000f28416c6c706173734e20004000100000b0000ffffffff000dffffffff00013ffffffff000f28416c6c706173734e20004000100000c0000ffffffff000dffffffff00015ffffffff000f28416c6c706173734e20004000100000d0000ffffffff000dffffffff00017ffffffff000f28416c6c706173734e20004000100000e0000ffffffff000dffffffff00019ffffffff000f28416c6c706173734e2000400010000090001ffffffff000dffffffff00010ffffffff000f28416c6c706173734e20004000100000100000ffffffff000dffffffff00012ffffffff000f28416c6c706173734e20004000100000110000ffffffff000dffffffff00014ffffffff000f28416c6c706173734e20004000100000120000ffffffff000dffffffff00016ffffffff000f28416c6c706173734e20004000100000130000ffffffff000dffffffff00018ffffffff000f28416c6c706173734e20004000100000140000ffffffff000dffffffff0001affffffff000f234f757420003000000ffffffff0001000f000000015000000"
               },
               null
             ]
           }
rcvosc : [
             "/done",
             "/d_recv"
           ]
Here are some messages before I push the mouse the first time:

noteSlide { x: 0.3001464128843338, y: 0.5077399380804953 }
noteSlide { x: 0.3001464128843338, y: 0.5061919504643964 }
noteSlide { x: 0.3001464128843338, y: 0.5046439628482973 }
noteSlide { x: 0.3001464128843338, y: 0.5030959752321982 }
noteSlide { x: 0.3001464128843338, y: 0.4984520123839009 }
noteSlide { x: 0.3001464128843338, y: 0.4969040247678018 }

And here is a message with the mouse button pushed:


noteSlide { x: 0.5783308931185944, y: 0.23839009287925694 }
sendosc: {
             "oscType": "message",
             "address": "/n_set",
             "args": [
               1003,
               "freq",
               254.10757820636184,
               "ffreq",
               960.6536561833423,
               "pan",
               0.15666178623718885
             ]
           }

... and after I release the button ( note the "Node 1000 not found" ) :


noteSlide { x: 0.6442166910688141, y: 0.1702786377708978 }
sendosc: {
             "oscType": "message",
             "address": "/n_set",
             "args": [
               1000,
               "freq",
               194.66967236669888,
               "ffreq",
               1243.0964734949123,
               "pan",
               0.28843338213762815
             ]
           }
rcvosc : [
             "/n_end",
             1000,
             0,
             -1,
             -1,
             0
           ]
noteSlide { x: 0.6449487554904831, y: 0.1702786377708978 }
sendosc: {
             "oscType": "message",
             "address": "/n_set",
             "args": [
               1000,
               "freq",
               194.66967236669888,
               "ffreq",
               1246.6616214775206,
               "pan",
               0.2898975109809663
             ]
           }
noteSlide { x: 0.6456808199121523, y: 0.1702786377708978 }
sendosc: {
             "oscType": "message",
             "address": "/n_set",
             "args": [
               1000,
               "freq",
               194.66967236669888,
               "ffreq",
               1250.2369941533925,
               "pan",
               0.29136163982430463
             ]
           }
noteSlide { x: 0.6478770131771596, y: 0.1718266253869969 }
sendosc: {
             "oscType": "message",
             "address": "/n_set",
             "args": [
               1000,
               "freq",
               195.85212250361312,
               "ffreq",
               1261.0247540011942,
               "pan",
               0.29575402635431924
             ]
           }
rcvosc : [
             "/fail",
             "/n_set",
             "Node 1000 not found"
           ]
error  : [
             "/fail",
             "/n_set",
             "Node 1000 not found"
           ]
rcvosc : [
             "/fail",
             "/n_set",
             "Node 1000 not found"
           ]
error  : [
             "/fail",
             "/n_set",
             "Node 1000 not found"
           ]

I got some warning while doing the npm install. I have no idea if this can be related with the problem, but here they are: at the beggining: npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. and at the end: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN webserver@1.0.0 No repository field. gil@Lirou-Niu:~/scjs/supercolliderjs-examples/webserver$

If you think I can help doing any tests, just tell me.

best regards, Gil

crucialfelix commented 7 years ago

I showed this at a class at UDK and some people did also see that result. For others it worked just fine.

What browser are you using (shouldn't matter at all) ?

I didn't yet figure out what it was. I'll use your issue here to track it and solve it.

I see node 1000 did end (there was a notification that it ended) which would happen when there was a mouse up.

Did you see s_new and n_go posted when you mousedown ?

If you reload your web page then it starts a new session (you are a new user). The old session will release its notes.

If you edit any files at all then it will restart the webserver and restart supercollider scsynth. Your browser will reconnect to start a new session.

The warnings are nothing important.

gilfuser commented 7 years ago

Hi Chris. Actually I was one of those in UdK! Well, maybe I was the only one who was not getting this to work because I was the only one using Linux.

I'm using Firefox.

The first time I mousedown I see s_new and n_go, and with mouseup n_end. After that, sometimes I see s_new and n_go when I mousedown again, and sometimes not. I couldn't figure out why I would see them or not.

I realized now that the problem is not in this example specifically. I just tried the server-plus example and I'm getting no sounds from there to. No errors, the nodes being made... it looks like it was working fine.

best regards, Gil

crucialfelix commented 7 years ago

Ah, I was on mobile and didn't see your pic ! Hello gil !

Maybe they are separate problems. You don't hear sounds. I remember there was a Faust error/complaint you had. Is normal supercollider still working ? (from the IDE)

Did you patch the audio (with jack etc) into some internal audio bus ?

The occasional missing node error (sending messages to an already ended node) may be a simple booking keeping error. I can show how to set up a handler that is called when the synth ends.

gilfuser commented 7 years ago

Hello Chris.

The Faust error was solved after you told me to make manually the file sclang_config.yaml (If I remember well). I'm using the normal supercollider working without any issues, and I'm not patching the audio in any way.

One difference between the way that the normal supercollider works, I think since the version 3.7, is that I don't have to start jack manually before start the server. And after starting the server, if I open QJackCtl, I see it off, although I know that Jack is on. If I run the examples I tried and look at QJackCtl, it will be turned on.

I have no idea if this is useful information, but with a detailed description of what is happening there is a better chance to spot what is going on.

Show me how to set up the handler. Let see if this helps.

thanks

best regards, Gil

Chris Sattinger notifications@github.com schrieb am Mi., 30. Nov. 2016 um 12:44 Uhr:

Ah, I was on mobile and didn't see your pic ! Hello gil !

Maybe they are separate problems. You don't hear sounds. I remember there was a Faust error/complaint you had. Is normal supercollider still working ? (from the IDE)

Did you patch the audio (with jack etc) into some internal audio bus ?

The occasional missing node error (sending messages to an already ended node) may be a simple booking keeping error. I can show how to set up a handler that is called when the synth ends.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/crucialfelix/supercolliderjs-examples/issues/2#issuecomment-263853966, or mute the thread https://github.com/notifications/unsubscribe-auth/AI-AKubBJtQCwUOYm7w39UMXEb-LIZSmks5rDWGOgaJpZM4K9zkQ .

gilfuser commented 7 years ago

Hi Chris. Just to follow up, I managed it to work manually connecting the Supercollider server to the system output with QjackCtl. I still get some of this errors though: error : [ "/fail", "/n_set", "Node 1028 not found" ]

See you soon in UdK best regards, Gil