Introduction to CP-16:https://www.hellocq.net/forum/read.php?tid=345437
Program code:https://github.com/BenderBlog/cp16-rs
README:
CP-16 is essentially the superposition of 16 sine waves, used to directly display Chinese characters on a spectrum graph. I think this is just a very simple form of sine wave superposition. If you use more complex patterns, such as denser frequencies, then it's CTF Misc problems, and also the "I love God" Easter egg left by the creator of DOOM 2016.
Currently, this program achieves the initial implementation of this encoding method by generating and overlaying 16 PCM sine waves. It also includes features for setting the initial generation frequency, generation interval, and handling horizontal character generation. The next step is to create a library based on this functionality. Then, we need to write a program that can use this library to play audio in real-time or write it to a file.
This program relies on the GNU Unifont library and does not intend to support external font loading. The GNU Unifont library supports the Unicode Basic Multilingual Plane, which means that it can support most commonly used fonts.
By the way, use this program to learn about Rust iterators.
Note:
I saw a group chat at the time, and someone mentioned wanting to do this. I immediately thought that generating 16 sine waves would be quick (since I had previously seen a very simple SSTV generator that directly generated sine waves from PCM). So, I quickly wrote a prototype. Later, I wanted to learn about Rust's iterators (to make the calculations more practical), so I rewrote it. Now, I think it should work. However, I don't know how far I will go with it.