Who wants access to Ableton's Python API? .. You? .. Ok!
-
Michael Hatsis
- Posts: 1807
- Joined: Tue Nov 16, 2004 6:27 pm
- Location: Here and There
- Contact:
Id try the max version if you can. its been in dev a bit longer than the pd version. lots of features implemented. There has just been a hack that will let the OSC version runn on OS X but its kind of tricky.nbinder wrote:I tried APIMIDI with the Pd files and was just getting nonsense data ("scene-e: 1 0 1 1 1 0 1 0", and this doesn't even match to the used clip slots).
Guess you tried it with Max/MSP?
The whole development seems to be stuck, I wrote several messages on the google code and the google groups pages, but no replies or any other activities...
I tried to help myself, as I am not the silly "give me everything and I'll still complain" guy, but could get very much closer since then.
Thanks for the tip, I solved this problem in the meantime. My version was broken... I downloaded a new one... and voila. Never thought that could have been the reasonmike@TrackTeam Audio wrote:Id try the max version if you can. its been in dev a bit longer than the pd version. lots of features implemented. There has just been a hack that will let the OSC version runn on OS X but its kind of tricky.
I am running it with c++ right now, the Pd version also did its job very well.
Still I am trying to find a way to gather playing position information of a clip, but as I've asked it twice here and didn't get any replies, I am near to giving up. I know that it is possible, but noone seems to know about it
I'm trying to get callbacks working from the OSCServer but i can't seem to make it happen... maybe somebody can help me out
I got data sending too live... eg.. tempo and changing the names... but the callbacks just don't fire off...
help would be extremly appreciated. Thanks!
I got data sending too live... eg.. tempo and changing the names... but the callbacks just don't fire off...
Code: Select all
import sys
import time
import random
sys.path.append('..\_LiveAPICore')
import RemixNet
#Add callback
def my_callback(data):
print data
print 'i got a callback'
oscServer = RemixNet.OSCServer('127.0.0.1', 9000, '127.0.0.1', 9001)
def do_it():
oscServer.processIncomingUDP()
oscServer.addCallback(my_callback, '/live/tempo')
oscServer.addCallback(my_callback, '/live/name/clip')
oscServer.addCallback(my_callback, '/live/name/track')
oscServer.sendOSC('/live/tempo', 115)
oscServer.sendOSC('/live/tempo')
oscServer.sendOSC('/live/name/track', (0, 'rouyiyisterr'))
oscServer.sendOSC('/live/name/track', (0))
oscServer.sendOSC('/live/name/clip', (0,0))
while 1:
time.sleep(0.1)
print 'wait...'
do_it()I have to admit that I didn't do anything with callbacks, I jused python just for the quick test (set tempo, trigger clip).
Then I switched to C++, as the rest of my project was written there and I feel a bit more like "home" there. If you like to do the stuff in C++, be sure to check out Ross' amazing oscpack library. There are examples how to send/receive stuff, so you might be successfull with just a few lines of code.
Then I switched to C++, as the rest of my project was written there and I feel a bit more like "home" there. If you like to do the stuff in C++, be sure to check out Ross' amazing oscpack library. There are examples how to send/receive stuff, so you might be successfull with just a few lines of code.
yeh... Unfortunately, c++ is a bit outside my reach atm. I'm an artist by trait and in the 5 years... I taught myself Actionscript, Javascript, LUA and now python. I will take that into consideration.nbinder wrote:I have to admit that I didn't do anything with callbacks, I jused python just for the quick test (set tempo, trigger clip).
Then I switched to C++, as the rest of my project was written there and I feel a bit more like "home" there. If you like to do the stuff in C++, be sure to check out Ross' amazing oscpack library. There are examples how to send/receive stuff, so you might be successfull with just a few lines of code.
I decided to work directly in live on the monome -> live connection. The only thing i dislike right now is not being able to debug or print output... any ideas on that?
-
DIgiDennis
- Posts: 142
- Joined: Thu Jul 13, 2006 7:07 am
- Location: DK - 1659
Took me a while as well. going here: http://svn2.assembla.com/svn/live-api/trunk/src/tools either by svn or manualy download/setuphydrogen wrote: The only thing i dislike right now is not being able to debug or print output... any ideas on that?
Some genius made a log server wich can be used to print debug messages to.
Check out the other projects in the trunk to see how it is used.
btw. u need to have python installed to use the log server. It has to be executed in a prompt.
word... i've seen logger script before in some of these apps... but the data doesn't seem to come through until i close live.DIgiDennis wrote:Some genius made a log server wich can be used to print debug messages to.
I'm also having trouble spawning multiple threads in live using:
Code: Select all
import threading
class MonomeDisplay(threading.Thread):
def __init__( self, monome_basic):
threading.Thread.__init__ ( self )
self.monome_basic = monome_basic
def run ( self ):
while 1:
note = self.monome_basic.get_monome_midi(3, 7)
#on note
self.monome_basic.send_midi((NOTE_ON_STATUS, note, 127))
#off note
time.sleep(0.05)
self.monome_basic.send_midi((NOTE_OFF_STATUS, note, 0))
oh thats freaking awesome... i just figured out something... i can use live to send data back to the monome... so yussss!!! i'm in progreess..
so if i setup two clips... that legato into each other... i can get events that are timed to the bpm of my track. perfect. now i can make lights blink in sync with my music.
so if i setup two clips... that legato into each other... i can get events that are timed to the bpm of my track. perfect. now i can make lights blink in sync with my music.
This logger actually works and i'm very thankful that you posted this information.DIgiDennis wrote:Took me a while as well. going here: http://svn2.assembla.com/svn/live-api/trunk/src/tools either by svn or manualy download/setuphydrogen wrote: The only thing i dislike right now is not being able to debug or print output... any ideas on that?
Some genius made a log server wich can be used to print debug messages to.
Check out the other projects in the trunk to see how it is used.
btw. u need to have python installed to use the log server. It has to be executed in a prompt.
-
baseinstinct
- Posts: 942
- Joined: Sun Feb 24, 2008 3:45 am
Hi guys. I have made several attempts to dig through what this Live API Python based project is about. I wonder how many people have been watching silently trying to figure out. The first part is for the like.
My discoveries:
it uses telnet
it may need a dedicated controller
its fully customizable
accepted by Ableton
may make Live-user integration much deeper than ever
There is not step by step tutorial for beginners, so if you are new to telnet and computer programming you may not know how to even start the investigation.
The latter I am not (c64 basic, some pascal, logo, autohotkeys), but apparently this is not enough.
I have a few questions, the answer to which could help me decide if the project is something to go for.
Is the following possible:
http://www.ableton.com/forum/viewtopic. ... highlight=
Could those functions be triggered by :
-keys of computer keyboard? Maybe Autohotkey (see http://www.autohotkey.com) would help?
-normal MIDI keyboard
-Nocturn Automapped
My discoveries:
it uses telnet
it may need a dedicated controller
its fully customizable
accepted by Ableton
may make Live-user integration much deeper than ever
There is not step by step tutorial for beginners, so if you are new to telnet and computer programming you may not know how to even start the investigation.
The latter I am not (c64 basic, some pascal, logo, autohotkeys), but apparently this is not enough.
I have a few questions, the answer to which could help me decide if the project is something to go for.
Is the following possible:
http://www.ableton.com/forum/viewtopic. ... highlight=
Could those functions be triggered by :
-keys of computer keyboard? Maybe Autohotkey (see http://www.autohotkey.com) would help?
-normal MIDI keyboard
-Nocturn Automapped
Hello,
I am trying to adapt Monome Basic and Hydrogen's Monome Basic PLUS to my vision.
i want to take the quantization buttons from Monome basic and put them in the 7th column of Hydrogen's edit.
i know to replace the second lines in Monome BAsic
"elif q == Live.Song.Quantization.q_bar:
q = Live.Song.Quantization.q_2_bars
and only have the jumps to the options i want.
but i don't know how to paste this into 004 without crashing live
EDIT
If i want to skip the last 2 columns for clip triggering, is this correct?
FROM HYDROGEN's EDIT
#Playback grid for the monome
MONOME_PLAYBACK_GRID_X = (0, 5) #start, stop
MONOME_PLAYBACK_GRID_Y = (0, 7) #start, stop
and what does this variable do?
#set to 1, if the 9th row should be skipped
MONOME_SKIP_EIGHTH_ROW = 1
dunno what to do.
I am trying to adapt Monome Basic and Hydrogen's Monome Basic PLUS to my vision.
i want to take the quantization buttons from Monome basic and put them in the 7th column of Hydrogen's edit.
i know to replace the second lines in Monome BAsic
"elif q == Live.Song.Quantization.q_bar:
q = Live.Song.Quantization.q_2_bars
and only have the jumps to the options i want.
but i don't know how to paste this into 004 without crashing live
EDIT
If i want to skip the last 2 columns for clip triggering, is this correct?
FROM HYDROGEN's EDIT
#Playback grid for the monome
MONOME_PLAYBACK_GRID_X = (0, 5) #start, stop
MONOME_PLAYBACK_GRID_Y = (0, 7) #start, stop
and what does this variable do?
#set to 1, if the 9th row should be skipped
MONOME_SKIP_EIGHTH_ROW = 1
dunno what to do.
i have some questions about all this API thing.
i am not a programmer, just curious...
is the following possible ?
"ask" live from outside live: "what tracks are there in
the session view and what clips are in these tracks ?
what is the colour of the clips ?"
and if possible can you do this in c# ?
i thought it was only in python, but now i read
something about c++ in this thread...
i am not a programmer, just curious...
is the following possible ?
"ask" live from outside live: "what tracks are there in
the session view and what clips are in these tracks ?
what is the colour of the clips ?"
and if possible can you do this in c# ?
i thought it was only in python, but now i read
something about c++ in this thread...
surreal...Surreal wrote:Hello,
I am trying to adapt Monome Basic and Hydrogen's Monome Basic PLUS to my vision.
i want to take the quantization buttons from Monome basic and put them in the 7th column of Hydrogen's edit.
i know to replace the second lines in Monome BAsic
"elif q == Live.Song.Quantization.q_bar:
q = Live.Song.Quantization.q_2_bars
and only have the jumps to the options i want.
but i don't know how to paste this into 004 without crashing live
EDIT
If i want to skip the last 2 columns for clip triggering, is this correct?
FROM HYDROGEN's EDIT
#Playback grid for the monome
MONOME_PLAYBACK_GRID_X = (0, 5) #start, stop
MONOME_PLAYBACK_GRID_Y = (0, 7) #start, stop
and what does this variable do?
#set to 1, if the 9th row should be skipped
MONOME_SKIP_EIGHTH_ROW = 1
dunno what to do.
MONOME_SKIP_EIGHTH_ROW = sets the monome to actually skip every 9th row... haha...(Great naming). So in your ableton set there will be a blank betweeen each grid of 8 sounds.
I can add the quantiazation functionality in a couple weeks when i have some time. I sent you my email... please email and i can get back to you.