Easiest way to resort a padobject bottomup

Discuss Lemur and share techniques.
Post Reply
electrofux
Regular
Posts:297
Joined:24 Jan 2012 18:22
Easiest way to resort a padobject bottomup

Post by electrofux » 21 Jan 2014 09:41

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

Traxus
Regular
Posts:216
Joined:30 Nov 2012 06:19
Location:Detroit
Contact:

Re: Easiest way to resort a padobject bottomup

Post by Traxus » 21 Jan 2014 17:37

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]).

electrofux
Regular
Posts:297
Joined:24 Jan 2012 18:22

Re: Easiest way to resort a padobject bottomup

Post by electrofux » 22 Jan 2014 09:22

Thx, this helped.

Post Reply