ok just to clarify:
/map
is/was an serialosc OSC message that closely mirrors the actual serial protocol which is transmitted via USB. it evolved from the “optimized” method of sending a full row via serial (which was optimized for a particular LED driver that was no longer used after going var-bright) and the matching “col” which is actually less efficient than sending individual LED messages. the map
serial message sends a block of LED data without individually specifying x/y data, so it saves a ton of serial bandwidth.
sidenote: do not try to refresh the grid by sending tons of single LED messages via serial. you can effectively do this in max/msp/etc by using tons of serlialosc /led
messages and you will bottleneck your system.
the way around this in max/msp is to use javascript (hang on, wait for it) which maintains its own array of the LED data, then uses /map
to copy the array data to a big OSC message to serialosc, typically on a timer. sound redundant???
norns is different. it doesn’t use serialosc. it uses libmonome, which is basically serialosc without the osc.
all norns has is an internal LED buffer, set by grid:led(x,y,i)
and then grid:refresh()
which checks for “dirty” bits and updates (sends serial, via map message) to those requiring update)
this, is infinitely better than any grid interface we’ve done before. it’s more efficient and takes care of the plumbing. however, there are actually some optimizations about how to treat this buffer/refresh pair for efficiency (ie, using dirty flags for your app and a clock timer for regular refresh… but that’s another study… and really nitpicky when it comes down to it… more of best practice)
what i think you’re looking for is a simple translation layer
given an incoming /map
message of format
/map x_off y_off data[1..64]
(that’s 66 bytes)
just make a thing that turns that into grid:led()
calls (below is psuedocode)
--- on osc/map
x_off = args[1]
y_off = args[2]
for x=1,8 do
for y=1,8 do
grid:led(x+x_off,y+y_off,args[x+y*8])
end
end
grid:refresh()
the point being, i’m not sure why/when there’d be an incoming OSC message in map format. norns is really good at “building”/drawing grid pixel interfaces… so unless you’re simply doing a translation layer (for something that previously was getting sent to serialosc) i’d forgo even thinking about “map”
let me know if i can clarify further