

The sample can be represented on disk as one of several kinds of numbers - floating point numbers, integers, or other representations. SamplesĮach number in the list that makes up a sound is called a "sample". This is, after all, what a microphone measures and converts into numbers. There's a lot of fancy theory and maths behind PCM encoding - but until you're ready to dive in to Wikipedia, you can think of it as "a long list of numbers that represent the change in air pressure over time that makes up a sound".

Generally, digital signal processing (which means "working with audio data using code") operates on a kind of audio data called Pulse Code Modulation (or "PCM" for short). This post won't be a deep dive into audio encoding - it's a practical guide for how to load audio in Node JS, into a state that you can work with it. But working with audio can be tricky - how is sound represented on a computer? How can we manipulate that sound? And how do we serialize sound data to disk? Pulse Code Modulation Encoding You can generate music, analyze audio using machine learning, build audio visualizers, music information retrieval systems, and much more. Working with audio as a developer can unlock many awesome features, and a lot of fun.
