Strange CHOP to TOP behavior?

So, I have a program that’s displaying some strange behavior under high CPU load. The program is just a simple one to control my room lighting, basically simulating the color and brightness of natural sunlight, but time shifted to my work schedule so that I can hack my circadian cycle / have a spiffy alarm clock. It’s taking the colors it generates and sending the RGB values over USB serial to an arduino hooked up to a 20w LED. The program is just running in the background on my normal desktop computer.

The problem I’m running into is that the lights flicker whenever there’s high CPU load on the PC. I tracked it down to a CHOP to TOP node. It seems that during high CPU load, instead of taking the input chop’s RGB channel values and outputting a single pixel like it should, it starts outputting several pixels. The more the CPU load, the more pixels the CHOP to TOP outputs. when it’s under a really high load, such as with a hog node turned up, it outputs a gradient of 4 or 5 pixels, going from black to the correct color that it SHOULD be outputting.

Why would it be making these extra pixels? Is there a way to avoid this problem? The color change is really slow, so dropped frames aren’t really a problem as long as there’s no artifacts.

If the file is dropped frames CHOPs will contain more samples worth of information for the past missed frames. Check out timeslicing on the wiki for more information on that. To fix this you can use the Trim CHOP to ensure the length of your CHOP is always the correct size.

Malcolm