How to : use midi remote script Major Update (sparkle)
-
- Posts: 8913
- Joined: Thu Apr 22, 2010 5:50 pm
Re: How to : use midi remote script Major Update (sparkle)
Hey man, congrats on all the house/marriage/weather combo:). Perfect time for an Ableton vacation
-
- Posts: 5
- Joined: Sun Apr 10, 2011 2:13 am
Re: How to : use midi remote script Major Update (sparkle)
I was pulling my hair out until I found this post. Thanks so much.
the key takeaway for me was:
I kept getting dependency errors until I did this.
A couple of questions
you show:
I don't see any packages or modules with that name in the MIDI Remote Scripts directoy. Is this defined inside the Ableton / Python runtime? How and when do you use it. I see one short mention in your text but not in code. I will look more deeply and expect to find all the API in the LOM.
You also show
Did this have a purpose? When I exclude this nothing breaks (yet).
I will continue reading the thread for more solutions. This has definitely made my day.
Kithara
the key takeaway for me was:
Code: Select all
from __future__ import with_statement
A couple of questions
you show:
Code: Select all
import Live
You also show
Code: Select all
__module__ = __name__
I will continue reading the thread for more solutions. This has definitely made my day.
Kithara
Re: How to : use midi remote script Major Update (sparkle)
This is not about the function add_value_listener is's about the concept of "callbacks".akamed wrote:I have one question about the "add_value_listener" function.
When I assign this:
self.Pad1.add_value_listener(self.button1,identify_sender= False)
It calls "button1" that is "def button1(self, value): ...." and works great.
But if I want to do this:
self.Pad1.add_value_listener(self.button1(99),identify_sender= False)
If you write "button1" you give add_value_listener the function "buton1" as the first parameter. If you append the braces (no matter if something is in it or not), you give add_value_listener the value wich is returned by button1 as the first parameter.
You need the function partial from functools
At the top of the file isert this
Code: Select all
from functools import partial
Code: Select all
self.Pad1.add_value_listener(partial(self.button1, 99))
Here is an other solution without partial which is easy to understand.
Code: Select all
def func(self):
self.button1(99)
Code: Select all
self.Pad1.add_value_listener(self.func)
Re: How to : use midi remote script Major Update (sparkle)
Working on this at the moment., well at leaf the 24 Knobs controlling the parameters of the blue handed device...ttilberg wrote:That looks really helpful!
The two things that I feel would be awesome with my BCR2000:
1) Context aware synth control for more than 8 parameters, without having to shuffle pages.
i.e.: With Operator selected (blue-hand style), I can have the 24 main nobs controlling the 24 parameters I find most helpful. With Analog selected, they are different. And ideally, a way to do the same for VSTs, perhaps through config routing and saving a rack with it in there. This seems so damned straightforward in pseudo code, but I just couldn't make the right connections.
The choice of parroters can be achieved with the ubermap project i believe....
Cheers
D
Re: How to : use midi remote script Major Update (sparkle)
Eureka! You just need to create a New Live Set (Ctrl+N) :)Raztua wrote:I didn't talked about this, because sometimes it works, and sometime it doesn't work.shadx312 wrote:Thanks for sharing, very cool.
I don't think you need to open and close Live everytime you want to re-actualise the script.
Try unselecting the script in the preferences, like 'none', and then reselect the script.
That might re-actualise it.
So sometime your correct a mistake, reload the script, but everithing isnt reloaded, and you this your correction is false.
If you restart each time, even if it is Damn Boring, Your are sure that the script is refreshed.
Re: How to : use midi remote script Major Update (sparkle)
Hi guys, I have a problem I try to fix since 2 weeks now and I can't get over it. May be somebody can help me ?
I've done a script which give me a red box for my launchpad. Actually, I use the set_track_bank_buttons to navigate but I would love to be able to move 8track by 8 track (to fit my launchpad with full new track) my redbox. My first idea was to use the offset fonction but it can't go over 4 track offset (0,1,2,3 then the all the value make no difference and are taken like 0 offset). Do you have some idea to make this work ?
Thanks a lot and sorry for my bad english !
I've done a script which give me a red box for my launchpad. Actually, I use the set_track_bank_buttons to navigate but I would love to be able to move 8track by 8 track (to fit my launchpad with full new track) my redbox. My first idea was to use the offset fonction but it can't go over 4 track offset (0,1,2,3 then the all the value make no difference and are taken like 0 offset). Do you have some idea to make this work ?
Thanks a lot and sorry for my bad english !
Re: How to : use midi remote script Major Update (sparkle)
hi all,
Soal,
I am not sure to understand what you want, but ill try to explained what i have understood fro your post and how to solve it:
you whave a 8*8 pad matrix on your launchpad,
what you want is:
-to be able to launch the 8 clips from the 8 first track,
-to be able by pressing a button to launch the 8 clips from de 9 to the 16 tracks etc etc...
with i think the light on the pad button light when the clip is present and get it sprkling when the track is playing.
I dont have a launchpad so ill try to explain a way to do this, but it can't give you the exact solution
but before ill need a few informations:
What is your version of live?
Did you start your script from scratch?
Can you post you script on gitub or something like that for a easier understanding of what you have done
JuSchu,
Why do you want not to identify sender??
S4racen,
The easiest way to do this would be an easy to implement trick:
You have to add a listener on the selected track
then you just depending on the track selected modify the midi channel associated with to this CC
and then by hand (in live) you link the cc with the correct channel to you vst parameter
cldt,
Soal,
I am not sure to understand what you want, but ill try to explained what i have understood fro your post and how to solve it:
you whave a 8*8 pad matrix on your launchpad,
what you want is:
-to be able to launch the 8 clips from the 8 first track,
-to be able by pressing a button to launch the 8 clips from de 9 to the 16 tracks etc etc...
with i think the light on the pad button light when the clip is present and get it sprkling when the track is playing.
I dont have a launchpad so ill try to explain a way to do this, but it can't give you the exact solution
but before ill need a few informations:
What is your version of live?
Did you start your script from scratch?
Can you post you script on gitub or something like that for a easier understanding of what you have done
JuSchu,
Why do you want not to identify sender??
S4racen,
The easiest way to do this would be an easy to implement trick:
You have to add a listener on the selected track
then you just depending on the track selected modify the midi channel associated with to this CC
and then by hand (in live) you link the cc with the correct channel to you vst parameter
cldt,
Re: How to : use midi remote script Major Update (sparkle)
Hi, thanks a lot for your answer. I managed how to get over my problem but a new one happen. I use rebuild_midi_map() on my script and it works great but I have a color issue. When I assigne a parameter in live to a pad the color is either Amber(on) or Amber Blinking(off). How can I change that ? I tried:
for track_index in range(8):
for scene_index in range(8):
self._matrix.get_button(track_index, scene_index).set_on_off_values(127, LED_OFF)
But it doesn't seems to work.
Sorry for my bad english. And thanks again for your Help !
PS: My version of live is 9.1
for track_index in range(8):
for scene_index in range(8):
self._matrix.get_button(track_index, scene_index).set_on_off_values(127, LED_OFF)
But it doesn't seems to work.
Sorry for my bad english. And thanks again for your Help !
PS: My version of live is 9.1
Re: How to : use midi remote script Major Update (sparkle)
hi,
what s the value of LED_OFF.
For whats i see from official script it seems to be 4.
is that right ?
what s the value of LED_OFF.
For whats i see from official script it seems to be 4.
is that right ?
Re: How to : use midi remote script Major Update (sparkle)
It's ok I find the solution to my problem !
Juste one question: in your script for the sparkle, in step sequencer mode, if you add a note directly in ableton is there still a feedback on the sparkle ? Or is the feedback only in sparkle=>ableton direction ?
Thanks !
Juste one question: in your script for the sparkle, in step sequencer mode, if you add a note directly in ableton is there still a feedback on the sparkle ? Or is the feedback only in sparkle=>ableton direction ?
Thanks !
Re: How to : use midi remote script Major Update (sparkle)
hi,
it works in both directions:
For the live -> Spark update check this part of the script:
it gets an array for the 64 beat ( 4 beats for 16 mesures) for one pitch. then i just update leds according to the boolean value of Self.cache.
Have you ever checked th launchpad95 Script ?
Might help you to script the launchpad
it works in both directions:
For the live -> Spark update check this part of the script:
Code: Select all
def update_cache(self):
if self.actual_clipslot!=None and self.actual_clipslot.clip!=None :
note_tuple=self.actual_clipslot.clip.get_notes(0.0,note_pitch,self.actual_clipslot.clip.length,1)
self.cache=64*[False]
if len(note_tuple)>0:
for tuple in note_tuple:
self.cache[int(4*tuple[1])]=True
Have you ever checked th launchpad95 Script ?
Might help you to script the launchpad
Re: How to : use midi remote script Major Update (sparkle)
Yep ! thanks a lot I succeed doing my own step sequencer for my launchpad but I still have a problem
if I write:
index = -2
for scene_index in range(2):
for track_index in range(8):
index = index + 2
self._matrix.get_button(track_index, scene_index).add_value_listener(partial(self.navigation_fonction, index))
How can I then remove this ? I try with:
for scene_index in range(2):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).remove_value_listener(self.navigation_fonction, index)
But it doesn't work
I also try this:
index = -2
for scene_index in range(2):
for track_index in range(8):
index = index + 2
self._matrix.get_button(track_index, scene_index).remove_value_listener(partial(self.navigation_fonction, index))
But it doesn't work too
Can you help me with this ? it will be so great !
if I write:
index = -2
for scene_index in range(2):
for track_index in range(8):
index = index + 2
self._matrix.get_button(track_index, scene_index).add_value_listener(partial(self.navigation_fonction, index))
How can I then remove this ? I try with:
for scene_index in range(2):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).remove_value_listener(self.navigation_fonction, index)
But it doesn't work
I also try this:
index = -2
for scene_index in range(2):
for track_index in range(8):
index = index + 2
self._matrix.get_button(track_index, scene_index).remove_value_listener(partial(self.navigation_fonction, index))
But it doesn't work too
Can you help me with this ? it will be so great !
Re: How to : use midi remote script Major Update (sparkle)
ps: this is the function:
def navigation_fonction(self, index, value):
self._half_bar_position = index
self.update_notes()
def navigation_fonction(self, index, value):
self._half_bar_position = index
self.update_notes()
Re: How to : use midi remote script Major Update (sparkle)
hi soal,
good luck with the script then,
try this:
good luck with the script then,
try this:
for scene_index in range(2):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).clear_value_listeners()
Re: How to : use midi remote script Major Update (sparkle)
Thanks so much it works.
Just a last question: I try to get 2 feedback on the metronome of ableton. The first feedback is a beat/pad
and my code is something like this:
def auto_update_playhead(self):
clip = self.clip
self.update_second_playhead()
if not clip.playing_position_has_listener(self.auto_update_playhead):
clip.add_playing_position_listener(self.auto_update_playhead)
if self._index > 0:
self._index = -1
self._index = self._index + 1
self._index_position[self._index] = int(clip.playing_position)
if self._index_position[self._index] != self._index_position[self._index - 1]:
self.update_first_playhead()
It works well even if it looks dirty hahaha
But the problem is my second feedback I want it to be a quarter-beat/pad: so, to light 8 pad each 2 beat.
My problem is that the function add_playing_position_listener is not accurate and set a trigger each 1/16 beat (so it's to fast) i want it to be (1/4). I could try to make a function to slow it like the other code but the trigger doesn't look to be accurate enough to works. Here is an idea of what I get in 4 bar without the int:
I just did a simple function with add_playin_position in trigger and clip.playing_position in log:
=======================
51320 ms. RemoteScriptMessage: (Launchpad) ================ 0.0564625478688 =================
51388 ms. RemoteScriptMessage: (Launchpad) ================= 0.156462547869 =================
51439 ms. RemoteScriptMessage: (Launchpad) ================= 0.256462547869 =================
51499 ms. RemoteScriptMessage: (Launchpad) ================= 0.356462547869 =================
51568 ms. RemoteScriptMessage: (Launchpad) ================= 0.556462547869 =================
51628 ms. RemoteScriptMessage: (Launchpad) ================= 0.656462547869 =================
51679 ms. RemoteScriptMessage: (Launchpad) ================= 0.756462547869 =================
51738 ms. RemoteScriptMessage: (Launchpad) ================= 0.856462547869 =================
51789 ms. RemoteScriptMessage: (Launchpad) ================= 0.956462547869 =================
51868 ms. RemoteScriptMessage: (Launchpad) ================= 1.05646254787 ==================
51928 ms. RemoteScriptMessage: (Launchpad) ================= 1.15646254787 ==================
51978 ms. RemoteScriptMessage: (Launchpad) ================= 1.35646254787 ==================
52029 ms. RemoteScriptMessage: (Launchpad) ================= 1.45646254787 ==================
52089 ms. RemoteScriptMessage: (Launchpad) ================= 1.55646254787 ==================
52149 ms. RemoteScriptMessage: (Launchpad) ================= 1.65646254787 ==================
52208 ms. RemoteScriptMessage: (Launchpad) ================= 1.85646254787 ==================
52328 ms. RemoteScriptMessage: (Launchpad) ================= 2.05646254787 ==================
52388 ms. RemoteScriptMessage: (Launchpad) ================= 2.15646254787 ==================
52448 ms. RemoteScriptMessage: (Launchpad) ================= 2.25646254787 ==================
52509 ms. RemoteScriptMessage: (Launchpad) ================= 2.35646254787 ==================
52569 ms. RemoteScriptMessage: (Launchpad) ================= 2.45646254787 ==================
52629 ms. RemoteScriptMessage: (Launchpad) ================= 2.55646254787 ==================
52689 ms. RemoteScriptMessage: (Launchpad) ================= 2.75646254787 ==================
52718 ms. RemoteScriptMessage: (Launchpad) ================= 2.85646254787 ==================
52798 ms. RemoteScriptMessage: (Launchpad) ================= 2.95646254787 ==================
52848 ms. RemoteScriptMessage: (Launchpad) ================= 3.05646254787 ==================
52899 ms. RemoteScriptMessage: (Launchpad) ================= 3.15646254787 ==================
52959 ms. RemoteScriptMessage: (Launchpad) ================= 3.35646254787 ==================
53039 ms. RemoteScriptMessage: (Launchpad) ================= 3.45646254787 ==================
53069 ms. RemoteScriptMessage: (Launchpad) ================= 3.55646254787 ==================
53149 ms. RemoteScriptMessage: (Launchpad) ================= 3.65646254787 ==================
53198 ms. RemoteScriptMessage: (Launchpad) ================= 3.75646254787 ==================
53258 ms. RemoteScriptMessage: (Launchpad) ================= 3.85646254787 ==================
53309 ms. RemoteScriptMessage: (Launchpad) ====================== 0.0
We can see that it doesn't look nice. Some time it send more than 8 trig in a bar. Do you have an idea to solve this problem ?
Thanks a lot !
Just a last question: I try to get 2 feedback on the metronome of ableton. The first feedback is a beat/pad
and my code is something like this:
def auto_update_playhead(self):
clip = self.clip
self.update_second_playhead()
if not clip.playing_position_has_listener(self.auto_update_playhead):
clip.add_playing_position_listener(self.auto_update_playhead)
if self._index > 0:
self._index = -1
self._index = self._index + 1
self._index_position[self._index] = int(clip.playing_position)
if self._index_position[self._index] != self._index_position[self._index - 1]:
self.update_first_playhead()
It works well even if it looks dirty hahaha
But the problem is my second feedback I want it to be a quarter-beat/pad: so, to light 8 pad each 2 beat.
My problem is that the function add_playing_position_listener is not accurate and set a trigger each 1/16 beat (so it's to fast) i want it to be (1/4). I could try to make a function to slow it like the other code but the trigger doesn't look to be accurate enough to works. Here is an idea of what I get in 4 bar without the int:
I just did a simple function with add_playin_position in trigger and clip.playing_position in log:
=======================
51320 ms. RemoteScriptMessage: (Launchpad) ================ 0.0564625478688 =================
51388 ms. RemoteScriptMessage: (Launchpad) ================= 0.156462547869 =================
51439 ms. RemoteScriptMessage: (Launchpad) ================= 0.256462547869 =================
51499 ms. RemoteScriptMessage: (Launchpad) ================= 0.356462547869 =================
51568 ms. RemoteScriptMessage: (Launchpad) ================= 0.556462547869 =================
51628 ms. RemoteScriptMessage: (Launchpad) ================= 0.656462547869 =================
51679 ms. RemoteScriptMessage: (Launchpad) ================= 0.756462547869 =================
51738 ms. RemoteScriptMessage: (Launchpad) ================= 0.856462547869 =================
51789 ms. RemoteScriptMessage: (Launchpad) ================= 0.956462547869 =================
51868 ms. RemoteScriptMessage: (Launchpad) ================= 1.05646254787 ==================
51928 ms. RemoteScriptMessage: (Launchpad) ================= 1.15646254787 ==================
51978 ms. RemoteScriptMessage: (Launchpad) ================= 1.35646254787 ==================
52029 ms. RemoteScriptMessage: (Launchpad) ================= 1.45646254787 ==================
52089 ms. RemoteScriptMessage: (Launchpad) ================= 1.55646254787 ==================
52149 ms. RemoteScriptMessage: (Launchpad) ================= 1.65646254787 ==================
52208 ms. RemoteScriptMessage: (Launchpad) ================= 1.85646254787 ==================
52328 ms. RemoteScriptMessage: (Launchpad) ================= 2.05646254787 ==================
52388 ms. RemoteScriptMessage: (Launchpad) ================= 2.15646254787 ==================
52448 ms. RemoteScriptMessage: (Launchpad) ================= 2.25646254787 ==================
52509 ms. RemoteScriptMessage: (Launchpad) ================= 2.35646254787 ==================
52569 ms. RemoteScriptMessage: (Launchpad) ================= 2.45646254787 ==================
52629 ms. RemoteScriptMessage: (Launchpad) ================= 2.55646254787 ==================
52689 ms. RemoteScriptMessage: (Launchpad) ================= 2.75646254787 ==================
52718 ms. RemoteScriptMessage: (Launchpad) ================= 2.85646254787 ==================
52798 ms. RemoteScriptMessage: (Launchpad) ================= 2.95646254787 ==================
52848 ms. RemoteScriptMessage: (Launchpad) ================= 3.05646254787 ==================
52899 ms. RemoteScriptMessage: (Launchpad) ================= 3.15646254787 ==================
52959 ms. RemoteScriptMessage: (Launchpad) ================= 3.35646254787 ==================
53039 ms. RemoteScriptMessage: (Launchpad) ================= 3.45646254787 ==================
53069 ms. RemoteScriptMessage: (Launchpad) ================= 3.55646254787 ==================
53149 ms. RemoteScriptMessage: (Launchpad) ================= 3.65646254787 ==================
53198 ms. RemoteScriptMessage: (Launchpad) ================= 3.75646254787 ==================
53258 ms. RemoteScriptMessage: (Launchpad) ================= 3.85646254787 ==================
53309 ms. RemoteScriptMessage: (Launchpad) ====================== 0.0
We can see that it doesn't look nice. Some time it send more than 8 trig in a bar. Do you have an idea to solve this problem ?
Thanks a lot !