FYI I added sACN/ACN E1.31 streaming to the source code last night. May make it easier to hook up to stuff. I tested on in my SanDevices E682 and I can control pixels over several universes now.
Hakan,
I'm just discovering your project now. We have a lot of common goals and interests. I'm writing my stuff in Python - but the goal is also interactive, real-time, and high-level end use (but not GUI):
http://github.com/ptone/BirdFish
I've abstracted the input, effects generation, channel data generation, and output methods from each other.
We should figure out a way to share some ideas.
-Preston
Preston,
very cool! Yes, we should definitely try to share ideas! It seems your project is very similar to mine. In particular it would be good to collaborate on effects, especially for pixels I'd like to come up with a good range of various effects.
Are there any good timers in Python that you're using? I had some issues with that in C# with finding a good timer for high precision 25ms interval (40 hz, related to what DMX can output) effects. The standard timers had quite a bit of variation in the resolution.
/Hakan
HakanL wrote:Preston,Are there any good timers in Python that you're using? I had some issues with that in C# with finding a good timer for high precision 25ms interval (40 hz, related to what DMX can output) effects. The standard timers had quite a bit of variation in the resolution.
/Hakan
Python's builtin time functions have often better that 1microsecond resolution - the 25millisecond resolution isn't an issue:
http://docs.python.org/3.0/library/time.html#time.clock
My main runloop does some dynamic framerate adjustment based on a moving average of effective framerate:
https://github.com/ptone/BirdFish/blob/master/birdfish/lights.py#L730
In some tests it pretty smoothly handle effects that artificially introduce lag.
-P
Ok, I have access to the same counter in C#, but I have to spin to get high precision, if I issue a sleep-command then the shortest I can sleep is about 16 ms, but it's unreliable, sometimes it's 16ms, sometimes it's 30-ish. It's because in Windows (at least) a sleep will give up the current time slice and depending on how busy your system is it may take longer before it's your turn to execute again. In Animatroller I ended up doing a hybrid, sleep and spin with yield.
