Permalink
Browse files

add OSC connections to CVCenterControllersMonitor

- The monitor didn't display OSC connections for any CVWidgetMS - not
finished yet.
- fix link in helpfile for submodule Conductor

Signed-off-by: Stefan Nussbaumer <st9fan@gmail.com>
  • Loading branch information...
nuss committed Sep 12, 2017
1 parent 30d09c7 commit 4d91fc37cf1e1b00979f59f942903cfaf70bd102
Showing with 19 additions and 9 deletions.
  1. +16 −1 CVCenter/CVCenterControllersMonitor.sc
  2. +2 −7 CVCenter/HelpSource/Classes/CVSyncText.schelp
  3. +1 −1 Conductor
@@ -123,7 +123,7 @@ CVCenterControllersMonitor {
}
*getControllersList {
var midiCtrlrs, oscCtrlrs, tmp;
var midiCtrlrs, oscCtrlrs, tmpArr, tmp;
midiCtrlrs ? midiCtrlrs = ();
oscCtrlrs ? oscCtrlrs = ();
@@ -176,6 +176,21 @@ CVCenterControllersMonitor {
}
}
})
},
CVWidgetMS, {
tmpArr = w.wdgtControllersAndModels.slots.collect { |sl, i| sl.oscConnection.model.value };
tmpArr.postln;
tmpArr.do { |sl, i|
if (sl != false) {
tmp = (sl[2].asString + "(slot" + sl[3] ++ ")").asSymbol;
if (oscCtrlrs[tmp].isNil) {
oscCtrlrs.put(tmp, [1, [k.asString ++ "["++i++"]"]]);
} {
oscCtrlrs[tmp][0] = oscCtrlrs[tmp][0]+1;
oscCtrlrs[tmp][1] = oscCtrlrs[tmp][1].add(k.asString ++ "["++i++"]");
}
}
}
}
)
});
@@ -4,15 +4,10 @@ categories:: GUI, Conductor
related:: Classes/CV, Classes/CVSync, Classes/TextField, Classes/TextView, Classes/StaticText
DESCRIPTION::
CVSyncText adds the classes link::Classes/TextField::, link::Classes/TextView::, link::Classes/StaticText:: to link::Classes/CV#*viewDictionary:: so they can be used in combination with link::Classes/CV::s. However, this only makes sense if their strings compile to a numeric array. Compilation here means that on any call for the CV's current value the element's string variable gets interpreted. Hence, expression or function-call that compiles to a numeric array can be used.
CVSyncText adds the classes link::Classes/TextField::, link::Classes/TextView::, link::Classes/StaticText:: to link::Classes/CV#*viewDictionary:: so they can be used in combination with link::Classes/CV::s. However, this only makes sense if their strings compile to a numeric array. Compilation here means that on any call for the CV's current value the element's string variable gets interpreted. Hence, any expression or function call that compiles to a numeric array can be used.
CLASSMETHODS::
METHOD:: initDelay
The class' magic happens on compilation of the class-library. However, this process can only happen after the link::Classes/CV#*viewDictionary:: initialized. I didn't find any other way than adding a small delay (default: 0.2 secs) to the init-process to make sure all goes well.
returns:: the delay (a link::Classes/Float::)
METHOD:: valRound
The array in the link::Classes/CV::'s value may contain link::Classes/Integer::s and/or link::Classes/Float::s which may have many decimals. For these may be rounded to a reasonable number - by default code::valRound:: is set to 2 decimals (code::0.01::)
@@ -48,7 +43,7 @@ c = CV([0!5, 10!5].asSpec)
(
w = Window("CVSyncText");
m = MultiSliderView(w, Rect(0, 0, w.bounds.width, w.bounds.height*2/3))
.size_(5).indexThumbSize_(w.bounds.width/5);
.size_(5).indexThumbSize_(w.bounds.width/5).isFilled_(true);
t = TextView(w, Rect(0, w.bounds.height*2/3, w.bounds.width, w.bounds.height/3));
w.front;
)

0 comments on commit 4d91fc3

Please sign in to comment.