Page 1 of 1
Easiest way to resort a padobject bottomup
Posted: 21 Jan 2014 09:41
by electrofux
Hello,
I have an 8x8 Padobjects which triggers Notes. Now the normal Padobject starts with the first element in the top left but i need the first object to be the bottom left. What is the easiest way to achieve this (at best just with some magic in the Mapping fields) ?
Cheers
electrofux
Re: Easiest way to resort a padobject bottomup
Posted: 21 Jan 2014 17:37
by Traxus
Play around with the getattribute() function
Code: Select all
decl columnCount = getattribute(getobject(), 'column');
decl rowCount = getattribute(getobject(), 'row');
decl padCount = sizeof(x);
You'll play with some math between those three factors to figure out exactly what you're going for, it will probably help to make a function that gets the row of the current pressed pad, and another that gets the column of the pressed pad...
Once you've got that you can probably write a third function that executes on x and re assigns a pressed pad to a diffrent value; you'll want to store this in a new variable, separate from x (call it n for instance). You can then write your output functions to 'execute on n' rather than x.
Also, remember that sizeof(x) will give you the total number of pads, but the last vector in x will actually be one less than that (ie a 4x4 set of pads will not start at x[1] and end at x[16] but instead start at x[0] and end at x[15]).
Re: Easiest way to resort a padobject bottomup
Posted: 22 Jan 2014 09:22
by electrofux
Thx, this helped.