Ok I'm trying to get the hang of simple scripting but I don't know what I'm doing wrong.
I'm just trying to get simple volume control first and then work up from there and this is in my log:
---------------------------------------------------------------------------------------
5512 ms. RemoteScriptMessage: (MM1) Initialising...
5513 ms. RemoteScriptError: Traceback (most recent call last):
5513 ms. RemoteScriptError: File "MIDI Remote Scripts\MM1\__init__.py", line 6, in create_instance
5513 ms. RemoteScriptError:
5513 ms. RemoteScriptError: return MM1(c_instance)
5513 ms. RemoteScriptError: File "MIDI Remote Scripts\MM1\MM1.py", line 27, in __init__
5514 ms. RemoteScriptError:
5514 ms. RemoteScriptError: self._setup_mixer_control()
5514 ms. RemoteScriptError: File "MIDI Remote Scripts\MM1\MM1.py", line 32, in _setup_mixer_control
5514 ms. RemoteScriptError:
5514 ms. RemoteScriptError: mixer = MixerComponent(num_tracks, 0, with_eqs=False, with_filters=False) #(num_tracks, num_returns, with_eqs, with_filters)
5514 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_64_static\midi-remote-scripts\_Framework\MixerComponent.py", line 35, in __init__
5515 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_64_static\midi-remote-scripts\_Framework\CompoundComponent.py", line 16, in __init__
5515 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_64_static\midi-remote-scripts\_Framework\Dependency.py", line 123, in wrapper
5515 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_64_static\midi-remote-scripts\_Framework\Dependency.py", line 63, in get_dependency_for
5515 ms. RemoteScriptError: _Framework.Dependency
5515 ms. RemoteScriptError: .
5515 ms. RemoteScriptError: DependencyError
5516 ms. RemoteScriptError: :
5516 ms. RemoteScriptError: Required dependency register_component not provided for <_Framework.MixerComponent.MixerComponent object at 0x000000000B1143C8>
5516 ms. RemoteScriptError:
5516 ms. Exception: Script could not be loaded.
----------------------------------------------------------------------------------------------
Cobbled together code follows:
-----------------------------------------------------------
from __future__ import with_statement
import Live # This allows us (and the Framework methods) to use the Live API on occasion
from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller
from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a button a the controller
from _Framework.ChannelStripComponent import * # Class attaching to the mixer of a given track
from _Framework.EncoderElement import EncoderElement
from _Framework.CompoundComponent import CompoundComponent # Base class for classes encompasing other components to form complex components
from _Framework.ControlElement import ControlElement # Base class for all classes representing control elements on a controller
from _Framework.ControlSurface import ControlSurface # Central base class for scripts based on the new Framework
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent # Base class for all classes encapsulating functions in Live
from _Framework.InputControlElement import * # Base class for all classes representing control elements on a controller
from _Framework.MixerComponent import MixerComponent # Class encompassing several channel strips to form a mixer
from _Framework.SessionComponent import SessionComponent # Class encompassing several scene to cover a defined section of Live's session
from _Framework.SliderElement import SliderElement # Class representing a slider on the controller
from _Framework.CompoundComponent import CompoundComponent
CHANNEL = 4
num_tracks = 4
mixer = None
class MM1(ControlSurface):
def __init__(self, c_instance):
ControlSurface.__init__(self, c_instance)
self._setup_mixer_control()
def _setup_mixer_control(self):
is_momentary = True
global mixer # We want to instantiate the global mixer as a MixerComponent object (it was a global "None" type up until now...)
mixer = MixerComponent(num_tracks, 0, with_eqs=False, with_filters=False) #(num_tracks, num_returns, with_eqs, with_filters)
mixer.set_track_offset(0) #Sets start point for mixer strip (offset from left)
self.song().view.selected_track = mixer.channel_strip(0)._track
def _setup_mixer_control(self):
is_momentary = True
num_tracks = 4 #A mixer is one-dimensional; here we define the width in tracks - seven columns,
global mixer #We want to instantiate the global mixer as a MixerComponent object (it was a global "None" type up until now...)
mixer = MixerComponent(num_tracks, 0, with_eqs=False, with_filters=False) #(num_tracks, num_returns, with_eqs, with_filters)
mixer.set_track_offset(0) #Sets start point for mixer strip (offset from left)
self.song().view.selected_track = mixer.channel_strip(0)._track #set the selected strip to the first track, so that we don't, for example, try to assign a button to arm the master track, which would cause an assertion error
#"""set up the mixer buttons"""
#mixer.set_select_buttons(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 56),ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 54)) #left, right track select
#mixer.master_strip().set_select_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 94)) #jump to the master track
#mixer.selected_strip().set_mute_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 42)) #sets the mute ("activate") button
#mixer.selected_strip().set_solo_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 44)) #sets the solo button
#mixer.selected_strip().set_arm_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 46)) #sets the record arm button
#"""set up the mixer sliders"""
mixer.selected_strip().set_volume_control(SliderElement(MIDI_CC_TYPE, CHANNEL, 48)) #sets the continuous controller for volume
#"""note that we have split the mixer functions across two scripts, in order to have two session highlight boxes (one red, one yellow), so there are a few things which we are not doing here..."""
----------------------------------------------------------------------------------------------------
Scripting error question
-
reganjo1955
- Posts: 5
- Joined: Sun Apr 10, 2011 2:13 am
Re: Scripting error question
Greetings,
I too am new to MIDI remote script authoring. I started with what appeared as the simplest possible control surface based upon this example:
http://remotescripts.blogspot.com/2010/ ... asses.html
I get the same error as you. I wonder if you have solved this problem yet. I will be looking at this code again this weekend when I have more time to play around.
Here is the sample code and logs:
============================
__init__.py
============================
============================
Transport.py
============================
============================
Log.txt
============================
I too am new to MIDI remote script authoring. I started with what appeared as the simplest possible control surface based upon this example:
http://remotescripts.blogspot.com/2010/ ... asses.html
I get the same error as you. I wonder if you have solved this problem yet. I will be looking at this code again this weekend when I have more time to play around.
Here is the sample code and logs:
============================
__init__.py
============================
Code: Select all
# http://remotescripts.blogspot.com
from Transport import Transport
def create_instance(c_instance):
return Transport(c_instance)Transport.py
============================
Code: Select all
# http://remotescripts.blogspot.com
# This is a stripped-down script, which uses the Framework classes to assign MIDI notes to play, stop and record.
from _Framework.ControlSurface import ControlSurface # Central base class for scripts based on the new Framework
from _Framework.TransportComponent import TransportComponent # Class encapsulating all functions in Live's transport section
from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller
class Transport(ControlSurface):
def __init__(self, c_instance):
with self.component_guard():
ControlSurface.__init__(self, c_instance)
self._transport = TransportComponent() #Instantiate a Transport Component
self._transport.set_play_button(ButtonElement(True, 0, 0, 61)) #ButtonElement(is_momentary, msg_type, channel, identifier)
self._transport.set_stop_button(ButtonElement(True, 0, 0, 63))
self._transport.set_record_button(ButtonElement(True, 0, 0, 66))
Log.txt
============================
Code: Select all
213821 ms. RemoteScriptError: Traceback (most recent call last):
213823 ms. RemoteScriptError: File "MIDI Remote Scripts\AAA\__init__.py", line 6, in create_instance
213823 ms. RemoteScriptError:
213824 ms. RemoteScriptError: return Transport(c_instance)
213824 ms. RemoteScriptError: File "MIDI Remote Scripts\AAA\Transport.py", line 12, in __init__
213825 ms. RemoteScriptError:
213825 ms. RemoteScriptError: transport = TransportComponent() #Instantiate a Transport Component
213825 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_32_static\midi-remote-scripts\_Framework\TransportComponent.py", line 33, in __init__
213826 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_32_static\midi-remote-scripts\_Framework\CompoundComponent.py", line 16, in __init__
213827 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_32_static\midi-remote-scripts\_Framework\Dependency.py", line 123, in wrapper
213827 ms. RemoteScriptError: File "c:\Jenkins\live\Binary\Core_Release_32_static\midi-remote-scripts\_Framework\Dependency.py", line 63, in get_dependency_for
213828 ms. RemoteScriptError: _Framework.Dependency
213828 ms. RemoteScriptError: .
213828 ms. RemoteScriptError: DependencyError
213829 ms. RemoteScriptError: :
213829 ms. RemoteScriptError: Required dependency register_component not provided for <_Framework.TransportComponent.TransportComponent object at 0x4276F350>
213830 ms. RemoteScriptError:
213830 ms. Exception: Script could not be loaded.-
reganjo1955
- Posts: 5
- Joined: Sun Apr 10, 2011 2:13 am
Re: Scripting error question
Greetings,
I found the solution for my simple problem here on the ableton forum:
viewtopic.php?f=1&t=200513&start=0
I posted a question to that thread here:
viewtopic.php?p=1629556#p1629556
Here is what Raztua wrote
Hope that helps.
Kithara
I found the solution for my simple problem here on the ableton forum:
viewtopic.php?f=1&t=200513&start=0
I posted a question to that thread here:
viewtopic.php?p=1629556#p1629556
Here is what Raztua wrote
Code: Select all
from __future__ import with_statement #compatibility for Live 9, need to be written at the first line of the script
import Live #you import Live, in order to be able to use its components
from _Framework.ControlSurface import ControlSurface # importthe Controle surface module
class sparkLE2(ControlSurface): # create a class element
__module__=__name__ #name of the class
__doc__="Sparkle function" #documentation
def __init__(self, c_instance): #initialize the sparkLE2 class as a ControleSurface
ControlSurface.__init__(self,c_instance) #import the components of a ControlSurface
with self.component_guard(): #don't know the us of this, but it is recquiered in live 9 scripts
self.__c_instance = c_instance
Kithara
Re: Scripting error question
Hello,
I, like many others, have come down the remote scripting trail on the net (thanks to those who have done the de-compiles and discussions),
and arrived at this failure.
I am using Live 9.7.5.1 and trying the earlier info provided here, but
receiving the same error:
12281 ms. RemoteScriptMessage: (ProjectX) Initialising...
12282 ms. RemoteScriptMessage: (ProjectX) 06.12.2017 08:25:50--------------= ProjectX log opened =--------------
12292 ms. RemoteScriptError: Traceback (most recent call last):
12292 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/__init__.py", line 4, in create_instance
12292 ms. RemoteScriptError:
12292 ms. RemoteScriptError: return ProjectX(c_instance)
12293 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/Remote_Proj_X.py", line 51, in __init__
12293 ms. RemoteScriptError:
12293 ms. RemoteScriptError: self._setup_transport_control() # Run the transport setup part of the script
12293 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/Remote_Proj_X.py", line 68, in _setup_transport_control
12293 ms. RemoteScriptError:
12293 ms. RemoteScriptError: transport = TransportComponent() #Instantiate a Transport Component
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/TransportComponent.py", line 29, in __init__
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/CompoundComponent.py", line 12, in __init__
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Dependency.py", line 119, in wrapper
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Dependency.py", line 59, in get_dependency_for
12295 ms. RemoteScriptError: _Framework.Dependency
12295 ms. RemoteScriptError: .
12295 ms. RemoteScriptError: DependencyError
12295 ms. RemoteScriptError: :
12295 ms. RemoteScriptError: Required dependency register_component not provided for <_Framework.TransportComponent.TransportComponent object at 0x117294350>
12296 ms. RemoteScriptError:
12296 ms. Exception: Script could not be loaded.
Not showing all the import stuff, but the script starts with
from __future__ import with_statement #compatibility for Live 9, need to be written at the first line of the script
Here's the code up to the call to setup where I'm using TransportComponent
(It gets past the log message - as in log content above...)
class ProjectX(ControlSurface):
__module__ = __name__
__doc__ = " ProjectX - Novation reMOTE keyboard controller script "
def __init__(self, c_instance):
ControlSurface.__init__(self, c_instance)
with self.component_guard(): #don't know the us of this, but it is recquiered in live 9 scripts
self.__c_instance = c_instance
self.log_message(time.strftime("%d.%m.%Y %H:%M:%S", time.localtime()) + "--------------= ProjectX log opened =--------------")
# Writes message into Live's main log file. This is a ControlSurface method.
self._setup_transport_control() # Run the transport setup part of the script
Anyone know what's required w/the newer versions - like mentioned?
TIA
I, like many others, have come down the remote scripting trail on the net (thanks to those who have done the de-compiles and discussions),
and arrived at this failure.
I am using Live 9.7.5.1 and trying the earlier info provided here, but
12281 ms. RemoteScriptMessage: (ProjectX) Initialising...
12282 ms. RemoteScriptMessage: (ProjectX) 06.12.2017 08:25:50--------------= ProjectX log opened =--------------
12292 ms. RemoteScriptError: Traceback (most recent call last):
12292 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/__init__.py", line 4, in create_instance
12292 ms. RemoteScriptError:
12292 ms. RemoteScriptError: return ProjectX(c_instance)
12293 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/Remote_Proj_X.py", line 51, in __init__
12293 ms. RemoteScriptError:
12293 ms. RemoteScriptError: self._setup_transport_control() # Run the transport setup part of the script
12293 ms. RemoteScriptError: File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/RemoteProjX/Remote_Proj_X.py", line 68, in _setup_transport_control
12293 ms. RemoteScriptError:
12293 ms. RemoteScriptError: transport = TransportComponent() #Instantiate a Transport Component
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/TransportComponent.py", line 29, in __init__
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/CompoundComponent.py", line 12, in __init__
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Dependency.py", line 119, in wrapper
12294 ms. RemoteScriptError: File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Dependency.py", line 59, in get_dependency_for
12295 ms. RemoteScriptError: _Framework.Dependency
12295 ms. RemoteScriptError: .
12295 ms. RemoteScriptError: DependencyError
12295 ms. RemoteScriptError: :
12295 ms. RemoteScriptError: Required dependency register_component not provided for <_Framework.TransportComponent.TransportComponent object at 0x117294350>
12296 ms. RemoteScriptError:
12296 ms. Exception: Script could not be loaded.
Not showing all the import stuff, but the script starts with
from __future__ import with_statement #compatibility for Live 9, need to be written at the first line of the script
Here's the code up to the call to setup where I'm using TransportComponent
(It gets past the log message - as in log content above...)
class ProjectX(ControlSurface):
__module__ = __name__
__doc__ = " ProjectX - Novation reMOTE keyboard controller script "
def __init__(self, c_instance):
ControlSurface.__init__(self, c_instance)
with self.component_guard(): #don't know the us of this, but it is recquiered in live 9 scripts
self.__c_instance = c_instance
self.log_message(time.strftime("%d.%m.%Y %H:%M:%S", time.localtime()) + "--------------= ProjectX log opened =--------------")
# Writes message into Live's main log file. This is a ControlSurface method.
self._setup_transport_control() # Run the transport setup part of the script
TIA