GenExpr sample mode for

    Jan 06 2017 | 12:26 pm
    I'm trying to work out how to set the wrap mode of a sample object in a object, when working within a codebox. As far as I can tell, sample only takes 2 arguments - a texture and a coordinate - so how can I tell it whether I wish to wrap/mirror/repeat/ignore when the coordinates are beyond the bounds of the texture?
    Many thanks in advance

    • Jan 06 2017 | 5:51 pm
      Easiest way is to create the object [sample @wrap mirror] etc., open the codeview tab of the genpatcher, select the object, and the corresponding genexpr gets highlighted in the codeview tab. I do this all the time because I can never remember how to write some of the operators in genexpr.
    • Jan 09 2017 | 9:42 am
      Hi Graham,
      Thanks, a great tip, and one which I will use from now on! Unfortunately, it reveals that sample's boundmode cannot be set to "ignore" or "reset" to give 0 values for coordinates which are beyond the bounds of the texture, so I imagine I'll have to write something bespoke to create this effect. One step forward....