Easier Live Zooming & Scroll Mouse Zoom with AutoHotKey!

Discuss music production with Ableton Live.
Post Reply
nebulae
Posts: 15716
Joined: Tue Sep 07, 2004 12:16 am
Location: New Orleans
Contact:

Easier Live Zooming & Scroll Mouse Zoom with AutoHotKey!

Post by nebulae » Sat Dec 03, 2005 4:07 am

Too good to be true? Nay, I say!

Here's a summary of a very long post:
1. Go to www.AutoHotKey.com and install the program.
2. Go to www.chlorophyllworks.com/livescripts.zip and unpack the file.
3a. If you want to use the Scroll Wheel to zoom in Live, run the LiveScroll.ahk file. This allows you to hold down the Windows key and scroll zoom. There are a couple of caveats, so read below.
3b. If you want to use Alt+Z and Alt+A to zoom in and out, use the LiveZoom.ahk file. Again, read below for warnings.
4. For a slightly modified version of DJSynchro's script that allow easy toggling of the browser and the clip/track views with the Alt+1 and Alt+` keys, run LiveHotkeys.ahk.
5. DO NOT RUN 3a and 3b at the same time!
6. Scripting is fairly harmless and won't hurt your system, and if this doesn't work, just uninstall AutoHotKey from your machine. Conversely, if you like it, put shortcuts of the script files in your Startup folder.
7. Now read below for fun fun details.

I first learned about AutoHotKey today. For those of you that don't know, go to www.AutoHotKey.com immediately and download the free scripting tool for Windows for a myriad of kick-ass options!

After looking over the manual and talking with an experienced developer on their forum, I got some code that allows you to use the scroll wheel to zoom in Live. The tradeoff is that you have to use your Windows key as a modifier, and as long as the script is running, the Windows key does not. Basically, the script turns your Windows key (in between your Left Alt and your Left CTRL keys) into a Left Mouse Click.

I then tried a couple of other scripts in order to see if zooming could be made easier with key strokes, similar to Sonar. I also wanted to make sure I could zoom with just my left hand using combo keys. So I then created another script that uses Alt+Z to zoom in and Alt+A to zoom out in Arrange window, and Windows+Z to zoom in the Clip/Track view and Windows+A to zoom out. You can use the Alt zooming too, but it doesn't zoom at the cursor, which is critical for warp marker. My biggest issue was that I wanted to QUICKLY zoom in to set a warp marker and quickly zoom out without that long mouse movements. This works perfectly! Note, you have to be hovering over the clip so that the magnifying glass appears, or else your mouse will fly all over the place. So this isn't as ideal as the scroll wheel zoom for some. Also, note that this script and the one previous cannot run at the same time because both use the Windows modifier.

Finally, I modified djsynchro's great script that opens and closes the browser with the ALT+1 key by being able to toggle the Clip/Track view with ALT+`. I also removed a few lines specific to the Live image, as those were causing some minor issues for me. Generally, this works for me because I only use Live on my Lap-DAW. Those of you that want the fullproof script, check out http://www.ableton.com/forum/viewtopic.php?t=30369

I wish we didn't have to resort to this kind of ghetto solution for scrolling zoom, but until the Abes give us a good solution, we're on our own with scroll zooming.

Also Mac users...sorry guys, this post doesn't help you.

Send comments.

nebulae
Posts: 15716
Joined: Tue Sep 07, 2004 12:16 am
Location: New Orleans
Contact:

Post by nebulae » Sat Dec 03, 2005 7:28 am

I got an update from a code guru at the AutoHotKey.com forum. With this script, you can have access to the Windows key whenever Live is not the application in focus. I also added the Alt+Z and Alt+A for zooming in and out to this script.

http://www.chlorophyllworks.com/livescriptupdate.zip

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Sat Dec 03, 2005 3:13 pm

Yo Nebulae,
I tweaked my script several times already since you got it :D
See if the update works.

I think the best way to test to see if Live is running and the active window
is to use:

IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
which uses the window class

Using the " - Live 5" test will be true for any window that has that string in its title, being on the Internet on a page that is titled "Tips - Live 5" for example might make it true.

I updated the link in my original post
http://www.ableton.com/forum/viewtopic.php?t=30369 to the latest version and will keep doing that.
:D
Last edited by djsynchro on Sat Dec 03, 2005 3:53 pm, edited 1 time in total.

nebulae
Posts: 15716
Joined: Tue Sep 07, 2004 12:16 am
Location: New Orleans
Contact:

Post by nebulae » Sat Dec 03, 2005 3:28 pm

synchro, I did notice the updated script referencing the ahk_class. The performance seemed a little off to me because when I hit the hot buttons, there was some small flickering, probably because the script was checking to see if it was working on the correct application. For me, since I don't have other appz running on my DAW, I took out the Live-specific code. Like I said in my post, it's still a great idea for most everyone else, so keep up the good work.

Have you tried the code for scrolling? It's pretty cool...the gurus on their forum really know their shit.

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Sat Dec 03, 2005 6:45 pm

nebulae wrote: Have you tried the code for scrolling? It's pretty cool...the gurus on their forum really know their shit.
Well I tried it but you still have to hold the mouse over the scroll area?
So then while I'm there for me it's easier to just click and drag normally...
I always really liked how Live scrolls anyway.
But if that works better for you cool of course! :D

What I am going to try and do is make 4 shortcuts that drag the highlighted clip from the browser and insert it into track 1...4
(for Djing without a mouse)

That is going to be a cheesy one because the only way to know which clip is highlighted will be to scan the browser area for the highlight colour, meaning it wil be a skin-specific script, :? although it will be easy to modify it of course.

And, disable the spacebar of course...
:D

nebulae
Posts: 15716
Joined: Tue Sep 07, 2004 12:16 am
Location: New Orleans
Contact:

Post by nebulae » Sat Dec 03, 2005 8:08 pm

Good ideas to disable the space bar. Still can't believe there isn't an option for that and only that standalone application to disable it that someone wrote a couple of years ago.

As for the regular Ableton zoom, you're right, you still have to take the mouse there. For me, dragging down and back up to zoom into a small area to put in warp markers got REALLY tedious. I like hovering the mouse over the spot and then using my wheel...it takes far less time for me. Of couse, this option still allows the regular Live zoom method as well.

Anyways, keep at the scripting. And if you can make any improvements to your older scripts or feel like updating mine, go for it. That's what open source hacking is all about :)

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Sat Dec 03, 2005 10:08 pm

I will post all the shit I make in a thread compiled and ready to go, but if you can't wait to disable your spacebar this is the script:


Space::Return


That's it! makes the spacebar a hotkey, and when you press it does nothing.
:)

nebulae
Posts: 15716
Joined: Tue Sep 07, 2004 12:16 am
Location: New Orleans
Contact:

Post by nebulae » Sat Dec 03, 2005 11:27 pm

Right on, sounds good. I'll set up that script as a performance only seperate script. Although you should be able to use your code so that the space button only disables in Live.

Also, if you create a forum where you capture everything, can you please put my scripts on there as well? Thanks.

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Sun Dec 04, 2005 12:33 am

nebulae wrote: Also, if you create a forum where you capture everything, can you please put my scripts on there as well? Thanks.
Yeah man everybody can post their scripts in there!

OK it took me all day but the script to drag clips out of the browser is taking shape, you select a clip in the browser with the arrow keys, press one of three hotkeys and it drags the clip to the track, your "deck".

What I'm trying to do is the bare essentials:
Drop clips in 1 of 3 decks, EQ on every channel, hotkeys to: Select track with focus on waveform, Select track with focus on devices. Zoom wave.
Spacebar disabled.

So for straightforward DJing you then don't need the mouse for ANYTHING. (faders & EQs will be on a MIDI controller of course).

Programming is a pain in the ass! Definitely not what I was meant to do in this life, makes me respect the wizards @ Ableton even more... :D

To be continued...

Scratch-D
Posts: 46
Joined: Wed Aug 31, 2005 5:59 pm
Location: Florida, USA (Home of electro BASS)
Contact:

Post by Scratch-D » Fri Dec 09, 2005 6:25 pm

YOU FUCKING ROCK!!!!!!!!!!!!!!!!!!!



geesh for the love of GOD!


my prayers are answered!

YaY!


:twisted:

dizaster
Posts: 27
Joined: Fri Oct 28, 2005 1:22 pm

Post by dizaster » Fri Dec 09, 2005 6:43 pm

hope i'm not being thick, but i'm trying to gather enough knowledge together to build myself a decent controller for live. i am looking for a solution like you guys did, but controlled by midi. That way i can build arrow keys and other hotkeys into the mixer/controller and never have a mouse or even use the keyboard.
Any ideas?

Diz

Angstrom
Posts: 14923
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Post by Angstrom » Fri Dec 09, 2005 7:15 pm

why not get a usb keyboard (IE a pc keyboard not a musical one) and hack the controller, connect the terminals to big cheap buttons. You can buy the controllers too if you like things slightly less Mad-Max than me!

the benefits: cheap, funky looking, easier than midibox, USB, you can use these cool hotkey scripts.

try this thread for how to do it.
http://www.ableton.com/forum/viewtopic.php?t=17370

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Fri Dec 09, 2005 7:56 pm

Update on my script to drop clips from the browser into tracks for DJing:

Pain in the arse! Sometimes it works, sometimes it doesn't so there need to be pauses in the script to make it work slow enough, so Live knows something has been selected etc.

Someone showed me a trackball, might be a better alternative for the mouse for DJing/live performance? More later!

:D

dizaster
Posts: 27
Joined: Fri Oct 28, 2005 1:22 pm

Post by dizaster » Sat Dec 10, 2005 2:30 pm

guys, thanks, both good points.
I had actually thought about building a trackball into a midibox controller
maybe i can also do somethign with a keyboard, just use a few a part of it, and try and get 2 seperate usb connectors between the midibox and hotkey station.

See the problem is i can't get midi to select browser'plugins'etc..
thsi would ultimatley be the simplest solution, but looks like we'll have to wait for the abe's to sort it out. till then, i'm gonan get ripping a keyboard up.

adios hombres
Diz

Post Reply