Control selected track \w keyboard shortcuts

Share your favorite Ableton Live tips, tricks, and techniques.
wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Thu Mar 15, 2012 9:01 pm

AJ, thank you very much for your donation!
Also great to hear it is working good for you. Good tip regarding selecting the first track with the Softstep. Might come in hands for some here on the forum.

Zac Kyoti
Posts: 4
Joined: Fri Mar 11, 2011 1:15 am

Re: Control selected track \w keyboard shortcuts

Post by Zac Kyoti » Thu May 24, 2012 8:26 am

wiffbi, this is really solid work man! I love how you've structured everything, and the comments and examples are extremely helpful. Your set of scripts have really broken down some of the more confusing aspects, and have been a killer learning tool. I do have a couple questions though:

1) Am I correct in assuming there is no midi feedback at this point, ie for displays and leds?

2) When comparing your script with the standard user config file, I've noticed that a given device control knob sometimes controls different parameters, even with no "best of bank" specified in yours. For example, with the Auto Filter device, your script will assign the first knob to filter type, while the user script will assign the first knob to frequency. Why is this? What would I do to modify it?

3) Can I simply delete the DeviceControl script and use the UserConfiguration.txt to get feedback to my controller without breaking anything in your script?

Thanks again for your hard work and generosity!

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Thu May 24, 2012 9:15 am

@Zac Kyoti: thanks, you are welcome!
Zac Kyoti wrote:1) Am I correct in assuming there is no midi feedback at this point, ie for displays and leds?
Yes, currently there is no support for MIDI feedback. This is due to the history of how STC started as a simple Control Surface for relative MIDI CCs (i.e. encoders). As time permits, I might look further into it, but in the near future I do not think I will/can add MIDI feedback. I thought of porting STC over to the _Framework-classes, but these have other (though minor) limitations, so maybe a mix will do …

Zac Kyoti wrote:2) When comparing your script with the standard user config file, I've noticed that a given device control knob sometimes controls different parameters, even with no "best of bank" specified in yours. For example, with the Auto Filter device, your script will assign the first knob to filter type, while the user script will assign the first knob to frequency. Why is this? What would I do to modify it?
If no "best of"-bank is provided, STC just maps to the controls in the order they are provided by the API. The behavior you describe suggests, that when using UserConfiguration.txt a certain kind of "best-of" order of parameters for each device is applied – and that order is different than the default one provided by the API.

To change the behavior of STC, you could add a "device_bestof" to settings. In settings.py, look at line 136 and following. You do not need to define best-of for every device and you do not need to define a device’s every parameter. STC takes your bestof-parameters of the device (if at all defined) and binds them in the order you provided. After that it binds the rest of the available parameters of the selected device. BUT: it will be a lot of work to find out which parameter-index-number is which parameter on each device. And as it seems UserConfiguration.txt is better at handling that, I get to your last question:

Zac Kyoti wrote:3) Can I simply delete the DeviceControl script and use the UserConfiguration.txt to get feedback to my controller without breaking anything in your script?
No, you cannot delete the DeviceControl.py (or pyc); that will break the script! But you can deactivate device-control in settings.py. Look at line 363 up to line 391 in settings.py – either delete those lines or better: put a # at the beginning of each line, that will comment out each line and effectively deactivate device-control.


I hope this helps. Let me know, if you have questions.

clive_damagedgoods
Posts: 17
Joined: Sat Sep 03, 2011 3:23 am

Re: Control selected track \w keyboard shortcuts

Post by clive_damagedgoods » Sat Jun 09, 2012 8:17 am

Hi Wiffbi,

I came across your script by accident whilst researching controller mappings and its really going to save me a lot of headaches. I'm just getting into the meat and potatoes of it now and I'll be combining it with Hanz Petrov's APC_64_40 remote script and Bomes MT Pro. Using APC40, SLMkII and Stanton SCS.3sys to control Ableton, Traktor, Kontakt, dblue Glitch and a few other little toys. Using note mode on the APC to route commands through Bomes to your script is going to be redefining "epic".

Should mention the documentation PDF linked on the site isn't up to date as it fails to mention Fold/Unfold and X-Fader assignments to name but a few. Small point but worth mentioning.

Thanks for your efforts and for sharing this with the community. A donation will find its way to you once I've sucked off the bank manager for another month ;)

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Sat Jun 09, 2012 9:46 am

@clive: Thanks for your kind feedback and pointing out the outdated PDF. I won't have access to my dev computer for the next weeks, but I will try to update it ASAP. Thanks again and have fun with your setup (it definitely sounds like lots of fun)!

clive_damagedgoods
Posts: 17
Joined: Sat Sep 03, 2011 3:23 am

Re: Control selected track \w keyboard shortcuts

Post by clive_damagedgoods » Sun Jun 10, 2012 1:55 pm

@wiffbi: Oh yes it definitely is. One hell of a learning curve too.

On that note I do remember seeing something on your site regarding keyboard shortcut mappings for Windows. If something like that is still required I could put it together in Bomes for use with the free version of MIDI Translator. Just a thought.

Proj3ktDharma
Posts: 22
Joined: Thu Feb 17, 2011 5:00 pm

Re: Control selected track \w keyboard shortcuts

Post by Proj3ktDharma » Sat Sep 15, 2012 5:42 pm

Hello,

I run Ableton 8.2.3

I am trying to configure my BCF2000.

I made a custom script using the framework to connect everything I can using it( mainly everything that map to a DeviceParameter)

Now I try to map the others functionnality using SelectedTrackControl. I add CC(50,ABSOLUTE,10) to the setting and configure a button accordingly on my BCF.

But it looks like it is never mapped, as the script never receive any Midi. (i set a log in receive_midi).

Anyone could help me?

Thank you!

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Sun Sep 16, 2012 4:45 pm

Proj3ktDharma wrote: I made a custom script using the framework to connect everything I can using it( mainly everything that map to a DeviceParameter)

Now I try to map the others functionnality using SelectedTrackControl. I add CC(50,ABSOLUTE,10) to the setting and configure a button accordingly on my BCF.

But it looks like it is never mapped, as the script never receive any Midi. (i set a log in receive_midi).
So as far as I understand you have two MIDI Remote Scripts for one physical MIDI input (the BCF2000). As far as I can remember, this does not work. Or at least, I could not get it to work. It might have something to do with "connect_script_instances" but I could not find any documentation on how it works … One thing you might try, to at least verify, that your script based on STC is working and receiving MIDI, is to deactivate all other Remote Scripts for the BFC2000 in Live’s Preferences.

I hope, this helps a bit.
Richard

moonpie
Posts: 305
Joined: Mon Aug 30, 2010 11:22 am

Re: Control selected track \w keyboard shortcuts

Post by moonpie » Mon Sep 17, 2012 10:56 pm

Hi, would it ever be possible to provide a "continuous" fast forward/rewind? That is, I could hold down a button to move through the arrangement until it receives an "off" value - exactly like the left/right buttons on a computer keyboard? Right now it just moves 1 beat at a time. So youve to click alot to get anywhere.


Thanks for your wonderful effort!

EDIT: Oh wait - Im an idiot. Ive answered 2 of my other questions already and removed them.I read the settings.py file! Looks pretty easy to change. Its actually amazing that youve organised things so easy to read. All the other scripts are a headache trying understand whats going on to the lay observer.

I take it if I increase the "default scrub ticks" that will do what I want?



There is a bug with "rewind" - it fast forwards by 30.


Would it be possible for a "hard stop" function - ableton has a built in panic/stop midi feature with 3 clicks of stop - so it is kind of necessary now and again! :)
Last edited by moonpie on Tue Sep 18, 2012 12:52 am, edited 1 time in total.

moonpie
Posts: 305
Joined: Mon Aug 30, 2010 11:22 am

Re: Control selected track \w keyboard shortcuts

Post by moonpie » Tue Sep 18, 2012 12:50 am

.

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Tue Sep 18, 2012 8:26 am

moonpie wrote:Hi, would it ever be possible to provide a "continuous" fast forward/rewind? That is, I could hold down a button to move through the arrangement until it receives an "off" value - exactly like the left/right buttons on a computer keyboard? Right now it just moves 1 beat at a time. So youve to click alot to get anywhere.
I wanted to do this inside the MIDI Remote Script, but AFAIK it is not possible, as there is no way to escape the main event loop – which is what you would need for timed/repeated events without blocking everything else. That is why I had to move that functionality into Kimidi (the accompanying keyboard-shortcuts app to STC) itself. For better scrolling inside the arrangement, I’d recommend an encoder (endless knob). If you really need to use a button (note on/off) for this, you could try a MIDI tweaking utility like MIDIPipe and Applescript (sorry, OS X only) to translate your note on into a repeated note on for scrolling – I am not sure though, whether that is actually possible.
moonpie wrote: Thanks for your wonderful effort!

EDIT: Oh wait - Im an idiot. Ive answered 2 of my other questions already and removed them.I read the settings.py file! Looks pretty easy to change. Its actually amazing that youve organised things so easy to read. All the other scripts are a headache trying understand whats going on to the lay observer.
Thanks!
moonpie wrote: I take it if I increase the "default scrub ticks" that will do what I want?
Hm, it won’t do the repeated scrubbing until you release with Note off. It will only increase the step size for one scrub event.
moonpie wrote: There is a bug with "rewind" - it fast forwards by 30.
I will look into this, I haven’t used scrubbing much lately. What is the value you set scrub_increment to? If it is to big (>63), then it will turn things around and scrubbing forward actually scrubs backwards and vice versa.
moonpie wrote: Would it be possible for a "hard stop" function - ableton has a built in panic/stop midi feature with 3 clicks of stop - so it is kind of necessary now and again! :)
The API does not mention such functionality. I did not even know Live had this feature. I assume you tried hitting stop 3 times via the Remote Control surface and it did not do, what you wanted … Implementing a MIDI panic button inside the Remote Script would be possible in theory (note off for all keys), but would not work, as the Remote Script can only send MIDI on its assigned MIDI out and not on all MIDI out – so not really a panic button.

I will look into the rewind issue you are having and let you know.
Cheers, Richard

Emerah
Posts: 42
Joined: Wed Apr 02, 2008 1:18 pm
Location: Cairo

Re: Control selected track \w keyboard shortcuts

Post by Emerah » Tue Sep 18, 2012 10:32 am

Hi wiffbi

here is the code from the framework transport module:

ffwd:

self.song().current_song_time += 1
if self._ffwd_button.is_momentary():
if (self._ffwd_button_pressed is not (value != 0)):
self._ffwd_button_pressed = (value != 0)
if (not self._rwd_button_pressed):
if self._ffwd_button_pressed:
self._register_timer_callback(self._on_timer)
else:
self._unregister_timer_callback(self._on_timer)


rwd:

self.song().current_song_time = max(0, (self.song().current_song_time - 1))
if self._rwd_button.is_momentary():
if (self._rwd_button_pressed is not (value != 0)):
self._rwd_button_pressed = (value != 0)
if (not self._ffwd_button_pressed):
if self._rwd_button_pressed:
self._register_timer_callback(self._on_timer)
else:
self._unregister_timer_callback(self._on_timer)

and here is the on_timer():

def _on_timer(self):
if ((not self._ffwd_button_pressed) or (not self._rwd_button_pressed)):
if self._ffwd_button_pressed:
self.song().current_song_time += 1
elif self._rwd_button_pressed:
self.song().current_song_time = max(0, (self.song().current_song_time - 1))


coud be helpful if you decide to add them to STC.
it never ends. neither does it begin where you think it does. its only in your mind.

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Control selected track \w keyboard shortcuts

Post by wiffbi » Tue Sep 18, 2012 11:01 am

@Emerah: wow, that is great! I downloaded the framework-Classes and had a look – it seems to be some "magic" function, as the ControlSurfaceComponent-class, where this functionality is inherited from, just defines it as a static method. So I assume Live itself handles this timer/callback/whatever. I will definitely have a play with this to find out how it actually works. Awesome, thanks for pointing this out!

Emerah
Posts: 42
Joined: Wed Apr 02, 2008 1:18 pm
Location: Cairo

Re: Control selected track \w keyboard shortcuts

Post by Emerah » Tue Sep 18, 2012 1:50 pm

u r welcome man. thank 'you' for this great script.
it never ends. neither does it begin where you think it does. its only in your mind.

moonpie
Posts: 305
Joined: Mon Aug 30, 2010 11:22 am

Re: Control selected track \w keyboard shortcuts

Post by moonpie » Tue Sep 18, 2012 2:22 pm

Ahhhh! Ive no idea what you guys are saying but Im excited!

So Emerah has a theory how to achieve the fast forward/rewind thing...? That would be amazing! Thanks Emerah!

Hopefully you can figure it out wiffbi! I spent last night setting up the commands on my korg nano. Piece of cake! Definitely the most fully functioning script Ive tried.


Just so you know - I think theres one function in the settings that isnt on your midi implementation table - "toggle track collapsed" - for disclosing group tracks.
Also - toggle track fold works much better as a note than a cc.




The current scrub tick size is at its default value - I think 4.




With STOP control - the problem is that all the stop functions available in the script are bi-functional. You cant "repeat" hit stop, as clicking it again will only start it playing again.

Unless Im missing a basic, single function stop command in the settings?

It seems to work in other scripts - how they achieve it I wouldnt know. Namely nanoKontrol Myr.

In Ableton, one click of STOP results in transport pausing, 2 clicks the transport returns to 1.1.1 and 3 clicks is the panic function.




Is there a way to map the master volume in this script?





Again - the script is brilliant - I thought initially I might have had to combine this script with another to get full functionality but this script goes above and beyond with how much I thought you could achieve with just a controller. And with alot less buttons than other scripts. Thanks for taking the time to reply! Ill have to post my script mod for the nano kontrol and the midi template for people here, once I settle on the layout.

Post Reply