TouchOSCLabel class

main
Mike Lynch 2023-04-15 15:48:42 +10:00
parent 61130aa239
commit 464412494a
2 changed files with 29 additions and 0 deletions

View File

@ -17,6 +17,13 @@ TouchOSC {
net.sendMsg(url, *oargs)
}
label { | url, default |
var ctrl = TouchOSCLabel(this, url, default);
ctrl.init();
controls.put(url, ctrl);
^ctrl;
}
button { | url, default, apply |
var ctrl = TouchOSCControl(this, url, apply, default);
ctrl.init();

View File

@ -85,6 +85,28 @@ TouchOSCControlXY : TouchOSCControl {
}
TouchOSCLabel {
var <touchOSC, <url, <value;
*new { | touchOSC, url, value |
^super.newCopyArgs(touchOSC, url, value)
}
init {
this.send();
}
value_ { |newval|
value = newval;
this.send();
}
send {
touchOSC.send(url, value);
}
}
TouchOSCScale {
var <min, <max;