Page 1 of 2

Creating "red box" scripts for clip launch in Live 9

Posted: Thu May 15, 2014 10:49 pm
by dengelman
Has anyone figured out a way to make generic scripts to launch clips/scenes in Live 9 using a moveable "red box" like Launchpad/APC40 etc?

I use a Twitch with Live which I have mapped perfectly for my performance needs.

In Live 8 I was able to use this to launch clips using the "modern.dj/app" script but this doesn't work in Live 9.

Have searched widely but haven't found any solution so far. Have resorted to packing my Launchpad which defeats the purpose of the simple, small setup with the Twitch...

Thanks for any pointers!

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Mon May 19, 2014 10:10 pm
by dengelman
Anyone?

I know there a few very talented script programmers here, so any advice most appreciated.

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Mon May 19, 2014 10:57 pm
by clydesdale
viewtopic.php?f=35&t=203117

This was just posted today and looked pretty handy. Not sure if it's the kind of thing you're looking for.

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Wed May 21, 2014 12:45 am
by dengelman
Thanks but that script is for navigation once you *have* a red box (that is, for Launchpad, APC40, Push users).
I'm after a control surface script that creates a red box and gives control over clip launch and navigation for non-supported controllers (I use a Twitch)

Any as to whether anyone has cracked this for Live 9?
Cheers!

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Wed May 21, 2014 7:45 am
by TomViolenz
I haven't heard of one.
Try to look into the code for the scripts that have a red box for how it's done. You'll have to de-compile them first though.

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Wed May 21, 2014 12:06 pm
by S4racen
Julien Bayle has decompyled these already, i don't know of anyone bar Stray who has successfully done it, and at that most external scripts break at each new release....

Cheers
D

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Thu May 22, 2014 10:56 pm
by dengelman
OK thanks for clarifying S4racen

If none of you clever python programmers can solve it I will just have to give up for now...

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Fri May 23, 2014 9:27 am
by dna598
Interesting subject cos I was looking for that app, and saw that the creator has packed it all in and is all pissed off with the world. Presumably cos (disclaimer: speculation) ableton told him to stop making their product better and giving users the functionality they need for their own hardware etc etc....
I could do with that app for my qunexus. It seems the only answer is to become a python coder. Lol. Come on Ableton, let it all out!

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Sat Dec 13, 2014 12:09 pm
by bobavenger
you don't need to be a python programmer to make a simple session script, here:
just install Notepad++ (or an other program to edit .py files)

create a folder sim_ses in the MIDI Remote Scripts folder

create a __init__.py file with that inside:

Code: Select all

from sim_ses import sim_ses

def create_instance(c_instance):
    return sim_ses(c_instance)
then create a sim_ses.py file with that inside:

Code: Select all

from __future__ import with_statement
import Live
from _Framework.ControlSurface import ControlSurface
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent
from _Framework.InputControlElement import *
from _Framework.ButtonElement import ButtonElement
from _Framework.ButtonMatrixElement import ButtonMatrixElement
from _Framework.SessionComponent import SessionComponent

numTRA = 8		#number of tracks

numSCE = 4		#number of scenes

sesBUT = 48		#1st top/left button of your matrix

CHANNEL = 0		#main channel (0 - 15)

BUTTYP = MIDI_NOTE_TYPE

is_momentary = True

class sim_ses(ControlSurface):

	def __init__(self, c_instance):
		super(sim_ses, self).__init__(c_instance)
		with self.component_guard():
			self._setup_controls()
			self._setup_session()
			
	def _setup_controls(self):
		self._pads = [ButtonElement(is_momentary, BUTTYP, CHANNEL, sesBUT+index) for index in range(numTRA*numSCE)]
		self._grid = ButtonMatrixElement(rows=[self._pads[(index*numTRA):(index*numTRA)+numTRA] for index in range(numSCE)])
			
	def _setup_session(self):
		self._session = SessionComponent(numTRA, numSCE)
		self._session.set_clip_launch_buttons(self._grid)
		self.set_highlighting_session_component(self._session)
		self._session._link()

	def disconnect(self): 
		super(sim_ses, self).disconnect()
change the variables (numTRA,...) as you want
and you have your session script

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Sat Dec 13, 2014 2:38 pm
by dna598
very nice, will have a go!

Thanks bobavenger!

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Wed Jan 07, 2015 12:27 pm
by bobavenger
for a non linear list of buttons matrix, type it like this:

Code: Select all

sesBUT = [48, 49, 50, 51, 36, 37, 38, 39]
and then in _setup_controls,
instead of

Code: Select all

sesBUT+index
type

Code: Select all

sesBUT[index]

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Wed Jan 07, 2015 12:47 pm
by bobavenger
to add some function, follow those steps:

add variables with the number of your midi message:

Code: Select all

lefBUT = 57
rigBUT = 58
then in _setup_controls, create the buttons:

Code: Select all

self._lef_but = ButtonElement(is_momentary, BUTTYP, CHANNEL, lefBUT)
self._rig_but = ButtonElement(is_momentary, BUTTYP, CHANNEL, rigBUT)
and then, in _setup_session, assign the buttons to the functions

Code: Select all

self._session.set_page_left_button(self._lef_but)
self._session.set_page_right_button(self._rig_but)
that's all

to find other function to set, look at the SessionComponent.py in https://github.com/gluon/AbletonLive9_R ... _Framework
(there is some syntax errors in those decompyled file(due to python versions) so that's just for information)

and there is other component like mixer, transport,...
and the component of the push could be used too, but that's not so easy
if you want more, feel free to ask

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Mon Feb 02, 2015 9:08 am
by Bdumaguina
Good Sir, thank you for sharing this. It works. :)

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Tue Feb 10, 2015 11:40 am
by bobavenger
ok biped there is this error : modifitedSessionComponent
and the 2nd that looks strange for me is the order of the class (usually that's not important but here:
put class sim_ses first, then clipslot, then scene & finally session

and remove enable_skinning

Re: Creating "red box" scripts for clip launch in Live 9

Posted: Tue Feb 10, 2015 2:00 pm
by Bdumaguina
Thanks bobavenger, I see the "box" again. Although I'm still not getting MIDI data from Live for the empty clip slots and the non playing clip slot, will try to modify the script.