it is confusing this. been trying to make it work. anyway, all i know is that no, you cannot have default values in gen. it is an always-on environment. notice in patching land, the right inlet of a plus (for example) will disappear if you give it a default value, i.e. it becomes a constant.
what your "upsamp=1" does in your function header is turn the upsamp into a "param". there is a section in the GenExpr documentation about this. the thing about params is that they operate at control rate (like in csound, for example), but do so automatically. so params do have ‘default values’. but, you then have to be careful about how params interact with full signal rate controls. this is probably the problem here. it can be a bit oblique sometimes.