Clear pattern with midi command?

Hi everyone!

Is it possible to clear a BSP pattern with an incoming midi command?

For example, I want to step on a footswitch and clear the existing drum pattern…

Thank you for the help!