DMX-IN expression/constants and performance

Hello,

I am doing a little personal enrichment project to figure out the best way to implement ArtNet/DMX integration into TD projects.

As a first stab at doing this I have come up with what I’m hoping is a pretty reasonable way of doing this:

I drop a DMXIn CHOP into the network to receive the data. I then use expressions in a Constant CHOP to read 23 parameters from the DMX In CHOP into channels which I can then label with meaningful titles like “Intensity” and “Pos_X”. I also transform the 8-bit DMX units into relevant value spaces here. I then access these values in my network through further use of expressions

Having finished all this I realized that the DMX control network has little in the way of conventional ‘cabling’. It’s all python op(‘constant’)[‘parameter’] type references running yon and hither.

My question is, is this bad?

I can’t help feeling like maybe I’ve gone a bit expression crazy. To me this approach makes sense because it is more traditionally programmatic, but I worry that I am circumventing a more efficient approach that would garner better performance.

To clarify: is there a performance penalty for evaluating python references to values in operators? Would it be better to do the math to combine multiple 8-bit channels into 16-bit channels in an op-network and forward the channel data through one of the green cables? etc…

Thanks!

CHOPs (or any operator) are definitely faster than expressions/scripting equivalents.
For example, instead of a CHOP constant with expressions, use the Select and/or Rename CHOPs.

You can measure the performance of each frame and individual nodes using the Performance Monitor as well:

derivative.ca/wiki088/index. … tor_Dialog
derivative.ca/wiki088/index. … e=Optimize

Cheers

Hi,

Thanks for the response.

I discovered the performance monitoring tools just after posting the initial question.

While I appreciate the succinct simplicity of just doing value references and math with a single expression, I guess it makes sense that a chain of CHOPS would be more efficient.

I’m not looking forward to the tedium of figuring out how to go about representing the expressions in network form, but I guess it’ll be good practice. Like taking up knitting or something…

Thanks!

Feel free to post the expressions here.
We can point out which CHOPs they would convert to.
Cheers