APC40 Note Mode Patch......NEED HELP

Learn about building and using Max for Live devices.
JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Tue May 31, 2011 12:27 am

I've been working on an APC40 Note Mode patch, posted here http://www.maxforlive.com/library/device.php?id=682 , as a work in progress until I get it finished. I started this thread in hopes of getting a discussion going to help me finish it.

I NEED HELP
1. Getting the Matrix LED's to Update when the device gets activated.

2. Getting the EDIT MODE GUI Matrix to update LED's properly.

ANY HELP or ideas would be GREAT!!! I posted a thread over at the Ableton Max for Live forums to get some help discussion going.

I'm not sure what to do with the Scene Selection buttons yet. Maybe using them to toggle what the CUE KNOB controls, i.e, pitch bend or modulation, or using them to octave up and down. Also I was thinking about using the Master Volume (when NOT in edit mode) to act as modulation.

I used some of the ideas behind Mark Egloff's Step Sequencer, as well as some patching ideas from Darren Cowley. Thanks guys!

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Tue May 31, 2011 2:36 am

OK I think I got the GUI in the editor updating the LED's properly.

Still cant get the APC40's LEDs to update.

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Tue May 31, 2011 3:28 am

Clip stop buttons are not editable yet. I will fix this ASAP.

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Tue May 31, 2011 3:50 am

Clip Stop LED's are now editable.

S4racen
Posts: 5987
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: APC40 Note Mode Patch......NEED HELP

Post by S4racen » Tue May 31, 2011 7:43 am

If i get a chance i'll have a look at this later mate, updating the leds of the button matrix should be relatively simple though?

Cheers
D

Mark Egloff
Posts: 26
Joined: Fri Oct 30, 2009 1:11 pm

Re: APC40 Note Mode Patch......NEED HELP

Post by Mark Egloff » Tue May 31, 2011 8:22 am

Hi JuanSolo

Your patch looks quite nice! Good to see that my patch was not too complicated to understand and reuse :lol:

The reason why your clips don't update properly is because you confused rows and columns. Just add a "$2 $1 $3" after your "zl iter 3" object and everything should work fine. Also, you need to wire the On/Off button to the left inlet of the message box (put a "select 1" and "deferlow" in between), otherwise you're just updating the message box, but you're not sending any calls to live.object.

However, as far as I can see, you are hardcoding the colors. So I would suggest to use a matrixctrl object with a value range of 6 instead of saving the color for each button individually. This makes editing colors much easier and you could even allow users to create their own color layout. Something like this:

<pre><code>
----------begin_max5_patcher----------
2228.3oc6bsziiaiD9bGf7efPm1EXRCQp26kESFf.rW1I.ydax.CYK5t4Nxj
dknc2SBx+8kODkrrkjYaaIqraNz9gXI5p9XUeUUTR8u88e2CNKYuhKc.+Mvm
AO7vuINxCpiIOxClC7fylzWWkmVpDzghegs7e67tpw1mVPS2fUCsJmrcQNNq
dPN9UtZjsobdA3jwY634XN+aawZcvw4cU+A9hQl0LJuj7qJIftO5ZNtXJW8L
g9zhB7Jt9z8iiEiCjBAh7juBEGnYpn61PnhePkg.O7Gn1DdeAIMG7ir7FkTb
VZ8TcZdlCSxTmf.K9AOXsvko6wYKDGTnTKjFMY4NtFhenAQkZeg3mjiKVfoo
KywGpQh4lR3B8PaURK5cf.0qPyGPlO3Y9fuZTnQXnQXnQXnQXnQXjQXjQXjQ
XjQXjQXOivdFg8LB6YD1yHruQ2pOWeyb5aj22L5gFB7feWu1StV3PivgFgCM
BGZDNzHbjQ3HivQFgiLBGoEF7EM3+6e+20dsrdQbnky8o46vr0liWOvgKzF2
biGTqAqVw6xa3PwJelUv6MdqknaXYh3V0LghpCaZIRNi9j8SFgJkysmohP+p
bpTPiaeSAKC263D5Zl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81JhTo30A8puLAVlcDxyYFYqi6mqFfqsQ9yPdW
qybnBNlgFPn8o97mo9Pug5BmmgAnInkiQ0.rdKflmAAguktzuspeu+uk47+e
B57O3PmNZuOMROkyVllW8bZc5SamUOORm8QdpiStuGvNMH2dqhqdf6Nd407X
2cxxp7+8RGjcrusEtcvWGKn8rX14SCn8JW6djFpSV3jqbGsOgyLjy0JkK5tn
bAg1nbGiuSjxodlxsP6BuZsSd.wa+WDATzCK
-----------end_max5_patcher-----------
</code></pre>

Hope that helps a little.

Finally, how about using the scene launch buttons to create chords, i.e. if you hold down one or more scene launch buttons, pressing a button on the matrix would automatically add additional notes. In the GUI editor, you would specify the relative distance between the note pressed and the additional note added in semitones (e.g. "+12" to add an octave).

Good luck with your patch! If you are stuck again, feel free to post your questions here.

Cheers,
Mark

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Tue May 31, 2011 2:18 pm

Mark Egloff wrote:...Just add a "$2 $1 $3" after your "zl iter 3" object...
Cant believe I overlooked that, TOO many hours patching 8O . Thats a cool trick.

Mark Egloff wrote:...However, as far as I can see, you are hardcoding the colors...
I made the colors editable. The Master Volume, changes the colors of the LED's when the master button is pressed. If you store the map it saves the custom color scheme as well as the note/pitch settings.

But I will try the Matrix Ctrl too. That may help trim some of the wires all over the place.

I'll take a look at this code after work.

THANKS Mark!

canine
Posts: 19
Joined: Fri Jul 28, 2006 9:18 am

Re: APC40 Note Mode Patch......NEED HELP

Post by canine » Tue May 31, 2011 5:38 pm

here is a part of one of my patches that I was using to select the number of partials with the top three rows of the APC as something like horizontal drawbars. Maybe this helps you?

It's not very well documented, I'm sorry, and I don't have my APC at hand, but please ask me anyway, and I will try to help, best I can...


<pre><code>
----------begin_max5_patcher----------
1941.3oc0as0aaaCE94jeEbdON2.wqhpuEzl1Brstht81bwfrshsVroLjjQZ
ZQ+uOQRoX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agS.AEIvQdB6YPxvSXP8h6BMAnyImTmjvl5jSzDEd
dpqbB.t5UWDcDXUmbpvKJrNB3thI.0lboHJJrhNm3ICvAT1E4hri4cp3BX8D
HbptNInoD3DMAaI4LWr5Dv5IHzUIWfmYzAb2Tb.Rv5Zh5cHh6ebD1QHc.JRT
VjtUlBrs+qT1iGAfk3A5BkgwFPZW8GdvliNRr5hirHPMPcwmANDbHgcARXPg
DwEHAWbZrSq2zAlhECaWSGhzpwSd7HHJflAdM8cplwAERXmJ4IBbZpSUeXaV
L1obTgsvPmrF4Gi0HmR6KqQ2Pq3nPqr2PqKA34buqVRCjH9Gj.LwVWbmIHdW
cabXaLA2kfiBfaVhy7Dft8YNux..53WPbMlMfROmvDrPxk5tgsENBWzmNl3J
UG7sK+Ov.C.ap
-----------end_max5_patcher-----------
</code></pre>

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Wed Jun 01, 2011 5:57 am

OK, the LED's now update! The patching is still crude and these are things I hope to iron out ASAP. I really need this device to work as efficient and effective as it can so I will be maintaining that until I reach my goal of acceptability.

Once I run it through a bunch of testing I will take it out of "WIP" and post a video on using it in a few different ways.

@Mark,
I opened the code you posted, and have a few questions, but I have only had minimal time to work on this stuff tonight. So maybe tomorrow I will post a few questions on how to get things looking/working more efficient.

THANKS!

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Sat Jun 04, 2011 6:17 am

I'm ultra confused how to make it so you can use multiple instances of disabling the APC40, on different tracks. I cant figure out how to turn the device on, AND disable the APC40 using the track selection buttons while the same device is on another track. I tried examining Mark's Step Seq patch again and again, but I am missing something?

marktakeshi
Posts: 7
Joined: Sun Mar 22, 2009 12:17 pm

Re: APC40 Note Mode Patch......NEED HELP

Post by marktakeshi » Sat Jun 04, 2011 10:10 am

Hi JuanSOLO

The whole turning on and off thing is very complicated, because you need to somehow synchronize the timing between several APC Step-Seq patches, so that they turn on and off in the correct order.

They main problem is that, if you have Step Seq A and Step Seq B, and you switch from A to B, B turns into APC-Step Seq mode first and after that, A turns Step Seq mode off and returns the APC into normal mode (enabling the basic scene launch functionality). Now you have the mess, since the APC triggers clips and sets notes at the same time and the LED lights receive information from Live and from the APC Step Seq B.

If you want to try to understand the whole thing, only look at the patchers in the top-left corner of the main-patch, i.e. "Initializes the patch and properly turns it on/off".

It's hard to explain everything step by step, but here's the basic logic for both functions:

=== Disable when switching to another track ===
i. Setup two observers: one that observers the currently selected track and one that observers in what track the APC Step Seq resides in and compare both IDs ("p initialization")

ii. If they match / don't match send a signal to a patch that turns the device on / off in the proper order (see "p turn_on_off")


=== Toggle on-off via the scene selection buttons ===
i. Setup 3 observer: 1) Track in which the device resides in; 2) APC Track Selection buttons; 3) Track Offset = the position of the red rectangle ("p initialization")

ii. Compare if "Track number == APC Track Selection button + Track Offset" and send a bang to the On/Off button (see "p observe_2nd_press")

iii. Also implement some algorithm to make only the 2nd button press send a bang to the on/off button, otherwise you always toggle on/off when you switch tracks via the track select buttons.


Don't spend too much time on this functionality and focus more on your main patch. I still can help you in the end to implement that part after you have finalized your patch.

Cheers,
Mark

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Sat Jun 04, 2011 4:16 pm

Yeah it's definitely complex, I tried just using your Sequencer patch Initialization section, and hook the on/off button to what was necessary, but it still did not work properly. However I think I may have had a few other things hooked up wrong as well.

I will definitely go with your device and just get the patch fully functional on it's own then worry about using multiple instances of it.

Thanks for all the help man!

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Sun Jun 05, 2011 5:43 pm

OK so I pretty much left Mark's initialization patching intact, and have wired up the patch so it works with multiple instances along with other instances of Mark's Step Sequencer patch. I know some people might want to use this patch to play synths etc, but personally I use a keyboard for such things. What I was aiming for in creating this patch was to control things like "The Finger" or other beatmashing VST FX and such. Nevertheless it works with various synths and it's a lot of fun.

Editing LED colors in EDIT MODE, are now done with the Scene Launch, Stop All Clips, and Master button.

I thought about using the Scene Launch buttons for a few different things when the patch is active and not in EDIT MODE. Things like selecting chords, or changing the CUE KNOB to go from Velocity, Modulation, Pitch Bend, etc. HOWEVER, I realized I would rather the Scene Launch buttons behave in their default functionality of launching scenes while playing the patch in Note Mode. I need to figure out how to enable the scene launch buttons to do this, because activating the patch disables Scene Launch functionality. I am assuming I will have to set up a way to create my own default functionality for the Scene Launch buttons when the patch is active, because the red box, or "session overview" is disabled. So am I right in thinking I would need to observe where the red box was, and have the Scene Launch buttons operate as scene launching, in that range???

S4racen
Posts: 5987
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: APC40 Note Mode Patch......NEED HELP

Post by S4racen » Sun Jun 05, 2011 6:37 pm

Yep!!

Got it in one....

Cheers
D

JuanSOLO
Posts: 3236
Joined: Sun Jul 15, 2007 8:21 am
Location: Shreveport LA, sometimes Dallas/Ft Worth TX

Re: APC40 Note Mode Patch......NEED HELP

Post by JuanSOLO » Sun Jun 05, 2011 7:15 pm

Darren you got any clues on keeping the Scene Launch in default, when using Note Mode? Is there a way to disable The Scene Launch independent of the Matrix and Clip Stops?

Post Reply