Jump multiple scenes with foot controller

Discuss music production with Ableton Live.
Post Reply
Kalle_S
Posts: 8
Joined: Mon Nov 20, 2006 7:31 pm
Location: Stockholm, Sweden

Jump multiple scenes with foot controller

Post by Kalle_S » Tue Jan 10, 2017 11:34 pm

I'm using a quite extensive Audio Effects rack with the Line 6 Pod Farm plug in for my guitar set up. I control this with the sturdy Line 6 FBV Shortboard Mk 2 via USB. Due to the layout of the pedal it is limited to 4 amp patches per song(usually more than enough).I have a red box/grid script of 4 scenes with dummy clips to control the chain selector in the rack. The dummy clips need to be stacked and can not be in the same scene as the use different values of the same CC. The stomp pedals, wahs ect, are blue-handed to the user controller.txt. This works really good. :D I've mapped the red box/grid to the bank up/bank down buttons on the FBV. Each time i press the bank buttons the red box jumps 4 scenes and I can trigger a different combination of dummy clips for amps with the pedal.

Unfortunately I'm not good at Python and I have not managed to get the scene highlight to follow the grid, neither have I figured out how to map a button to launch the first scene in the grid.

I want to launch the first scene in the red box, with tempo change, each time i press the bank buttons.
Does anyone know how to do that or is there a way to add +4 scenes to the scene up/scene down arrows so it jumps 4 scenes each time I press the bank buttons?
It does not seem possible to use both the script and midi mapping the scene up/down arrows to the the bank buttons though. :(


Any ideas or suggestion for an elegant work around? :roll:

yur2die4
Posts: 7333
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Jump multiple scenes with foot controller

Post by yur2die4 » Wed Jan 11, 2017 12:22 am

You said you are using a highlighted section for clip-launching? Are you also able to use the uppermost scene of the highlighted area?

The only weird issue is even if you trigger that, the trigger for that would always be that first row.

This is why there would be a second one for triggering the 'highlighted' scene. And settings set to 'select next scene after launch'.

So then you would go down 4. Trigger the uppermost row. Then the one below it would become highlighted.

I'm not 100% positive this would work though.

Also, not to confuse your scripts even further but have you looked into Clyphx? It usually has solutions for everything for some crazy reason.

yur2die4
Posts: 7333
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Jump multiple scenes with foot controller

Post by yur2die4 » Wed Jan 11, 2017 12:39 am

Ehhhhhh, just looked into both of these and neither will do the trick. Hmm

Edit: I can make it select any clip in a channel with Clyphx, which causes a row to be selected.

If I could make it select the master channel afterwards, then I'd be mostly in luck.

No wait. Actually, if i select that scene, then I use the 'scene launch' midi mapped button and it does select next scene.

Kalle_S
Posts: 8
Joined: Mon Nov 20, 2006 7:31 pm
Location: Stockholm, Sweden

Re: Jump multiple scenes with foot controller

Post by Kalle_S » Wed Jan 11, 2017 8:16 am

I'm using the highlighted red box/grid for clip launching but the scene highlight does not follow, meaning no I'm not able to use the uppermost scene of the highlighted red box/grid. I can not access the highlighted red box/grid of the master section to launch scenes. That would have done the trick otherwise. I can easily make the highlight box any size and map the clips slots to any CC. As the FBV only have 12 something buttons I need to fill in "dummy" CC values for the slots in the grid I don't want to use. I 've stumbled on some conflicts when entering a "dummy" CC thats been midi mapped previously. It seems the Live set remembers the mapping of a previously deleted device even though it does not show in the midi map.

I've had a look at Clyphx and I could possibly make tempo change clips to use instead of scenes. However the ClyphX use the Userconfiguration.txt that I use to blue hand some of the buttons on the FBV. It is possible to paste my code into the ClyphX Userconfiguration.txt but that seems too complex and I have not tried it.

I like to keep things as simple and tidy as possible so I don't have to re-map everything when choosing a blank Live set.

yur2die4
Posts: 7333
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Jump multiple scenes with foot controller

Post by yur2die4 » Wed Jan 11, 2017 8:58 am

Is there a way to do the set without the red box?

Also, Clyphx allows you to do commands by creating blank clips with names that are commands.

Clyphx knows to listen when your clip's name begins with an ID (squared brackets). After, you type the command and the parameters of the command.

An example would be the ID (those brackets) and then 'set 1', or 'ID set 5'. If you were to in any way trigger the set 1 clip. Your scene cursor would change to scene 1. If you were to trigger the set 5 clip, your scene cursor would jump to highlight scene 5.

That's the basic concept of what you can do for automatically choosing scenes. Which can then be triggered, which would then go through consecutive scenes.

I think I'm missing a lot of details. I'm trying to think of a way to leave your clips accessible without requiring the red box, and how to consistently be able to 'page up and page down' without having a box and without placing clyphx clips on the same row as your performance clips which would obviously send your highlighter all over the place.

Kalle_S
Posts: 8
Joined: Mon Nov 20, 2006 7:31 pm
Location: Stockholm, Sweden

Re: Jump multiple scenes with foot controller

Post by Kalle_S » Wed Jan 11, 2017 9:49 am

Everything would be solved if there was an easy way for relative mapping. I'm sure it's possible to modify the red box script or build a device in M4L but the threshold is quite high and I'd rather focus on making music. I've already spent too many hours peeking into various .py files, copy, pasting modifying, testing. :?

I'm slightly reluctant to ClyphX and the highlighter all over the place. Seems too many things that can go wrong in a live situation.

aratunes
Posts: 76
Joined: Thu Oct 10, 2013 7:17 pm

Re: Jump multiple scenes with foot controller

Post by aratunes » Thu Jan 12, 2017 2:24 am

Have you looked into Follow by Isotonik Studios?

It highlights several scenes ahead so I can trigger that one with my foot (after clips in three or four scenes use regular follow actions to rotate through)
Ara

Kalle_S
Posts: 8
Joined: Mon Nov 20, 2006 7:31 pm
Location: Stockholm, Sweden

Re: Jump multiple scenes with foot controller

Post by Kalle_S » Sat Jan 14, 2017 9:23 am

I downloaded Follow. It seems to be a very good tool. I can't really get how to scroll between songs though. It would be very nice if the text/song title and bpm from the Master Scene clip was visible in the window. Guess that could be achieved by triggering dummy clips to control a text/lyrics window.

I'd like to get the remote script working though. The following code works for jumping 4 scenes, or as many scenes you'd like, and triggering the clips in the redbox. The A, B, C, D buttons on my FBV are mapped to CC 30, 31, 32, 33, as I'm only triggering dummy clips in track 2. The rest of the CC in the index are not in use but could be mapped if you have some kind of launch pad. I'm also only using 2 tracks to make things easier during coding trial but once the code is working , any number of tracks can be mapped.

I can't figure out what to code to trigger the scenes though.

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 FBV_1(ControlSurface):

   def __init__(self, c_instance):
      super(FBV_1, 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(FBV_1, self).disconnect()
The script is modified from a script originally written by bobavenger on this forum some years ago.

Kalle_S
Posts: 8
Joined: Mon Nov 20, 2006 7:31 pm
Location: Stockholm, Sweden

Re: Jump multiple scenes with foot controller

Post by Kalle_S » Sat Jan 14, 2017 10:51 pm

I found a more elegant solution to stick the red box to the Line 6 FBV Shortboard. Now it launches the clips in the grid and the highlighted scene. Still haven't figured out how to get the master/scene to follow the red box.

Code: Select all

# FBV Shortboard Mk II, Karl J Samuelsson, January 2017
#  Original Authors:
#    Sarah Howe  [email protected]
#    Alex Molina
#
#-----------------------------------------------

from __future__ import with_statement

import Live #Now the Live API is available

from _Framework.ButtonElement import ButtonElement
from _Framework.ClipSlotComponent import ClipSlotComponent
from _Framework.CompoundComponent import CompoundComponent
from _Framework.ControlElement import ControlElement
from _Framework.ControlSurface import ControlSurface
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent
from _Framework.InputControlElement import *
from _Framework.SceneComponent import SceneComponent
from _Framework.SessionComponent import SessionComponent
from _Framework.SessionZoomingComponent import SessionZoomingComponent
from _Framework.SliderElement import SliderElement
from _Framework.EncoderElement import EncoderElement
from _Framework.DeviceComponent import DeviceComponent

#define global variables
CHANNEL = 0  #channels are numbered 0 - 15
CC_CHANNEL = 0
is_momentary = True

class FBV_6(ControlSurface):
  __module__ = __name__
  __doc__ = "FBV Shortboard Mk II Simple Clip Launching controller script"

  def __init__(self, c_instance):
    ControlSurface.__init__(self, c_instance)
    with self.component_guard():
      self._setup_session()
      self.set_highlighting_session_component(self.session)

  def _setup_session(self):
    num_tracks = 4 #one column (track)
    num_scenes = 4 #eight rows, which will be mapped to eight CC

    #(num_tracks, num_scenes) a session highlight ("red box") will appear with any two non-zero values
    self.session = SessionComponent(num_tracks,num_scenes)

    self.session.set_page_up_button(ButtonElement(is_momentary,MIDI_CC_TYPE,CHANNEL,35))
    self.session.set_page_down_button(ButtonElement(is_momentary,MIDI_CC_TYPE,CHANNEL,34))

    self.session.selected_scene().set_launch_button(ButtonElement(is_momentary, MIDI_CC_TYPE, CHANNEL, 19))
    self.session.set_stop_all_clips_button(ButtonElement(is_momentary, MIDI_CC_TYPE, CHANNEL, 26))

    #for row in range(num_scenes):
    #  for col in range(num_tracks):
    #    self.session.scene(row).clip_slot(col).set_started_value(127)
    #    self.session.scene(row).clip_slot(col).set_stopped_value(0)

    #here we set up the clip launch assignments for the session
    clip_launch_notes = [30, 48, 49, 106, 31, 98, 51, 110, 32, 105, 107, 108, 33, 109, 111, 112]
    index = 0
    for scenes in range(num_scenes):
    	for tracks in range(num_tracks):
	      #step through scenes and assign a note to first slot of each
	      self.session.scene(scenes).clip_slot(tracks).set_started_value(127)
	      self.session.scene(scenes).clip_slot(tracks).set_stopped_value(0)
	      self.session.scene(scenes).clip_slot(tracks).set_launch_button(ButtonElement(is_momentary,MIDI_CC_TYPE,CC_CHANNEL,clip_launch_notes[index]))
	      index += 1

def disconnect(self):
  #clean things up on disconnect


  ControlSurface.disconnect(self)
  return None
The code probably import many things not needed since it's originally for a Quneo.

nedmech
Posts: 8
Joined: Wed Jan 18, 2017 7:55 pm

Re: Jump multiple scenes with foot controller

Post by nedmech » Thu Jan 26, 2017 11:28 pm

I don't know if it's any help to you, but I've been working on a script that may do what you're looking for. I borrowed heavily from bobavenger's code, as well as Selected_Track_Control, but ended up with something that mapping could be easily modified (like Selected_Track_Control), but still has the linked red box control elements.

Check this out and let me know if it's helpful:
viewtopic.php?f=4&t=224860
https://github.com/nedmech/LinkedNavControl

It could probably be pretty easily modified to do what you want, or feel free to borrow bits as needed. The bits for setting the selected scene may be of most interest to you from what I'm gathering.

Post Reply