Question about efficiency. Phasor~, send~, cycle~, cross~, audio analysis...

    Aug 21 2013 | 1:50 am
    I'm working on this patch to control 8 RGB LEDs that I've interfaced through Arduino. As I add more functionality, I'm seeing a slight performance hit. Since this is used for live performance, latency is of the utmost importance.
    So far I have two main functions that I'm concerned with: A 'swell' effect which cycles through colors using a phasor~, and some basic audio analysis to make the lights beat to the music. I'm just curious if there are more efficient ways of dong what I'm doing, because I'd really like to do the projections from the same machine.
    To check it out, just tap on the audio and the red toggle sending to swellSwitch. Then the red toggle below the ezadc~ for audio analysis.
    main patch:
    poly~ patch:

    • Aug 21 2013 | 6:18 pm
      well that certainly looks like an over-engineered solution, that's true. I've seen simpler solutions for much of what I can discern here.
      I would handle the analysis differently; there's a ton of objects for very little going on here; have you looked at fffb~?
      The other is the cycle~ "swell" business; you can handle that with an [expr sin] function and it'll be much cheaper, too.