Employing Python Programming to Synthesize Digital Audio with Pulse Code Modulation
摘要
This paper focuses on the Python-based synthesis of digital audio using pulse code modulation (PCM). Certain Python modules were imported to make mathematical computations, digital instructions, and the overall synthesis of digital audio possible. The code was written carefully to perform PCM properly, considering various parameters such as the bit depth and sampling rate. With this, the corresponding frequencies and durations of each musical note were applied in the script to cover the song. Repetitive runs were done to ensure that there would be no erroneous factors present in the code. Lastly, the frequency spectrogram of the data was utilized to identify any inconsistencies in the generated music.