Refactor _pippi and modify amplitude modulation api