Closed belmendo closed 10 years ago
good catch, I implemented it. try to download the latest pixelcontroller release from the build server:
let me know if that works
Above link doesn't work - complains about No Workspace.
Thanks!
Try this temp download: https://dl.dropboxusercontent.com/u/3548330/pixelcontroller-distribution-2.1.0-RC2.zip
Tried the download. It didn't quite work so I had a friend help me get it to build locally. Our Java skills are weak.
After some experimenting, TouchOSC is sending Ints and PixelController is using Floats. We just added some more logic and turn the mode off if it receives an unknown message.
case RANDOM: // enable or disable random mode
try {
String onOrOff = msg[1];
if (ON.equalsIgnoreCase(onOrOff) || "1.0".equalsIgnoreCase(onOrOff)
|| "1".equalsIgnoreCase(onOrOff)) {
col.setRandomPresetMode(false);
col.setRandomMode(true);
LOG.log(Level.INFO, "Random Mode enabled");
} else {
col.setRandomPresetMode(false);
col.setRandomMode(false);
LOG.log(Level.INFO, "Random Mode disabled");
}
} catch (Exception e) {
LOG.log(Level.WARNING, IGNORE_COMMAND, e);
}
break;
case RANDOM_PRESET_MODE:
try {
String onOrOff = msg[1];
if (ON.equalsIgnoreCase(onOrOff) || "1.0".equalsIgnoreCase(onOrOff)
|| "1".equalsIgnoreCase(onOrOff)) {
col.setRandomMode(false);
col.setRandomPresetMode(true);
LOG.log(Level.INFO, "Random Preset Mode enabled");
} else {
col.setRandomMode(false);
col.setRandomPresetMode(false);
LOG.log(Level.INFO, "Random Preset Mode disabled");
}
} catch (Exception e) {
LOG.log(Level.WARNING, IGNORE_COMMAND, e);
}
break;
Do you still get the pixelinvaders dot ch emails?
Really enjoying this project! Thank you!
yes, michu at pixelinvaders dot ch - can you send me the log files, so I see the errors, thanks
Ok I improved the handling, it should work with Strings (ON), ints (1) and floats (1.0). and if the parameter is something else a log message will be generated.
can you redownload it here: https://dl.dropboxusercontent.com/u/3548330/pixelcontroller-distribution-2.1.0-RC2.zip
and test? thanks
Confirmed all of the above. Passed ON/OFF, 1/0, 1.0/0.0, and Z. Got correct responses including the new log message for unknown option Z.
Thank you!
Great, thanks for the test
I'm trying to take advantage of the
randommode.lifetime.in.s
config property - which is great for stand-alone operation.In TouchOSC Editor, I'm trying to create Toggle buttons for
/RANDOM
and/RANDOM_PRESET_MODE
but they take strings as parameters. Any chance you can do a translation on java side so '1' means "ON" and '0' means "OFF"? (Unless you know how to pass strings from Toggle buttons.)When sending those OSC commands, the interface buttons on OSX 10.9.2 don't respond but I can see the commands being accepted in the log file.
Thanks again!