MADRIX Forum • SetPixel() on mapped pixel layer
Page 1 of 1

SetPixel() on mapped pixel layer

Posted: Wed Nov 09, 2016 11:58 pm
by reporter
I've created a setup to control a kinetic light installation and I've divided the matrix up into zones for colour, position, and speed. I'm mapping almost every layer, but I'm also trying to use GetPixel and SetPixel to grab the colour values from the colour group and apply it to the position group.

It works no problem on unmapped layers, (or as a Storage Place macro), but I'm not able to use SetPixel to pixels outside the current map area. I think it's a logical limitation, as I've mapped the layer, so I probably shouldn't be able to write to a pixel that's outside that zone, but is there a workaround? I 've tried keeping the map preset full size and the tiling preset smaller, but that doesn't work.

On a related note, is it possible to have have an MAS layer see pixel values from layers below? I don't think it's possible, but if so I would be able to achieve what I'm hoping for that way.

Currently my solution is to use a storage place macro, which works, but only if I want to grab the pixel values of all layers.

Thanks,

Nathan

Re: SetPixel() on mapped pixel layer

Posted: Thu Nov 10, 2016 6:39 pm
by Guertler
When you are using SetPixel() and GetPixel() on the layer Macro you only have access to the mapped part of this layer. You have no access to a port out of the map.
.
But what you can do is to work with the Tile option of the Map dialog in MADRIX.
For instance if your patch is devided that the winches are patched on the top and the color fixtures below you could set the Tile to bottom and the Mode to repeat. Now the information of every pixel in the lower half will be copied to the upper half for the desired layer.

Re: SetPixel() on mapped pixel layer

Posted: Thu Nov 10, 2016 7:46 pm
by reporter
Hi,

Thanks. I've been using that a lot and also using the GetPixel() and SetPixel(), to change the values of the motors by putting the macro on the storage place instead.

I'm creating thresholds so that if the colour is higher or lower, then make the motors 0 or 255, and also to have the motors respond to channels other than red.

Nathan