If it is a conversion that must be done, usually there are protocols and interfaces which can do it.
That is the purpose of the first link's magic box. A PC could also create the encoded signal too. Some folks are even doing it with the PC's sound card.
What kind of interface is the trainer jack based on ?
Mostly it is PPM (pulse position modulation) encoded. The other encoding scheme is based on PCM (more difficult to do). The site in the first link explains the basics of PPM. Beyond that, there are dozens of other web sites that discuss the PPM encoding scheme further. Just google a bit.