Reply To: MillerPuckette's "Switch&Ramp" reworked in gen~

Forums > Gen > MillerPuckette's "Switch&Ramp" reworked in gen~
Jun 27 2013 | 5:45 am

And how can i tell by that code(whether in the sidebar or in your expr), which gen~ "in"(let) they are taking history from? (or why wouldn’t i assume that ‘env’ is just as well taking history from ‘in2′?)

I’m not entirely sure I understand the question… but maybe a bit of explanation will help? History doesn’t take input from any [in], unless you tell it to. In GenExpr, you simply assign to the history name to update it. So whatever code assigns to "env", is what updates the "History env". You can even assign to it in several different places (e.g. in different if/else blocks), or not assign to it at all (in which case it behaves just like a Param). GenExpr is closer to the underlying C++ code in that sense: a History is just a member variable of 64-bit float type, accessible to get/set (read/write) anywhere in the code.

Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required