Page 2 of 2
Re: Creating "red box" scripts for clip launch in Live 9
Posted: Tue Feb 10, 2015 6:56 pm
by bobavenger
put some value here:
non playing clip slot:
self._stopped_value = 0
empty clip slots:
self._record_button_value = None
Re: Creating "red box" scripts for clip launch in Live 9
Posted: Sun Jan 08, 2017 11:03 pm
by Kalle_S
Wonderful and simple script. I'm trying to use it with my Line 6 FBV Shortboard MkII to trigger dummy clips for four different guitar patches for each song(scene).
Problem is that I can't get the box to move up and down. Ideally it should move together with the scene selection. Is there a code to make it follow the scenes or a code to map it to the same CC as I'm using for scene selection?
Re: Creating "red box" scripts for clip launch in Live 9
Posted: Mon Jan 09, 2017 3:38 pm
by Kalle_S
OK got it to move.
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 = 2 #number of tracks
numSCE = 4 #number of scenes
sesBUT = [48, 30, 49, 31, 50, 32, 51, 33] #1st top/left button of your matrix
upBUT = 34
dowBUT = 35
CHANNEL = 0 #main channel (0 - 15)
BUTTYP = MIDI_CC_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)])
self._up_but = ButtonElement(is_momentary, BUTTYP, CHANNEL, upBUT)
self._dow_but = ButtonElement(is_momentary, BUTTYP, CHANNEL, dowBUT)
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.set_page_up_button(self._up_but)
self._session.set_page_down_button(self._dow_but)
self._session._link()
def disconnect(self):
super(sim_ses, self).disconnect()
Still trying to figure out how to make the scene follow the red box. As per now the red box jumps four scenes per klick. That is perfect but I'd like the highlighted scene to follow the box so it could launch the tempo for the new song(scene) etc. Any one how knows how?
Re: Creating "red box" scripts for clip launch in Live 9
Posted: Sun Aug 09, 2020 10:40 am
by bobavenger
sorry for the late answer, maybe useless but
just add those lines to your script and the session box will follow the selected scene
Code: Select all
def _on_selected_scene_changed(self):
super(sim_ses, self)._on_selected_scene_changed()
i=list(self.song().scenes).index(self.song().view.selected_scene)
if i<self._session.scene_offset():
self._session._scene_offset=i
self._session.notify_offset()
elif i-4>self._session.scene_offset():
self._session._scene_offset=i-4
self._session.notify_offset()
Re: Creating "red box" scripts for clip launch in Live 9
Posted: Sun Aug 09, 2020 10:51 am
by bobavenger
I'm trying to figure out how to provide LED feedback - I understand how my controller receives midi data for its LEDs, but I'm not so clear on how to integrate that in the python script, specifically when it comes to providing launchpad-style session clip status feedback.
I'm not sure to understand what you're asking, but maybe you just have to enable skinning in your session component, like here:
Code: Select all
self._session = SessionComponent(numTRA, numSCE,enable_skinning = True)
after that, if your controller have different colors, you can handle it also with your script