Add defsample macro