Apc40 and the Button_Matrix

Questions and discussion about building and using Max for Live devices
Post Reply
Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Apc40 and the Button_Matrix

Post by Markemark » Tue Feb 09, 2010 4:56 am

Okay so I go to Controller apc40, then to Component Session_Control then Control and observe the property value coming from the Button_Matrix. Output in the Max print window shows x x x x for each button press on the apc40 buttons. First number being 1 on button down 0 button release, second number is 0-4 indicating row, third 0-7 indicating column, forth number not sure just always outputs a 1(maybe someone knows?). My question here is when you move the red rectangle the output values do not change. For example if the red rectangle is in its default position the top left most button when pressed down will output 1 0 0 1. If I move the red rectangle now say 1 scene down and 1 track over that same button I'd expect to now output 1 1 1 1, its stays the same. Please let me know if I am observing the wrong area. Right now I have a static observation of the 40 buttons, what I'd like is a dynamic observation of the red rectangled grid. Any input would be great!!!

halley
Posts: 40
Joined: Sun Jun 28, 2009 8:48 am

Re: Apc40 and the Button_Matrix

Post by halley » Wed Feb 10, 2010 9:59 am

If you bind the button_matrix values to the actual scene/track offset, what would you do
when you don't want to use the button_matrix to control clips but to control something else?

It makes sense that the property values returned by the button_matrix are related 'only' to the button_matrix:
i.e., as you have already discovered, button press/release, row, column...

then when you have the button_matrix value you simply apply any logic you want:
- scene_offset/track_offset mapping when you control clips/session
- note/octave/velocity/ mapping when you control notes
- ...


as suggested above try to look to the scene_offset and track_offset properties
they should both be properties of the Session_Control Component (cannot check at the moment).

Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Re: Apc40 and the Button_Matrix

Post by Markemark » Sun Feb 14, 2010 9:21 pm

Yes I discovered what you explained here and this is the way to go to have both options static and dynamic. I have only been able to get the offsets from a live.object though, if I try to observe with live.observe, max print window returns "property cannot be listened to". Is this my error or is this a limitation of m4L. Any input appreciated!!!

<pre><code>
----------begin_max5_patcher----------
1419.3oc0Z00iiZCE84LRy+ADOOaD1789V28g9RaUklGGsJxA7j3cIPD3jc1
tp82dM1FhcBjXHkLoZzDv3O3dN95y0X6e93CyrWV7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.eECfwhP7d.tjXcpg3BLbj4aJxpkmtJnADeeiZpIEZ.
i6z5hDFFzbhUgVcpIEZdlhrZAuwgro09cMd7T38K..F6aAFkuUXbsFPHWPvU
rp9gSsdf4xAitiAJlnMzMTYLCO0zpzEeCflXKXf.GUnAblZnYpy33iNoDO5V
Fc5FD18cAWQFKeLZ0iXeNV7DC1jSHSOUDTrIEtcjJ.nxH0olVFwyXFI5tLh.
2r7MVdAbeB.Oi.P7n0GkaKlXcrjpk7TSOzbMAZidhfPH+q9fNxsJQtue2DjA
MAYti0oCJlaaM.4BBgh8bCNwHy8VI86KN3AhuWU49abHA2aPL7PE.2nyqmZ.
ftIiZ7KONIUn83zEhEZbAhRKIK2QEeEt9wK4LGdhq+3WzcM687drJqXIJSdR
XZaS6KdfQZQO+F4UoyfYGyHF4PYcscb1f.s623PODPRk0SO1A8rzK8rzSxN2
QgplCUTyaXO5.s1rchOiyXFtb6sddWIu+pChncI+sUOQOJnl68JbgCfMahpF
n6f8LxblyPECJ1W9bWAjm7.tNoWP+jtaWfQyxPkqZi02aOzwK+5X5k58Htks
aE6E9Oi4DsAG1IZCdFlMRtPp0KXs6kNNavdYpJxp7Zog16lHFijOJBC7eLgE
M87knM0WcUI+cbHuFV7zElSKTmQe3SGg35Yxwc10NHSywDSy41aZFYaQuK1V
jIll+PMM4Fo3GprqJ9GlRhpS4iOvt7uPK+u7j
-----------end_max5_patcher-----------
</code></pre>

halley
Posts: 40
Joined: Sun Jun 28, 2009 8:48 am

Re: Apc40 and the Button_Matrix

Post by halley » Tue Feb 16, 2010 5:26 pm

usually, but not always, properties that can be observed are the ones
originated directly inside live, and/or the ones that don't create too much
events (unless these are essential events, like with some timing/transport properties).

track_offset and scene_offset are properties of the components.
these properties are not part of the session itself, but only of the partial
view of the session space that you have on your hardware (APC/Launchpad/whatever...).

you maybe interested in observing/listening what triggers or its related to the update
logic of track_offset and scene_offset properties. For instance, you maybe want to know when
bank buttons are pressed, bank left/right buttons update track_offset, bank up/down
buttons update scene_offset.
track_offset and scene_offset are the 'coordinates' of the hardware_view/red_rectangle
inside the session area, so you may want to observe the number of tracks and the number
of scenes because these are boundary conditions:
- if the track count and/or scene count changes there should be a check if the track_offset
and/or scene_offset are still within the allowed range (mainly if tracks are deleted).
- if the hardware_view/red_rectangle reaches the boundaries of the session area some of
the bank buttons may be disabled (for example, it makes sense that the bank left button
is enabled only when track_offset value is more than 0, in the same way it makes sense that the bank
right button is enabled only when the track_offset value incremented by 1 is less than the track count value).

if you observe bank buttons, tracks and scenes you should be able to observe the red rectangle
anyway, remote scripts code is not publicly released so I could easily miss somethings here
that are part of the actual implemented logic.

Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Re: Apc40 and the Button_Matrix

Post by Markemark » Tue Feb 16, 2010 10:27 pm

How 'bout that 4th character from the button press, anyone have an idea why its there? Its always a 1 even with session overview on.

halley
Posts: 40
Joined: Sun Jun 28, 2009 8:48 am

Re: Apc40 and the Button_Matrix

Post by halley » Wed Feb 17, 2010 12:57 am

could it be a reference to the device?
suppose you have more than one APC,
the 4th number basically directly tells
on which APC the button was pressed. so
first APC Button_Matrix Control returns
'1', second returns '2' and so on.

Post Reply