Forums > Max For Live

Simple record arm patch based on pgm change clips?

March 12, 2014 | 4:53 am

Hello peeps.

Wondering if any of you know of a simple patch that can arm/disarm a midi track based upon a program change clip being triggered?

For example on a track id put a clip with bank 0 and it would arm it, and bank 1 would disarm.

This means i can arm/disarm instruments based upon what scene im currently on.

Any ideas?


March 12, 2014 | 12:47 pm

Try this:

<code>

– Pasted Max Patch, click to expand. –

</code>

This doesn’t use banks. as far as I can tell Live doesn’t differentiate between banks with program change clip. I would use the same bank, but with different program changes. This patch takes program change 1 to disarm, and program change 2 to arm the first tack in the live set.


March 12, 2014 | 3:00 pm

Thats great.

Couple of questions…

What do i do with that code? and

Will this work on the track the patch is on?

I have multiple tracks across my set that i need this to work for. Not just the first track in the set.

Thanks


March 12, 2014 | 3:18 pm

What you do with that code is expand it to your needs.
This patch will work on any track in the set, did you open it up and try it? .
Do you have any experience with the live API?
I don’t want to build your setup for you, but I did expand the code a little here:

<code>

– Pasted Max Patch, click to expand. –

</code>

I’m not sure if the abstractions will carry over let me know if you have problems opening this.

The abstractions take the track number as an argument. A bang in the left unarms the track, a bang in the right arms the track. put this at the top level of a group of midi tracks, so when you fire the scene with your clips with all of the program changes they pass through this device and set the states of the desired tracks.

There are other ways to do this, but I’ve already done what you asked in your first post.


March 13, 2014 | 2:09 am

I massively appreciate this but i have no experience in how to turn this code into a max patch.

Sorry dude.

I need this patch to work completely independently on a track, no groups or master tracks.

It will simply trigger the arming of a track when a scene is launched with a clip on it.

So… in this case a clip with PGMCHANGE1 will disarm and PGMCHANGE2 to arm?

Thanks again!


March 13, 2014 | 3:21 pm

Anyone that can help with this?


March 13, 2014 | 4:07 pm

I just did help you with this.
Copy the code I posted.
Open Max -> File -> New from clipboard.
select all and paste into a M4L device.
Just because I’ve nearly made exactly what you asked for, I’ll make a device that does the following:
When dropped on a track (must be a midi track) will track incoming program changes. You will be able to select which PC message will trigger the record on and off for that particular track.

Sound good?


March 13, 2014 | 4:22 pm

Could you have a look at this video and tell me where I’m going wrong?

http://cl.ly/260u0d0U221Y

Thanks!


March 13, 2014 | 4:23 pm

But that device you just talked about sounds PERFECT!!!

"When dropped on a track (must be a midi track) will track incoming program changes. You will be able to select which PC message will trigger the record on and off for that particular track."


March 13, 2014 | 8:55 pm

As I feared the abstraction didn’t make it across.

Drop the attached file in your search path.

I am gonna be away from my computer, but I’ll throw that patch together on tuesday.


March 13, 2014 | 10:42 pm

Got bored. here it is


March 16, 2014 | 5:50 am

mate. you’re a very kind man.

i do seriously appreciate you taking the time to do that…

I’m having a couple of little teething issues where the program change clip needs to be reset in order for it to work..

And… for some reason this isn’t working in arm exclusive mode which is what i need.

Have a look at the vid here – http://cl.ly/410D023w3e0K


March 16, 2014 | 5:18 pm

The program change in the clips starts at 1 and the the program change selector in the device begins at 0.

so clip 1 = device setting 0. I could throw in some math to have it agree.

You are right that it doesn’t "work" in exclusive mode. It still works, just not exclusively. Two ways around it.
1. Set up scenes of midi clips that turn off what you need to (time consuming for you)
2. Program the arm function to be exclusive in the M4L device (time consuming for me ;))

It seems the Live API works independently of the exclusive arm setting. This may not be the case, but I’d have to investigate.


March 17, 2014 | 5:16 am

Yep i got ya.

Its working now… although sometimes i need to restart live and max for it to work… so I’m not sure what that could be… not a major issue but might be a bug lying there somewhere..

At the mo… i have just programmed loads of clips to turn off the tracks i don’t want armed during scene launches… that not a problem..

BUT… if you do have the time it would be AMAZING to have the exclusive feature.

Cheers


March 17, 2014 | 11:22 am

Viewing 15 posts - 1 through 15 (of 15 total)