The Definitive Live Autohotkeys script!

Discuss music production with Ableton Live.
napalmskatterjazz
Posts: 108
Joined: Tue Nov 28, 2006 9:37 pm
Location: Portland OR
Contact:

Post by napalmskatterjazz » Fri Feb 16, 2007 6:30 pm

this one is screen res dependant as well as browser size dependant but if you are familiar with the mouse click concept it should be no problem to edit for your setup... The concept: instead of inserting new song(.als) into bottom of existing tracks(via shift focus right and Ctrl+V) insert in new tracks pushing existing song to tracks 9-16. Mackie emulation should be used as well for this to work properly.... Ok. so in loading track it switches currently playing track to channel B and moves crossfader to right while .als is saved to import channel A. The catch here is be carefull if you are using crossfader in track it will switch chan A to B so it will suddenly sound,,, if you are aware this will happen then It wont trainwreck. so you can import a .als and go straight to crossfade in and be ready to mix on the fly with one button on your midi controller... so here it is...

Code: Select all

~Ins::
ClipBoard :=
Send ^c
click 1207,506 ;crossfader to center
click 277,506 
click 352,506
click 428,506
click 502,506
click 580,506
click 656,506
click 733,506
click 808,506 ;end chanAselect

Click 306,506 ;start chanBselect
click 378,506
click 458,506
click 532,506
click 610,506
click 686,506
click 763,506
click 838,506
click 1234,506 ;crossfade to B
Click 259,124 ;paste for less than 6tracks
Send ^v
click 259,145 ;paste for over 6 tacks
send ^v
Return
its set up for 8track sets, add more clicks if you are playing with 16track sets .. tell me what you think.
2.0Ghz Coreduo PC notebook, 4GB ram, Overclocked to hell sittin on aluminum extra fans w/ no drivebay or pcmcia...
2.8Ghz Quadcore on Asus MB, 4GBRam, Dual 512MB SLI Graphics both @16x.

Patch
Posts: 2614
Joined: Sun Aug 15, 2004 8:14 pm
Location: Bristol, UK

Post by Patch » Thu Mar 01, 2007 11:35 am

I wrote:Has anyone had any luck AHK wise with mouseless navigation? The functionality I've been looking into is this:

-Navigate using keys/midi to an empty clip slot in the session view (ie - Track 4, scene 9) and highlight clip slot
-Change focus to browser
-Select track
-Populate originally selected clip slot (Track 4, scene 9) with selected track

Does AHK support keystroke replacement of mouse click/drag? And if so - how do you make the click/drag end point match the original screen co-ordinates selected by highlighting the original clip slot?
Rozling + Co (AHK crew) - Has anyone figured out how to do this yet? It would be sweet as hell to be able to do it using just the arrow keys + one other key to change focus...

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Post by stutter » Thu Mar 01, 2007 11:56 am

yeah, my script does that, available further up the thread.

Keys I think were - cursors as normal, numpad dot (or del) key (with Numlock off) to set focus to browser, then I think I made it Numpad del & Numpad Enter at the same time to load the track, because I had all of those keys already set up for other functions singularly. The script I think is well commented. Read my previous post, I alos wrote a little readme which is in the .rar file.

Have to catch a train now, but will try to check later and see if this has worked. It's possible it was a feature I added later than the readme file.

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Thu Mar 01, 2007 12:23 pm

I've been neglecting this for a couple of weeks now! Haven't used Live that much so its frustrations haven't been driving me to the code... I've a big writing session planned this weekend though so we might see some AHKing next week. Ahk!

I have done a nicer GUI item for the Pause function which flashes up the word 'Paused' or 'Unpaused' or something in bigger writing when you hit the toggle key. Haven't got round to uploading it yet though...

Patch
Posts: 2614
Joined: Sun Aug 15, 2004 8:14 pm
Location: Bristol, UK

Post by Patch » Thu Mar 01, 2007 12:45 pm

Sh1t - I'd forgotten about the GUI available in AHK. I look forward to seeing it!

matsimpson
Posts: 51
Joined: Wed May 17, 2006 4:42 pm

Post by matsimpson » Sat Mar 31, 2007 8:59 am

Is there any script that lets you map out the keys on the keyboard to do functions within Live - IE press the keyboard map button and then use keys such as F1-F12? Ive tried that by first disabling the F1-F12 keys using autokeys using:

Code: Select all

 F1::
IfWinActive ahk_class Notepad
    return  ; i.e. do nothing, which causes this key to do nothing in Notepad.
Send space
return 
for F1-F12 (code Copied from the AHK help file...)
So i turn on key mapping in Live, select the track 1 activate/deactivate switch and press F1. Instead of saying F1, the display seems to scroll through a few different letters really quickly, and ends on "e". Is there any way to fix this?
thanks

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Post by stutter » Sat Mar 31, 2007 3:40 pm

first thing that comes to mid is to map F1-12 to keys that normally aren't used or available, like é. There are loads of these accented letters.

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Sun Apr 01, 2007 9:09 pm

The script here already does this! Specifically this part:

Code: Select all

	F1::á
	F2::é 
	F3::¬
	F4::ó
	F5::ú
	F6::Á
	F7::É
	F8::Í
	F9::Ó
	F10::Ú
- you don't need to go disabling the keys first, just make sure the remapping only occurs on the Live window. This is done in the AHK script here by first adding several window classes to a window 'group' called Live.

Code: Select all

	GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:00000000
	GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02BB05FD
	GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02FF0351
	curMode := 1
	return
Then above the bit of code you want to apply to Live, put

Code: Select all

#IfWinActive, ahk_group Live
Just found out the current link doesn't work - I'll try and get up the latest version tonight. There's not much new in it, mind...

BTW I know for a fact that some of you reading this have built your own custom functions - share your ideas & benefit the whole community :)

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Post by stutter » Sun Apr 01, 2007 9:36 pm

well, mine's on page 4, think the link still works, although I think the loop brace needs a little re-editing

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Sun Apr 01, 2007 11:12 pm

Yes! I'd disabled some of yours in the last revision as I was afraid they'd interfere with renaming/finding. I've since sorted that so I've re-enabled them.

Actually I just tried the clip brace thing and it works! Is that what you mean? The size of this thing gets confusing. Actually the last few big changes I made I had to stop working on this as it was causing me headaches!

My only problem now is remembering what everything does - I really need to do some sort of custom overlay as the label printer-ed labels I've done are starting to peel off...

It's late and I'm too thick to work my web 2.0 filehosting site. I'll throw up the files tomorrow. In the meantime I'll post it up here & edit it out when the file's up.

New features:
Better display when suspending the script.

Ctrl+r (rename) & Ctrl+f (find) temporarily suspend the script, on the basis that you want the keys to work as normal when typing. The script will be reactivated when it sees the next Enter press.

Ctrl+Shift+b (kept deliberately awkward on purpose), when Clip View is open and the clip brace is in view, highlights the Clip Brace Start marker so you can engage in clip brace fuckery. I actually thought this wasn't working but it now appears to be...

edit: Latest version here
Last edited by rozling on Mon Apr 02, 2007 2:23 pm, edited 2 times in total.

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Post by stutter » Mon Apr 02, 2007 10:48 am

Roslingm that looks interesting. Don't think I'd worry about the length too much, as different people will need different things - if they're all suitably commented then it should be possible for people to edit out the parts they are not interested in.
I think you should put at the top of the script which skin and what resolution you are using, since these will affect the imagesearch and the mouseclick commands in several places.
Like the smart-pausing for find and rename.
My clip-brace script all worked, and didn't tend to mess with anything else too much, although it helped if you understood what it was doing. Might be an idea for me to add a suspend function for that part of the script only. The reason I thought it needed editing was that it sometimes throws up an unnecessary "can't see icon" message, which I'd been too lazy to remove.

I've added a few more functions since that script, which I will try to comment and upload later today.

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Mon Apr 02, 2007 12:14 pm

Good point about the resolution/skin thing. I'm going to do up a proper readme soon to document this a bit more thoroughly.

Sorry just realised I hadn't credited you at the top :oops: - fixed! If I haven't credited anyone properly apologies & let me know.

Looking forward to seeing what else you've got! I have a suspicion that I'm only scratching the surface with AHK. It requires a certain amount of lateral thinking, which is why I like it!

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Mon Apr 02, 2007 2:22 pm

The latest version can be found here. Enjoy!

Patch
Posts: 2614
Joined: Sun Aug 15, 2004 8:14 pm
Location: Bristol, UK

Post by Patch » Mon May 14, 2007 12:13 pm

Bump.

rozling
Posts: 1760
Joined: Mon May 30, 2005 9:48 am
Location: Dublin, Ireland

Post by rozling » Mon May 14, 2007 12:17 pm

Aw feck don't remind me!

Post Reply