modulation with arbitrary function