<?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>Forem: SUDIP MONDAL</title>
    <description>The latest articles on Forem by SUDIP MONDAL (@sudipmondal2002).</description>
    <link>https://forem.com/sudipmondal2002</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745982%2Fb89d0076-b6ec-492d-8514-0e9180fe784f.jpeg</url>
      <title>Forem: SUDIP MONDAL</title>
      <link>https://forem.com/sudipmondal2002</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sudipmondal2002"/>
    <language>en</language>
    <item>
      <title>How I implemented Schroeder Reverb in real-time audio (C++17)</title>
      <dc:creator>SUDIP MONDAL</dc:creator>
      <pubDate>Wed, 25 Mar 2026 08:13:38 +0000</pubDate>
      <link>https://forem.com/sudipmondal2002/how-i-implemented-schroeder-reverb-in-real-time-audio-c17-2jol</link>
      <guid>https://forem.com/sudipmondal2002/how-i-implemented-schroeder-reverb-in-real-time-audio-c17-2jol</guid>
      <description>&lt;h2&gt;
  
  
  What is Schroeder Reverb?
&lt;/h2&gt;

&lt;p&gt;Schroeder Reverb is a classic real-time reverberation algorithm that simulates room acoustics using parallel comb filters followed by series allpass filters. It's computationally efficient while producing convincing reverb effects, making it ideal for real-time audio applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Algorithm
&lt;/h2&gt;

&lt;p&gt;The Schroeder reverberator consists of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;4 parallel comb filters&lt;/strong&gt; - These create the initial reflections&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 series allpass filters&lt;/strong&gt; - These add diffusion and smear the sound&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each comb filter uses a feedback topology:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;CombFilter&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Read from circular buffer at delay time&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;delayed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;delayTime&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;BUFFER_MASK&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;delayed&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;feedback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Mix input with feedback&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;mixedInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Write to buffer&lt;/span&gt;
    &lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mixedInput&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;BUFFER_MASK&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;delayed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Implementation Details
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Comb Filter Delays
&lt;/h3&gt;

&lt;p&gt;Typical delay times (in milliseconds) for 44.1kHz sample rate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Comb 1: 25.31ms
Comb 2: 26.94ms
Comb 3: 28.63ms
Comb 4: 30.47ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are prime number-based delays to avoid comb resonances at audio frequencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Allpass Filters
&lt;/h3&gt;

&lt;p&gt;Allpass filters are crucial for diffusion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;AllpassFilter&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;delayed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;delayTime&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;BUFFER_MASK&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;delayed&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;feedback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delayed&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;feedback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;writePos&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;BUFFER_MASK&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Allpass delays are typically shorter (5-17ms) than comb filters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Implementation Tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use circular buffers&lt;/strong&gt; - Allocate based on max delay time at your sample rate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback coefficient&lt;/strong&gt; - Keep between 0.5-0.9 to avoid instability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dry/wet mix&lt;/strong&gt; - Combine the dry input with the reverb output (typically 30% wet)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Denormal handling&lt;/strong&gt; - Add small noise floor to prevent denormal CPU stalls
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;drySignal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;wetMix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; 
               &lt;span class="n"&gt;reverbSignal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;wetMix&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Prevent denormals&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fabs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;1e-6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Schroeder reverb is extremely efficient:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6 filters total&lt;/strong&gt; (4 comb + 2 allpass)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~3KB memory&lt;/strong&gt; for buffers at 44.1kHz&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~0.1ms latency&lt;/strong&gt; with optimized code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal CPU usage&lt;/strong&gt; - runs easily on embedded systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tuning the Sound
&lt;/h2&gt;

&lt;p&gt;Tweak these parameters for different room characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Damping&lt;/strong&gt;: Low-pass filter in feedback path (reduces high frequencies)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback amount&lt;/strong&gt;: Higher values = longer decay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wet/Dry mix&lt;/strong&gt;: More wet = more obvious reverb&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delay times&lt;/strong&gt;: Pre-calculated for room size&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The beauty of Schroeder reverb is its simplicity and efficiency. With just a few parameters, you can create convincing spatial effects perfect for guitar sims, synthesizers, or any real-time audio application.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Want to see it in action? Check out Amplitron's full implementation in the main article!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>dsp</category>
      <category>music</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Just launched Amplitron on Product Hunt today — a free, open-source guitar amp simulator I built in C++17. Implements Schroeder reverb, biquad EQ, and tanh waveshaping from scratch. ~1.3ms latency. Linux/Mac/Windows. Check it out!</title>
      <dc:creator>SUDIP MONDAL</dc:creator>
      <pubDate>Wed, 25 Mar 2026 08:10:07 +0000</pubDate>
      <link>https://forem.com/sudipmondal2002/just-launched-amplitron-on-product-hunt-today-a-free-open-source-guitar-amp-simulator-i-built-in-1ll5</link>
      <guid>https://forem.com/sudipmondal2002/just-launched-amplitron-on-product-hunt-today-a-free-open-source-guitar-amp-simulator-i-built-in-1ll5</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86" class="crayons-story__hidden-navigation-link"&gt;I Built a Free, Open-Source Guitar Amp Simulator in C++17 — Here's How&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/sudipmondal2002" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745982%2Fb89d0076-b6ec-492d-8514-0e9180fe784f.jpeg" alt="sudipmondal2002 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/sudipmondal2002" class="crayons-story__secondary fw-medium m:hidden"&gt;
              SUDIP MONDAL
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                SUDIP MONDAL
                
              
              &lt;div id="story-author-preview-content-3396968" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/sudipmondal2002" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745982%2Fb89d0076-b6ec-492d-8514-0e9180fe784f.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;SUDIP MONDAL&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Mar 24&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86" id="article-link-3396968"&gt;
          I Built a Free, Open-Source Guitar Amp Simulator in C++17 — Here's How
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cpp"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cpp&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/audio"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;audio&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/music"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;music&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              1&lt;span class="hidden s:inline"&gt; comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>cpp</category>
      <category>opensource</category>
      <category>audio</category>
      <category>music</category>
    </item>
    <item>
      <title>Ask the community: building real-time audio in C++ — what would you add?</title>
      <dc:creator>SUDIP MONDAL</dc:creator>
      <pubDate>Wed, 25 Mar 2026 00:32:30 +0000</pubDate>
      <link>https://forem.com/sudipmondal2002/ask-the-community-building-real-time-audio-in-c-what-would-you-add-4gk1</link>
      <guid>https://forem.com/sudipmondal2002/ask-the-community-building-real-time-audio-in-c-what-would-you-add-4gk1</guid>
      <description>&lt;p&gt;I’m actively developing &lt;strong&gt;Amplitron&lt;/strong&gt;, a free open-source guitar amp simulator in C++17, and I'd love to get community input on the direction of the project.&lt;/p&gt;

&lt;p&gt;The core is solid — we have DSP effects chains, tube amp modeling, and cabinet simulation working well. But I want to know what would make it more useful for the community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some ideas I’m considering:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More effects types (reverb, delay, modulation effects)&lt;/li&gt;
&lt;li&gt;MIDI controller support&lt;/li&gt;
&lt;li&gt;Multi-amp/split chains&lt;/li&gt;
&lt;li&gt;Better visualization of the signal chain&lt;/li&gt;
&lt;li&gt;Plugin version (VST/AU)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I’m curious: &lt;strong&gt;what effects or features would YOU prioritize if you were building a guitar amp simulator?&lt;/strong&gt; Are you a guitarist, game developer, or audio enthusiast? What would make this tool actually useful for your projects?&lt;/p&gt;

&lt;p&gt;Feel free to check out the full implementation here: &lt;a href="https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86"&gt;https://dev.to/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward to hearing your ideas!&lt;/p&gt;

</description>
      <category>audio</category>
      <category>discuss</category>
      <category>music</category>
    </item>
    <item>
      <title>I Built a Free, Open-Source Guitar Amp Simulator in C++17 — Here's How</title>
      <dc:creator>SUDIP MONDAL</dc:creator>
      <pubDate>Tue, 24 Mar 2026 20:44:24 +0000</pubDate>
      <link>https://forem.com/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86</link>
      <guid>https://forem.com/sudipmondal2002/i-built-a-free-open-source-guitar-amp-simulator-in-c17-heres-how-1d86</guid>
      <description>&lt;h1&gt;
  
  
  I Built a Free, Open-Source Guitar Amp Simulator in C++17
&lt;/h1&gt;

&lt;p&gt;If you've ever wanted to practice guitar silently through headphones or do quick home recordings without spending $20+/month on commercial amp sim software, this project might interest you.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://github.com/sudip-mondal-2002/Amplitron" rel="noopener noreferrer"&gt;Amplitron&lt;/a&gt;&lt;/strong&gt; — a free, open-source guitar amp simulator that runs on Windows, macOS, and Linux. Here's the technical story behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Commercial guitar amp simulators (Bias FX, Guitar Rig, AmpliTube) are excellent but expensive. If you just want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Practice silently through headphones&lt;/li&gt;
&lt;li&gt;Record a quick demo track&lt;/li&gt;
&lt;li&gt;Experiment with guitar tones&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...paying $20-40/month feels excessive.&lt;/p&gt;

&lt;p&gt;So I built Amplitron. It's MIT licensed, completely free, and runs natively without any cloud or subscription.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;C++17&lt;/strong&gt; — for the core application and DSP engine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PortAudio&lt;/strong&gt; — cross-platform audio I/O (WASAPI/ASIO on Windows, CoreAudio on macOS, ALSA/PipeWire/JACK on Linux)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dear ImGui + SDL2&lt;/strong&gt; — for the visual pedalboard interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CMake&lt;/strong&gt; — build system with vcpkg support on Windows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; — CI/CD for all 3 platforms (builds + tests on every push)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Audio Engine
&lt;/h2&gt;

&lt;p&gt;The most important design consideration for real-time audio is &lt;strong&gt;latency&lt;/strong&gt;. The default configuration runs at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Buffer size: 64 samples&lt;/li&gt;
&lt;li&gt;Sample rate: 48kHz&lt;/li&gt;
&lt;li&gt;Processing latency: ~1.3ms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At 64 samples, you have roughly 1.3ms before the audio buffer underruns. The audio callback does all DSP work in that window.&lt;/p&gt;

&lt;h3&gt;
  
  
  Thread Safety
&lt;/h3&gt;

&lt;p&gt;The trickiest part of building a real-time audio app with a GUI is thread safety. The audio callback runs on a high-priority thread, and the GUI thread modifies the effect chain (add/remove effects, change parameters).&lt;/p&gt;

&lt;p&gt;My solution: the effect chain uses &lt;code&gt;try_lock&lt;/code&gt; on a mutex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Audio callback — never blocks even if GUI is modifying effects&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;AudioEngine&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;processBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;effectChainMutex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;try_lock&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;effect&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;effectChain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;effect&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;isEnabled&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;effect&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;effectChainMutex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unlock&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// If lock fails, just pass audio through unprocessed this buffer&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures glitch-free audio even during heavy UI interactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The DSP Effects
&lt;/h2&gt;

&lt;p&gt;Here's the technical breakdown of each effect:&lt;/p&gt;

&lt;h3&gt;
  
  
  Overdrive (Tube-Style Soft Clipping)
&lt;/h3&gt;

&lt;p&gt;Classic tube amp overdrive uses asymmetric soft clipping. My implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="nf"&gt;overdrive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="n"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Asymmetric soft clipping — positive half clips harder&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;  &lt;span class="c1"&gt;// soft clip positive&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;  &lt;span class="c1"&gt;// softer on negative&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Distortion (Hard Clipping + Waveshaping)
&lt;/h3&gt;

&lt;p&gt;Uses &lt;code&gt;tanh()&lt;/code&gt; for smooth hard clipping with tonal character:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="nf"&gt;distortion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;tanh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;tanh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  EQ (Biquad Filters)
&lt;/h3&gt;

&lt;p&gt;The 3-band parametric EQ uses biquad filters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bass&lt;/strong&gt;: Low shelf filter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mid&lt;/strong&gt;: Peaking filter
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treble/Presence&lt;/strong&gt;: High shelf filter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Biquad filters are the standard for audio DSP — they're computationally cheap (5 multiply-adds per sample) and numerically stable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reverb (Schroeder Algorithm)
&lt;/h3&gt;

&lt;p&gt;Schroeder reverb simulates room acoustics using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4 parallel comb filters&lt;/strong&gt; — create the initial reflections and sustain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 series allpass filters&lt;/strong&gt; — add diffusion and "smear" the sound
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input → [Comb 1] ─┐
Input → [Comb 2] ─┤→ Mix → [Allpass 1] → [Allpass 2] → Output
Input → [Comb 3] ─┤
Input → [Comb 4] ─┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cabinet Simulation
&lt;/h3&gt;

&lt;p&gt;Speaker cabinet emulation uses a combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low-pass rolloff (speakers don't reproduce ultra-high frequencies)&lt;/li&gt;
&lt;li&gt;High-pass rolloff (speakers have a low-frequency cutoff)&lt;/li&gt;
&lt;li&gt;Resonance peak at the speaker's natural frequency&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Visual Pedalboard
&lt;/h2&gt;

&lt;p&gt;The UI is built with Dear ImGui, which is a great fit for real-time audio apps because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immediate mode: redraw every frame, perfect for real-time meters&lt;/li&gt;
&lt;li&gt;Lightweight: minimal overhead&lt;/li&gt;
&lt;li&gt;Custom rendering: easy to make it look like a physical pedal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each pedal is rendered with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Color-coded body (different color per effect type)&lt;/li&gt;
&lt;li&gt;Rotary knobs (drag vertically to adjust — just like physical knobs)&lt;/li&gt;
&lt;li&gt;LED indicator (bypass state)&lt;/li&gt;
&lt;li&gt;Footswitch button to toggle bypass&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cross-Platform CI/CD
&lt;/h2&gt;

&lt;p&gt;Every push to &lt;code&gt;main&lt;/code&gt; automatically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Builds on Windows (MSVC + vcpkg), macOS (Homebrew), and Linux (apt)&lt;/li&gt;
&lt;li&gt;Runs the full test suite (64+ tests covering all 9 effects)&lt;/li&gt;
&lt;li&gt;Creates a release with binaries for all platforms&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was surprisingly easy to set up with GitHub Actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;VST3 plugin version (so it works inside DAWs)&lt;/li&gt;
&lt;li&gt;More amp models (currently just the pedal chain approach)&lt;/li&gt;
&lt;li&gt;IR-based cabinet simulation (using impulse responses for more realistic cab sound)&lt;/li&gt;
&lt;li&gt;MIDI control for footswitch bypass&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (+ downloads)&lt;/strong&gt;: &lt;a href="https://github.com/sudip-mondal-2002/Amplitron" rel="noopener noreferrer"&gt;https://github.com/sudip-mondal-2002/Amplitron&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://amplitron.sudipmondal.co.in" rel="noopener noreferrer"&gt;https://amplitron.sudipmondal.co.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product Hunt&lt;/strong&gt;: &lt;a href="https://www.producthunt.com/products/amplitron" rel="noopener noreferrer"&gt;https://www.producthunt.com/products/amplitron&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's MIT licensed and completely free. Contributions welcome!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What would you add to a guitar amp simulator? I'd love to hear what effects or features matter most to you.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>opensource</category>
      <category>audio</category>
      <category>music</category>
    </item>
  </channel>
</rss>
