|
-
Jun 5th, 2022, 08:58 AM
#1
Thread Starter
Junior Member
Updating 512 Values Over Varrying Times
Hey All,
I've got, i guess more of a best practice issue to do with updating 512+ values at once at different speeds.
I'll give a basic run down of what i'm trying to do.
Essentially i'm connecting to lights over DMX. For those who are unformilliar. DMX can carry 512 addresses over 1 universe (a universe being essentially 1 XLR cable). A light can take anywhere from 1 to 512 addresses. A simple light might take 1 address just for intensity. Another may have 1 for intensity, 3 for colour (RGB), 2 for pan and tilt.
So sending an array of 512 values and then sending another update to a new set of values is easy enough.
However, this would create a snap. More often then not we want the lights to get to their final value over a time. Then those addresses will all have a different distance to travel in that time. If that wasn't hard enough, those addresses may have different times they are updating over. AND may have a delay on that cue that the light waits for before starting it's travel.
So currently my thought is 512 tasks, 2 timers/loops each, each tick or loop calculating where the address should be up to, then applying that to the array.
However, i'm fairly sure starting that many threads/tasks would be a crime. Also assuming that would cause alot of issues of intanglement, trying to access the same array.
The next issue with that is i mentioned 512 is 1 universe. Because of how many addresses modern lights need, multiple universes have become required. And while each universe would be it's own array, it would be another 512 timers going.
I would also note that while this has all been linear, i plan to add curves, so i would need a chance to do a calculation on each 'tick'
Final note, a cost saving method would be to only spin up calculations for the addresses that changed on a cue, but a cue could still require all of those addresses, and would be an extra calculation before the lights changed.
So that is my conundrum, essentially just after some best practice advice for something on this scale.
Thanks!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|