(bind-func set_filter
(lambda (inst:i8* frq:float res:float drive:float type:i64 envamt:float trackfrq:float trackamp:float)
(let ((note (cref (cast inst [void]*) note_kernel [void]*)))
(cset! note filter_frq frq float)
(cset! note reso (clamp res 0.0 1.0) float)
(cset! note filter_saturation (clamp drive 0.0 2.5) float)
(cset! note filter_type (if (= type 12) 1 2) i64)
(cset! note filter_env_amt envamt float)
(cset! note follow_frq trackfrq float)
(cset! note follow_amp trackamp float)
void)))