How to : use midi remote script Major Update (sparkle)
Re: How to : use midi remote script Major Update (sparkle)
Awesome post! There can never be enough post on making MIDI remote scripts. Keep up the good work!
Re: How to : use midi remote script Major Update (sparkle)
Wow i have checked the price of the BCR 2000.... occasion for 70 euros.ttilberg wrote:That looks really helpful!
Honestly, I lost interest in hacking Live about 6 months ago after running up against so many walls of things that didn't work. In part because I was learning .py along with it, and in part because the documentation is so scattered. With these new resources, my interest has sort of been re-perked at figuring it out.
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.
2) I always thought it would be cool to make an 808/909 style sequencer out of it -- it has 16 lights you can use, and you could map the knobs to different common drum-hit parameters like decay, etc. I have some drum racks that I've saved that would work really great, but I don't have enough control over the mapping interface to make it all work, and be contextually aware. This is where your SparkLE project piqued my interest most of all.
I think a friend of mine will buy this surface and i will script it for him.
That would be crazy to have a stepsequencer for this price.
Re: How to : use midi remote script Major Update (sparkle)
Raz, if you do, I would really appreciate you documenting your journey some more, sharing source, etc.
Thanks for your contributions!
Thanks for your contributions!
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
Re: How to : use midi remote script Major Update (sparkle)
ttilberg wrote:Raz, if you do, I would really appreciate you documenting your journey some more, sharing source, etc.
Thanks for your contributions!
It will be done if i find a way to get it.
By the way did you try to modify the code the way i told you ?
Re: How to : use midi remote script Major Update (sparkle)
I spent some time tweaking the code to install the Live Telnet script, and started working on getting the code hooked up for BCR, but didn't get very far. I was actually messing with the BCR again this past weekend (fixing some internal hardware issues) and was going to start writing code again today, which is why I thought to come back and check this thread lol.
Programming the BCR to accept the sparkle mapping shouldn't be tricky, but I'm wanting to try writing the stuff using it's factory presets, so that other BCR2000 scripts work as well. On the factory preset, the first page is all strictly CC messages for every control. I imagine that should work out just as well, just needing to alter all of the definitions in the script you wrote.
I'll let you know if I come up with anything cool as well.
Programming the BCR to accept the sparkle mapping shouldn't be tricky, but I'm wanting to try writing the stuff using it's factory presets, so that other BCR2000 scripts work as well. On the factory preset, the first page is all strictly CC messages for every control. I imagine that should work out just as well, just needing to alter all of the definitions in the script you wrote.
I'll let you know if I come up with anything cool as well.
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
-
- Posts: 1051
- Joined: Mon Oct 15, 2012 1:34 am
Re: How to : use midi remote script Major Update (sparkle)
Really happy to see someone posting information about this stuff on the forums! Learning how to make simple MIDI remote scripts is way more difficult than it needs to be, glad to see people talking about it!
The LiveUtils.py file, written by Rob King in that LiveTelnet package you posted, has been invaluable for me to understand the syntax needed to access Live's API. I'm currently working on a version of LiveUtils that includes ALL the commands that I know how to use, with good documentation to explain how to use them. I'm pretty much just pulling from the Live Object Model, located here: http://cycling74.com/docs/max6/dynamic/ ... ject_model
... so if you know of any other resources let me know!!
The scripts I've written look a lot different from yours, so I'm interested to dive deeper. For the most part, I write a bunch of 'if MIDI message received is X, make Live do Y', which really just serves to avoid MIDI mapping and to control Live directly with my controllers. It also gives my controllers more functionality and improves my workflow.
The LiveUtils.py file, written by Rob King in that LiveTelnet package you posted, has been invaluable for me to understand the syntax needed to access Live's API. I'm currently working on a version of LiveUtils that includes ALL the commands that I know how to use, with good documentation to explain how to use them. I'm pretty much just pulling from the Live Object Model, located here: http://cycling74.com/docs/max6/dynamic/ ... ject_model
... so if you know of any other resources let me know!!
The scripts I've written look a lot different from yours, so I'm interested to dive deeper. For the most part, I write a bunch of 'if MIDI message received is X, make Live do Y', which really just serves to avoid MIDI mapping and to control Live directly with my controllers. It also gives my controllers more functionality and improves my workflow.
Re: How to : use midi remote script Major Update (sparkle)
Ill help you with your research as much as i can : wewill try to modify the sparkle script to work with the presets of the BCRttilberg wrote:I spent some time tweaking the code to install the Live Telnet script, and started working on getting the code hooked up for BCR, but didn't get very far. I was actually messing with the BCR again this past weekend (fixing some internal hardware issues) and was going to start writing code again today, which is why I thought to come back and check this thread lol.
Programming the BCR to accept the sparkle mapping shouldn't be tricky, but I'm wanting to try writing the stuff using it's factory presets, so that other BCR2000 scripts work as well. On the factory preset, the first page is all strictly CC messages for every control. I imagine that should work out just as well, just needing to alter all of the definitions in the script you wrote.
I'll let you know if I come up with anything cool as well.
in the const.pyfile you can find this :
Code: Select all
#button map
REC=24
STOP=25
PLAY=26
TRANSPORT_BUTTONS=(('REC',REC),
('STOP',STOP),
('PLAY',PLAY))
SELECT=20
BUTTON_18_916=21
MUTE=22
SOLO=23
SELECT_BUTTONS=(('SELECT',SELECT),
('BUTTON_18_916',BUTTON_18_916))
LOW=35
MEDIUM=34
HIGH=33
VOLUME_BUTTONS=(('LOW',LOW,35),
('MEDIUM',MEDIUM,64),
('HIGH',HIGH,127))
BANK=16
PATT=17
SEQ=18
TUNE=19
MODE_BUTTONS=(('BANK',BANK),
('PATT',PATT),
('SEQ',SEQ),
('TUNE',TUNE))
PATTERN_LENGTH_BUTTON=(('LESS',36),
('MORE',37))
PATTERN_BUTTONS=range(0,16)
PAD_BUTTONS=range(60,68)
PAD_LEDS=range(68,76)
Code: Select all
PAD_BUTTONS=range(60,68)
PAD_LEDS=range(68,76) // you have to find how you light the leds
Code: Select all
BANK=16
PATT=17
SEQ=18
TUNE=19
on the Patternbutton.py try to change :
Code: Select all
def bank_button_value(self,value):
if value>0:
if self.parent.actual_clipslot!=None:
for element in self.parent.pattern_buttons :
self.turn_led_off(element.identifier)
self.turn_led_on(self.identifier)
self.parent.song().scenes[self.identifier].fire()
Code: Select all
def bank_button_value(self,value):
if value>0:
self.status=True
for element in self.parent.pattern_buttons :
self.turn_led_off(element.identifier)
self.turn_led_on(self.identifier)
self.parent.actual_pad=self
self.parent.update_cache()
self.parent.update_pattern_button()
self.parent.update_led()
This might work
If i find the time i will try to write a little code that will work from scratch, even if i still don't have the BCR
------------------------------------------------------------------------------------------------------------------------
I m glad to see poeple still trying to manage to use midiremotescript.infernal.machine wrote:Really happy to see someone posting information about this stuff on the forums! Learning how to make simple MIDI remote scripts is way more difficult than it needs to be, glad to see people talking about it!
Have you tried to use the telnet script? it is an unvaluable ressource.
Code: Select all
The LiveUtils.py file, written by Rob King in that LiveTelnet package you posted, has been invaluable for me to understand the syntax needed to access Live's API. I'm currently working on a version of LiveUtils that includes ALL the commands that I know how to use, with good documentation to explain how to use them. I'm pretty much just pulling from the Live Object Model, located here: http://cycling74.com/docs/max6/dynamic/c74_docs.html#live_object_model
... so if you know of any other resources let me know!!
This is usefull when you try to use a script with fuctonsthat have been changed.
http://www.synnack.com/blog/post/137/
Moreover you can check this:
http://julienbayle.net/PythonLiveAPI_do ... ive9.1.xml
This is a part of the HUGE work made by Julien Bayle
and here another from hanz petrov
remotescripts.blogspot.fr/
Code: Select all
The scripts I've written look a lot different from yours, so I'm interested to dive deeper. For the most part, I write a bunch of 'if MIDI message received is X, make Live do Y', which really just serves to avoid MIDI mapping and to control Live directly with my controllers. It also gives my controllers more functionality and improves my workflow.
Code: Select all
def update_pattern_button(self):
if self.actual_mode_button==self.mode_buttons[0]:
for element in self.pattern_buttons:
self.turn_led_off(element.identifier)
element.clear_value_listeners()
element.add_value_listener(element.bank_button_value, identify_sender= False)
elif self.actual_mode_button==self.mode_buttons[1]:
for element in self.pattern_buttons:
self.turn_led_off(element.identifier)
element.clear_value_listeners()
element.add_value_listener(element.pattern_button_value, identify_sender= False)
if self.actual_clipslot!=None:
self.turn_led_on(self.actual_clipslot.identifier)
elif self.actual_mode_button==self.mode_buttons[2]:
self.update_cache()
for element in self.pattern_buttons:
element.sparkle_sequencer_update()
element.clear_value_listeners()
element.add_value_listener(element.seq_button_value, identify_sender= False)
By the way i have not worked on the automapping. Could you give me information ( for exemple are you able to link a fader to cutoff in a case and main volume in another case??)
Can you tell me for what hardware you are working on ???
Re: How to : use midi remote script Major Update (sparkle)
Hey Raz,
Tonight I tried to get the BCR-808 going, but I couldn't make things rocking.
I tried following your suggestions, but started getting lost when talking about the PAT, SEQ, TUNE, BANK stuff.
Specifically, the parts of the code that you were recommending changing:
def bank_button_value():
do not appear in the source I downloaded. As I am not totally clear what all of the different buttons and options are supposed to do in the first place, I'm not able to carry on debugging it.
I'm going to continue to try and poke at this. My first goal is to just get the 16 button lights to light up in time with the song position. I think that in itself would be kind of cool., and a good start.
I also don't understand how in your basic "light an led" code:
Tonight I tried to get the BCR-808 going, but I couldn't make things rocking.
I tried following your suggestions, but started getting lost when talking about the PAT, SEQ, TUNE, BANK stuff.
Specifically, the parts of the code that you were recommending changing:
def bank_button_value():
do not appear in the source I downloaded. As I am not totally clear what all of the different buttons and options are supposed to do in the first place, I'm not able to carry on debugging it.
I'm going to continue to try and poke at this. My first goal is to just get the 16 button lights to light up in time with the song position. I think that in itself would be kind of cool., and a good start.
I also don't understand how in your basic "light an led" code:
Any of the values (60, 61) end up representing a control of 50? Is this just a typo?d)Practical example:
The aim of this example is to create a script that will light the pad 51 and write on the log file "HelloWorld" when the pad 50 is pressed
Code:
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
from _Framework.ButtonElement import ButtonElement
from _Framework.InputControlElement import *
IS_MOMENTARY=True
class sparkLE2(ControlSurface):
__module__=__name__
__doc__="Sparkle function"
def __init__(self, c_instance):
ControlSurface.__init__(self,c_instance)
with self.component_guard():
self.__c_instance = c_instance
self.show_message('Script initiated')
self.Pad1=ButtonElement(IS_MOMENTARY, MIDI_NOTE_TYPE, 0,60) # identifies P&d1 as a ButtonElement. IS_MOMENTARY is true if the button send a message on being released
self.Pad1.add_value_listener(self.helloworld,identify_sender= False) #adda value listener that will lauch the method self.helloworld when Pad1 is pressed
def disconnect(self): #this function is automatically called by live when the program is closed
self.turn_off_led(60)
self.turn_lef_off(61)
def helloworld(self,value):
if value>0: #value>0 when the pad is pressed
self.log_message(self,'hello world')
self.turn_led_on(61)
else:
self.turn_led_off(61)
def turn_led_on(self,value):
self._send_midi((144,value,64))
def turn_led_off(self,value):
self._send_midi((128,value,64))
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
Re: How to : use midi remote script Major Update (sparkle)
Woops, this is a mistake, because i used for my exemple thevalue 51, and for the sparkle the first pad was the 60 ( and the second 61 instead of 51)...Any of the values (60, 61) end up representing a control of 50? Is this just a typo?
i change my code
to have the light lighting following the beat, you can find some inspiration with the _light_follows_beat fuction present in the main file ( sparkle*.py)
wich version of the sparkle did you downloaded? it doesn't seems to be the latest, and many mistakes have been modified.I tried following your suggestions, but started getting lost when talking about the PAT, SEQ, TUNE, BANK stuff.
Specifically, the parts of the code that you were recommending changing:
def bank_button_value():
do not appear in the source I downloaded. As I am not totally clear what all of the different buttons and options are supposed to do in the first place, I'm not able to carry on debugging it.
I suggest you to check the latest, not to learn mistake by reading the code
Re: How to : use midi remote script Major Update (sparkle)
I thought I was using version 3.2, but I found the code you were referencing in version 1.3?
It would be cool if you could edit your first post with the current source code
It would be cool if you could edit your first post with the current source code
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
Re: How to : use midi remote script Major Update (sparkle)
well that's right i have changed the way i was labelling my script.
Sorry if it has made confusion.
Sorry if it has made confusion.
Re: How to : use midi remote script Major Update (sparkle)
Version 0.5 of the script avaliable here :Sources
many changes for this update !
many changes for this update !
- Minor bug fixed
- transport button are set
- Select+pattern button->select the track associated to the number ( if it is a midi track)
- button used to change level have been modified : now its the Global, slistcer and roller button
- you can modify the volume of a volume button: if you keep the button pressed and rotate the jog wheel, you modify the value of this button
- Tune mode has been changed-> it is no longer a piano but it is a step sequencer that works like modular sequencer works.
to change the tone of the note keep the pattern button and use the jog wheel - Binary counter: je Proj., Kit, and Instr button under the jogwheel are used as a binary counter to know when to launch scene and keep a nice structure
- Touchpad assignment modified
as before the channel of the touchpad has the value of the pad selected
you can use Filter, Send1/2 and Pan level to change the value of the automation -> 3 * 16 automation possible for the drumpad
Re: How to : use midi remote script Major Update (sparkle)
Hello Raztua
congratulations for the posts!
I´ve been working with some of your examples and I´ve found them great.
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)
I want to call the "button" with (99) as a message received by "def button1(self, value, X): ....where X must received as 99.
I don´t find the way to achieve this. Do you have any ideas?
Thanks for your great work!
congratulations for the posts!
I´ve been working with some of your examples and I´ve found them great.
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)
I want to call the "button" with (99) as a message received by "def button1(self, value, X): ....where X must received as 99.
I don´t find the way to achieve this. Do you have any ideas?
Thanks for your great work!
-
- Posts: 1262
- Joined: Sat Dec 21, 2002 3:52 am
- Location: Santa Barbara, CA
- Contact:
Re: How to : use midi remote script Major Update (sparkle)
What program do you use to open, edit, save, and compile your .py scripts?
Or does Live do it for you in some way? Obviously, I can't open a .py script with a text editor (well, I can, but I see a lot of compiled text, not a structured language)
So what are the actual steps to get started? Or am I missing something very simple (I used to be a C++ programmer....)
Or does Live do it for you in some way? Obviously, I can't open a .py script with a text editor (well, I can, but I see a lot of compiled text, not a structured language)
So what are the actual steps to get started? Or am I missing something very simple (I used to be a C++ programmer....)
-
- Posts: 4478
- Joined: Wed Oct 24, 2007 4:50 am
Re: How to : use midi remote script Major Update (sparkle)
the .py files are Python source code files, if you set things up right (which is covered in the first post of this thread) then Live will compile the .py files down to .pyc (Python byte code).
the best editor to use is a programmer's editor that supports Python syntax. two decent free options are TextWrangler (OS X) and NotePad++ (Windows)...
the best editor to use is a programmer's editor that supports Python syntax. two decent free options are TextWrangler (OS X) and NotePad++ (Windows)...