Text this: Smith-Purcell radiation from periodic beams