A generic library to design BCI interfaces