Page 1 of 1

precise timer in live's python API

Posted: Wed May 02, 2012 6:45 pm
by mlostekk
hey there,

i dont know if i am right in that part of the forum, but it seems, that the python part is not anymore supported(?)

but i have a question. i am trying to write a device in python (for the launchpad) which basically is a step sequencer that is just triggers effects based on the step and the activated effect. but independent from my target of the step sequencer i have some trouble to setup a step sequencer that is tight enough.

i tried to get a precise time callback with

Code: Select all

_register_timer_callback in my control surface 
and also with

Code: Select all

add_current_song_time_listener in the song() element
but all of them seem to come every 100ms. and that is not precise enough. because if i do calculate into beat time, then sometimes some steps are skipped. so in general its very unprecise.

is there a way to get a tight callback on each 16th note for example?!?!

thx in advance
best
/martyn

P.S. btw, you can checkout all of the scripts in the google repository,

https://code.google.com/p/mlostekk-live/

its still everything in alpha mode, but as soon as everything works tight, i will do some tutorial and setup videos

Re: precise timer in live's python API

Posted: Wed May 02, 2012 6:57 pm
by ST8
No way to do this im afraid :(
Its one of the things that would make a lot more possible with the python api.

Re: precise timer in live's python API

Posted: Wed May 02, 2012 7:19 pm
by mlostekk
mmmmh :(

damnit... i also created a midi clip which triggers a lot of CC fades.. but it seems that they are also not that tight...

currently trying to get the F1 highlighted per step... but also the midi CC sending seems to be not precise over time...

Re: precise timer in live's python API

Posted: Wed May 02, 2012 7:20 pm
by mlostekk
and is a tighter timing and callback possible with max4live? or also not?

Re: precise timer in live's python API

Posted: Fri May 04, 2012 2:23 pm
by ST8
yes, with m4l you get max's timing which is tied to the live transport, so its pretty tight.

Re: precise timer in live's python API

Posted: Fri May 04, 2012 8:06 pm
by mlostekk
mh.. okay.. so i guess with reaktor i would also get a tighter timing callback...

Re: precise timer in live's python API

Posted: Thu May 10, 2012 6:55 pm
by mlostekk
isn it possible to use the python time library to get a more accurate timer?!