<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dilip Singh</title>
    <description>The latest articles on DEV Community by Dilip Singh (@dilipsingh).</description>
    <link>https://dev.to/dilipsingh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3986136%2F31d74580-db28-42eb-9ed1-46ae3efae5fc.jpg</url>
      <title>DEV Community: Dilip Singh</title>
      <link>https://dev.to/dilipsingh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dilipsingh"/>
    <language>en</language>
    <item>
      <title>PCM Audio Explained: How Sound Becomes Numbers</title>
      <dc:creator>Dilip Singh</dc:creator>
      <pubDate>Mon, 15 Jun 2026 19:17:00 +0000</pubDate>
      <link>https://dev.to/dilipsingh/pcm-audio-explained-how-sound-becomes-numbers-4plk</link>
      <guid>https://dev.to/dilipsingh/pcm-audio-explained-how-sound-becomes-numbers-4plk</guid>
      <description>&lt;p&gt;Whenever you listen to a WAV file, record audio through a microphone, or process speech data for machine learning, you are likely working with PCM audio.&lt;/p&gt;

&lt;p&gt;But what exactly is PCM, and why is it so important?&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is PCM?
&lt;/h2&gt;

&lt;p&gt;PCM stands for &lt;strong&gt;Pulse Code Modulation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is one of the most widely used methods for representing audio in digital form.&lt;/p&gt;

&lt;p&gt;Instead of storing sound as a continuous wave, PCM stores a sequence of numerical values. Each value represents the amplitude of the sound wave at a specific moment in time.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;120
135
140
138
125
110
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These numbers are digital representations of the original sound signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  How PCM Works
&lt;/h2&gt;

&lt;p&gt;PCM audio is created through two important steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Sampling
&lt;/h3&gt;

&lt;p&gt;The audio signal is measured at regular intervals.&lt;/p&gt;

&lt;p&gt;For example, a sampling rate of &lt;strong&gt;44,100 Hz&lt;/strong&gt; means the signal is measured &lt;strong&gt;44,100 times every second&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each measurement becomes a sample.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Quantization
&lt;/h3&gt;

&lt;p&gt;The sampled values are converted into numerical levels that a computer can store.&lt;/p&gt;

&lt;p&gt;The precision of this conversion depends on the &lt;strong&gt;bit depth&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Common bit depths include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8-bit&lt;/li&gt;
&lt;li&gt;16-bit&lt;/li&gt;
&lt;li&gt;24-bit&lt;/li&gt;
&lt;li&gt;32-bit floating point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Higher bit depths provide greater accuracy and a larger dynamic range.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why PCM Is Important
&lt;/h2&gt;

&lt;p&gt;PCM is simple, reliable, and preserves audio quality.&lt;/p&gt;

&lt;p&gt;Many professional audio systems use PCM because it stores sound without compression.&lt;/p&gt;

&lt;p&gt;This makes PCM useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Audio engineering&lt;/li&gt;
&lt;li&gt;Music production&lt;/li&gt;
&lt;li&gt;Speech processing&lt;/li&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;li&gt;Voice recognition systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  PCM in WAV Files
&lt;/h2&gt;

&lt;p&gt;A WAV file commonly stores audio using PCM encoding.&lt;/p&gt;

&lt;p&gt;A typical WAV file contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File metadata&lt;/li&gt;
&lt;li&gt;Audio format information&lt;/li&gt;
&lt;li&gt;Sampling rate&lt;/li&gt;
&lt;li&gt;Number of channels&lt;/li&gt;
&lt;li&gt;Bit depth&lt;/li&gt;
&lt;li&gt;PCM sample data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because PCM is uncompressed, WAV files are usually larger than compressed formats such as MP3.&lt;/p&gt;

&lt;p&gt;However, they maintain high audio quality and are easier to process programmatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mono vs Stereo PCM
&lt;/h2&gt;

&lt;p&gt;PCM audio can contain different numbers of channels.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mono
&lt;/h3&gt;

&lt;p&gt;Mono audio contains a single channel.&lt;/p&gt;

&lt;p&gt;Every speaker receives the same signal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stereo
&lt;/h3&gt;

&lt;p&gt;Stereo audio contains two channels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Left channel&lt;/li&gt;
&lt;li&gt;Right channel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows sounds to be positioned across speakers, creating a more immersive listening experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where PCM Is Used
&lt;/h2&gt;

&lt;p&gt;PCM audio is used in many everyday technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Voice assistants&lt;/li&gt;
&lt;li&gt;Video conferencing applications&lt;/li&gt;
&lt;li&gt;Digital recorders&lt;/li&gt;
&lt;li&gt;Audio editing software&lt;/li&gt;
&lt;li&gt;Speech recognition systems&lt;/li&gt;
&lt;li&gt;AI voice applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It serves as the foundation for many modern audio-processing systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;PCM may look like a simple sequence of numbers, but it forms the foundation of digital audio.&lt;/p&gt;

&lt;p&gt;By converting sound waves into numerical samples, PCM enables computers to store, analyze, modify, and transmit audio efficiently.&lt;/p&gt;

&lt;p&gt;Understanding PCM is an important first step toward learning audio engineering, speech processing, machine learning, and AI-powered audio systems.&lt;/p&gt;

&lt;p&gt;In the next article, we will explore how WAV files store PCM data and how computers read audio from a file.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>computerscience</category>
      <category>music</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
