diff --git a/config.js b/config.js index 7b407c60..68fe348c 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ nmPorts = { - 'MainMix':'localhost:6666', + 'MainMix':'SCSon:6666', 'Drums':'SCSon:6667', 'Basses':'SCSon:6668', 'Guitars':'SCSon:6669', diff --git a/lib/jquery.nouislider.all.js b/lib/jquery.nouislider.all.js index a774b409..691a33e9 100644 --- a/lib/jquery.nouislider.all.js +++ b/lib/jquery.nouislider.all.js @@ -1,5 +1,6 @@ /*! noUiSlider - 7.0.3 - 2014-09-11 16:30:11 */ - +/* With rate mod @ 1561 (Jean-Emmanuel Doucet) */ + (function(){ 'use strict'; @@ -19,6 +20,8 @@ var 'undo' ]; + + // General // Reverse a string @@ -1555,9 +1558,26 @@ function closure ( target, options, originalOptions ){ callback ( e, data ); }); } + + // BIG FAT & UGLY MOD + // Limit move's rate for better performances + // It skips events, but we don't need that much precision here + function move (event, data) { + window.now = +new Date; + if (window.last && window.now - window.last > 30) { + window.last = window.now; + moveP(event, data); + } else if (!window.last) { + // first call + window.last = window.now; + moveP(event, data); + } + } + + // Handle movement on document for handle and range drag. - function move ( event, data ) { + function moveP ( event, data ) { var handles = data.handles || $Handles, positions, state = false, proposal = ((event.calcPoint - data.start) * 100) / baseSize(), @@ -1576,6 +1596,7 @@ function closure ( target, options, originalOptions ){ if ( state ) { fireEvents(['slide']); } + } // Unbind move events on document, call callbacks. diff --git a/lib/oschtmlgui.js b/lib/oschtmlgui.js index 84e816e6..580c59cf 100644 --- a/lib/oschtmlgui.js +++ b/lib/oschtmlgui.js @@ -347,12 +347,10 @@ loadPreset = function(preset){ var data = d.split(':') setTimeout(function(){ if (data[0] == 'fader') { - __faders__[data[1]].val(data[2]).trigger('set') - + __faders__[data[1]].val(data[2]).trigger('set') } if (data[0] == 'button') { __buttons__[data[1]].val(data[2]) - } },i) }) @@ -360,11 +358,20 @@ loadPreset = function(preset){ } receiveOsc = function(argsPack){ + argsPack = argsPack.split(',') + + // fetch id var id = $('[path="'+argsPack[0]+'"]').attr('widgetId'); + + // lock $('[path="'+argsPack[0]+'"]').addClass('locked'); + + // update if (__faders__[id]!=undefined) __faders__[id].val(argsPack.pop()) if (__buttons__[id]!=undefined) __buttons__[id].val(argsPack.pop(),false) + + //unlock $('[path="'+argsPack[0]+'"]').removeClass('locked'); } diff --git a/lib/oschtmlgui.py b/lib/oschtmlgui.py index 5d3568e6..9a2250e7 100644 --- a/lib/oschtmlgui.py +++ b/lib/oschtmlgui.py @@ -168,13 +168,10 @@ class oscHtmlGui(object): self.async_gtk_msg(self.browser.execute_script)('alert("'+error+'")') def async_gtk_msg(self, fun): - def worker((function, args, kwargs)): apply(function, args, kwargs) - def fun2(*args, **kwargs): gobject.idle_add(worker, (fun, args, kwargs)) - return fun2 @_liblo.make_method(None, None) diff --git a/lib/oschtmlgui.pyc b/lib/oschtmlgui.pyc index c2916af1..2fd16c65 100644 Binary files a/lib/oschtmlgui.pyc and b/lib/oschtmlgui.pyc differ diff --git a/lib/style.css b/lib/style.css index 12dc4789..2a3c72b9 100644 --- a/lib/style.css +++ b/lib/style.css @@ -170,7 +170,7 @@ a.on, a:active { position:relative; font-size:13px; border:1px solid rgba(0,0,0,0.2); - padding:33px 0; + padding:35px 0; width:100px; } diff --git a/sebkhachott.preset b/sebkhachott.preset index 11cd3e93..ade71624 100644 --- a/sebkhachott.preset +++ b/sebkhachott.preset @@ -1,4 +1,3 @@ -fader:Bassess:4.89 fader:Drums:0.00 fader:Basses:-40.16 fader:Guitars:0.00 @@ -52,5 +51,4 @@ fader:FX_Vx_Dag_1:0.00 fader:FX_Vx_Dag_2:0.00 fader:FX_Vx_Dag:0.00 fader:Scape_Vx_Dag:0.00 -fader:Vx_Jeannot:0.00 -button:button1:0 \ No newline at end of file +fader:Vx_Jeannot:0.00 \ No newline at end of file