< Back to IRCAM Forum

Comparing Expression and Lua controllers

Hi there! I am comparing the Expression and the Lua controllers in terms of sound and CPU. Here are 2 patches which should be identical in every aspect except that one uses the expression controller and the other a lua controller. Scripting code of both objects have been kept as identical as possible.

  • Why do they sound so different? They coincide in pitch but not at all in timbre (harmonics). The only obvious difference in the code is that the update mechanism of the x,v,t variables differs slightly.

  • Why do the expression controller run a 2-3% CPU whereas the Lua controller runs at 4-6% CPU (at my modest macMini)? If one scales up this difference for larger patches its clear that you would run out of ressources first using the Lua controller. Of course the Lua environment is richer than the expression controllers maybe explaining the CPU overhead. However I am concerned why the difference is so big.

Any discussion / opinions on this matter is very wellcome. Kindly Hans Peter

The expression controller patch
VanDenPol-Oscillator-[EXPR].maxpat (49.9 KB)

The Lua controller patch
VanDenPol-Oscillator-[LUA2].maxpat (47.4 KB)