1. A system comprising: a processor configured to receive information from a hard disk drive via a read channel and recover data from the hard disk drive using maximum transition run modulation code; and a memory having computer executable instructions stored thereon, the computer executable instructions configured for execution by the processor to: model a magnetic recording channel as a partial response channel, model a source of information to the magnetic recording channel to provide an optimized Markov source, and construct the maximum transition run modulation code to mimic the optimized Markov source based upon a finite state machine having a limited transition run length and a multi-level periodic structure.