From 4886325f4a8a3750888ccd563b6ad78e137cd376 Mon Sep 17 00:00:00 2001 From: ffd8 Date: Mon, 26 Aug 2019 23:59:37 +0200 Subject: [PATCH] Updates node-osc to prevent refresh crash - Updated node-osc. While implementing, learned of a weird bug when refreshing page (crashed while creating second connection on same port) - which was fixed in later version of node-osc. - port 8081 was already in use (MacOS 10.13.6) either from my unique setup or ports in use changed in past couple years?? Found 8082 to work fine. - removed .DS_Store files --- .gitignore | 2 + bridge.js | 6 +- p5-ableton/.DS_Store | Bin 6148 -> 0 bytes p5-ableton/index.html | 2 +- p5-ableton/libraries/.DS_Store | Bin 6148 -> 0 bytes p5-ableton/sketch.js | 2 +- p5-basic/index.html | 2 +- p5-basic/sketch.js | 2 +- p5-faceOsc-flocking/.DS_Store | Bin 6148 -> 0 bytes p5-faceOsc-flocking/index.html | 2 +- p5-faceOsc-flocking/libraries/.DS_Store | Bin 6148 -> 0 bytes p5-faceOsc-flocking/sketch.js | 2 +- p5-faceOsc/.DS_Store | Bin 6148 -> 0 bytes p5-faceOsc/index.html | 2 +- p5-faceOsc/libraries/.DS_Store | Bin 6148 -> 0 bytes p5-faceOsc/sketch.js | 2 +- p5-kinect/.DS_Store | Bin 6148 -> 0 bytes p5-kinect/index.html | 2 +- p5-kinect/libraries/.DS_Store | Bin 6148 -> 0 bytes p5-kinect/sketch.js | 2 +- package-lock.json | 367 ++++++++++++++++++++++++ package.json | 4 +- 22 files changed, 384 insertions(+), 15 deletions(-) create mode 100644 .gitignore delete mode 100644 p5-ableton/.DS_Store delete mode 100644 p5-ableton/libraries/.DS_Store delete mode 100644 p5-faceOsc-flocking/.DS_Store delete mode 100644 p5-faceOsc-flocking/libraries/.DS_Store delete mode 100644 p5-faceOsc/.DS_Store delete mode 100644 p5-faceOsc/libraries/.DS_Store delete mode 100644 p5-kinect/.DS_Store delete mode 100644 p5-kinect/libraries/.DS_Store create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2752eb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +.DS_Store diff --git a/bridge.js b/bridge.js index 24a602b..fa75307 100755 --- a/bridge.js +++ b/bridge.js @@ -1,5 +1,5 @@ var osc = require('node-osc'); -var io = require('socket.io')(8081); +var io = require('socket.io')(8082); var oscServer, oscClient; @@ -23,8 +23,8 @@ io.sockets.on('connection', function (socket) { }); socket.on('disconnect', function(){ if (isConnected) { - oscServer.kill(); - oscClient.kill(); + oscServer.close(); + oscClient.close(); } }); }); \ No newline at end of file diff --git a/p5-ableton/.DS_Store b/p5-ableton/.DS_Store deleted file mode 100644 index 9ed51d6d400f8f22facbc3050124ca3c64266561..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2AGh5FV$2ZraOM6okZOuSh+l{HPq4kRFjDEoy}*3hV6BSlXV zgyu;Xq+v#u5t+&nLJk6ADEMT-+YbDT4A9=SAi-VZxOa2=S7bbq9A|&=ED=T7ZvSA7 zrRKHk%T8-$l|FZEatnmcyC-Ov>ck4*8CVCw+JQiA>8- zq;WnMy0#d@_oq|$i{sq6`|$D8=h^i5-O1_u412O17|2nkvaG%NT<-EWAjs21 zru#TMD_AXS8_R%Y;EFO}P6B83iq>z-whUMXE@yzw2M?9dH&|&@M+Y|Q34qwdVI^qO zTY_RdgTBE^BhH{O9g3(!nR#L`9ggFk@$(H<8g)1@^Y~z9WoBL|Os$UjJ>?F}*JxYI zfMwt!153K=(*3`E`TPH3knLFpECc@)1FYE%x*aUZ+^q}6(Ov7IzCtA-ze?kI2pZ}t hMqj#$Z=))~agPi{-(aN?M^Nk^0Y!stECYX)f!`GYkc9vM diff --git a/p5-ableton/index.html b/p5-ableton/index.html index d43beeb..da8e81b 100755 --- a/p5-ableton/index.html +++ b/p5-ableton/index.html @@ -2,7 +2,7 @@ - + diff --git a/p5-ableton/libraries/.DS_Store b/p5-ableton/libraries/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 - + diff --git a/p5-basic/sketch.js b/p5-basic/sketch.js index 2018993..b33a72e 100644 --- a/p5-basic/sketch.js +++ b/p5-basic/sketch.js @@ -27,7 +27,7 @@ function sendOsc(address, value) { } function setupOsc(oscPortIn, oscPortOut) { - var socket = io.connect('http://127.0.0.1:8081', { port: 8081, rememberTransport: false }); + var socket = io.connect('http://127.0.0.1:8082', { port: 8082, rememberTransport: false }); socket.on('connect', function() { socket.emit('config', { server: { port: oscPortIn, host: '127.0.0.1'}, diff --git a/p5-faceOsc-flocking/.DS_Store b/p5-faceOsc-flocking/.DS_Store deleted file mode 100644 index 9ed51d6d400f8f22facbc3050124ca3c64266561..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2AGh5FV$2ZraOM6okZOuSh+l{HPq4kRFjDEoy}*3hV6BSlXV zgyu;Xq+v#u5t+&nLJk6ADEMT-+YbDT4A9=SAi-VZxOa2=S7bbq9A|&=ED=T7ZvSA7 zrRKHk%T8-$l|FZEatnmcyC-Ov>ck4*8CVCw+JQiA>8- zq;WnMy0#d@_oq|$i{sq6`|$D8=h^i5-O1_u412O17|2nkvaG%NT<-EWAjs21 zru#TMD_AXS8_R%Y;EFO}P6B83iq>z-whUMXE@yzw2M?9dH&|&@M+Y|Q34qwdVI^qO zTY_RdgTBE^BhH{O9g3(!nR#L`9ggFk@$(H<8g)1@^Y~z9WoBL|Os$UjJ>?F}*JxYI zfMwt!153K=(*3`E`TPH3knLFpECc@)1FYE%x*aUZ+^q}6(Ov7IzCtA-ze?kI2pZ}t hMqj#$Z=))~agPi{-(aN?M^Nk^0Y!stECYX)f!`GYkc9vM diff --git a/p5-faceOsc-flocking/index.html b/p5-faceOsc-flocking/index.html index d43beeb..da8e81b 100755 --- a/p5-faceOsc-flocking/index.html +++ b/p5-faceOsc-flocking/index.html @@ -2,7 +2,7 @@ - + diff --git a/p5-faceOsc-flocking/libraries/.DS_Store b/p5-faceOsc-flocking/libraries/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0V zgyu;Xq+v#u5t+&nLJk6ADEMT-+YbDT4A9=SAi-VZxOa2=S7bbq9A|&=ED=T7ZvSA7 zrRKHk%T8-$l|FZEatnmcyC-Ov>ck4*8CVCw+JQiA>8- zq;WnMy0#d@_oq|$i{sq6`|$D8=h^i5-O1_u412O17|2nkvaG%NT<-EWAjs21 zru#TMD_AXS8_R%Y;EFO}P6B83iq>z-whUMXE@yzw2M?9dH&|&@M+Y|Q34qwdVI^qO zTY_RdgTBE^BhH{O9g3(!nR#L`9ggFk@$(H<8g)1@^Y~z9WoBL|Os$UjJ>?F}*JxYI zfMwt!153K=(*3`E`TPH3knLFpECc@)1FYE%x*aUZ+^q}6(Ov7IzCtA-ze?kI2pZ}t hMqj#$Z=))~agPi{-(aN?M^Nk^0Y!stECYX)f!`GYkc9vM diff --git a/p5-faceOsc/index.html b/p5-faceOsc/index.html index d43beeb..da8e81b 100755 --- a/p5-faceOsc/index.html +++ b/p5-faceOsc/index.html @@ -2,7 +2,7 @@ - + diff --git a/p5-faceOsc/libraries/.DS_Store b/p5-faceOsc/libraries/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0V zgyu;Xq+v#u5t+&nLJk6ADEMT-+YbDT4A9=SAi-VZxOa2=S7bbq9A|&=ED=T7ZvSA7 zrRKHk%T8-$l|FZEatnmcyC-Ov>ck4*8CVCw+JQiA>8- zq;WnMy0#d@_oq|$i{sq6`|$D8=h^i5-O1_u412O17|2nkvaG%NT<-EWAjs21 zru#TMD_AXS8_R%Y;EFO}P6B83iq>z-whUMXE@yzw2M?9dH&|&@M+Y|Q34qwdVI^qO zTY_RdgTBE^BhH{O9g3(!nR#L`9ggFk@$(H<8g)1@^Y~z9WoBL|Os$UjJ>?F}*JxYI zfMwt!153K=(*3`E`TPH3knLFpECc@)1FYE%x*aUZ+^q}6(Ov7IzCtA-ze?kI2pZ}t hMqj#$Z=))~agPi{-(aN?M^Nk^0Y!stECYX)f!`GYkc9vM diff --git a/p5-kinect/index.html b/p5-kinect/index.html index d43beeb..da8e81b 100755 --- a/p5-kinect/index.html +++ b/p5-kinect/index.html @@ -2,7 +2,7 @@ - + diff --git a/p5-kinect/libraries/.DS_Store b/p5-kinect/libraries/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0