I wonder if it is possible to have different looking surfaces in different mapping pages with the MIDI Remote - the idea being, having pages that reflect the changing layout in my TouchOSC template.
I was able to do this, for instance, which is “adding” a button when a certain page is selected:
But I cannot find a way to do the opposite, that is, deleting surface elements if a new page is activated.
Here’s an excerpt of the code used in the case above:
var pagesel = device.mMapping.makePage('PageSelector')
var pagetest = device.mMapping.makePage('Pagetest')
var s1
pagetest.mOnActivate = function(activedevice, activemapping) {
var s1 = device.mSurface
bigbutton = s1.makeButton(2, 0, 4, 4).setShapeCircle()
}
I also tried inserting s1 = null to see if that would work, but it didn’t.
The only “visually useful” way I’ve found is to use a makeBlindPanel to cover the whole area, but it’s cheating
I’m just wondering if it is possible at all to re-draw controls from scratch or once they’re on, they’re on.
Just so that I can understand better. Since you have your template in TouchOsc, and it properly reflects what you’re controlling, why would you need it reflected on the MR Window?
I think that MR was based on the concept of a “real” standard surfaced controller. I haven’t seen a way of altering the MR surface, while your workaround of adding another element using the mOnActivate of a page, as you correctly noticed is not reversible.
Just so that I can understand better. Since you have your template in TouchOsc, and it properly reflects what you’re controlling, why would you need it reflected on the MR Window?
Saving “space” instead of having them all laid out in a huge interface, but I get what you mean. I don’t really open the MIDI Remote interface. Once everything is set, I don’t need to visualise it on screen.
However, this could change if in the future the MIDI Remote would include the possibility of acting on its controls via mouse… Which wouldn’t be bad at all.
My current workaround with the blind panel works, at least “visually”. I don’t think it’s going to be cited as a best practise in any manual, though