cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="audio green-audio-player">
  <div class="loading">
    <div class="spinner"></div>
  </div>
  <div class="play-pause-btn">  
    <svg xmlns="http://www.w3.org/2000/svg" width="18" height="24" viewBox="0 0 18 24">
      <path fill="#566574" fill-rule="evenodd" d="M18 12L0 24V0" class="play-pause-icon" id="playPause"/>
    </svg>
  </div>
  
  <div class="controls">
    <span class="current-time">0:00</span>
    <div class="slider" data-direction="horizontal">
      <div class="progress">
        <div class="pin" id="progress-pin" data-method="rewind"></div>
      </div>
    </div>
    <span class="total-time">0:00</span>
  </div>
  
  <div class="volume">
    <div class="volume-btn">
      <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
        <path fill="#566574" fill-rule="evenodd" d="M14.667 0v2.747c3.853 1.146 6.666 4.72 6.666 8.946 0 4.227-2.813 7.787-6.666 8.934v2.76C20 22.173 24 17.4 24 11.693 24 5.987 20 1.213 14.667 0zM18 11.693c0-2.36-1.333-4.386-3.333-5.373v10.707c2-.947 3.333-2.987 3.333-5.334zm-18-4v8h5.333L12 22.36V1.027L5.333 7.693H0z" id="speaker"/>
      </svg>
    </div>
    <div class="volume-controls hidden">
      <div class="slider" data-direction="vertical">
        <div class="progress">
          <div class="pin" id="volume-pin" data-method="changeVolume"></div>
        </div>
      </div>
    </div>
  </div>
  
  <audio crossorigin loop>
    <source src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/355309/equalizer.mp3" type="audio/mpeg">
  </audio>
</div>

<div class="equalizer">
  <div class="section">
    <div class="title">HF</div>
    <div class="sliders">
      <div class="range-slider">
        <span class="scope">22</span>
        <input type="range" class="vertical" min="4700" max="22000" step="100" value="4700" data-filter="highShelf" data-param="frequency">
        <span class="scope scope-min">4.7</span>
        <span class="param">kHz</span>  
      </div>
      <div class="range-slider">
        <span class="scope">50</span>
        <input type="range" class="vertical" min="-50" max="50" value="50" data-filter="highShelf" data-param="gain">
        <span class="scope scope-min">-50</span>
        <span class="param">dB</span>  
      </div>
    </div>
  </div>
    
  <div class="section">
    <div class="title">LF</div>
    <div class="sliders">
      <div class="range-slider">
        <span class="scope">220</span>
        <input type="range" class="vertical" min="35" max="220" step="1" value="35" data-filter="lowShelf" data-param="frequency">
        <span class="scope scope-min">35</span>
        <span class="param">Hz</span>  
      </div>
      <div class="range-slider">
        <span class="scope">50</span>
        <input type="range" class="vertical" min="-50" max="50" value="50" data-filter="lowShelf" data-param="gain">
        <span class="scope scope-min">-50</span>
        <span class="param">dB</span>  
      </div>
    </div>
  </div>
      
  <div class="section">
    <div class="title">HMF</div>
    <div class="sliders">
      <div class="range-slider">
        <span class="scope">5.9</span>
        <input type="range" class="vertical" min="800" max="5900" step="100" value="800" data-filter="highPass" data-param="frequency">
        <span class="scope scope-min">0.8</span>
        <span class="param">kHz</span>  
      </div>
      <div class="range-slider">
        <span class="scope">12</span>
        <input type="range" class="vertical" min="0.7" max="12" step="0.1" value="0.7" data-filter="highPass" data-param="Q">
        <span class="scope scope-min">0.7</span>
        <span class="param">Q</span>  
      </div>
    </div>
  </div>  
    
  <div class="section">
    <div class="title">LMF</div>
    <div class="sliders">
      <div class="range-slider">
        <span class="scope">1600</span>
        <input type="range" class="vertical" min="80" max="1600" step="10" value="880" data-filter="lowPass" data-param="frequency">
        <span class="scope scope-min">80</span>
        <span class="param">Hz</span>  
      </div>
      <div class="range-slider">
        <span class="scope">12</span>
        <input type="range" class="vertical" min="0.7" max="12" step="0.1" value="0.7" data-filter="lowPass" data-param="Q">
        <span class="scope scope-min">0.7</span>
        <span class="param">Q</span>  
      </div>
    </div>
  </div>
  
</div>
            
          
!
            
              body {
  flex-direction: column;
  font-family: 'Roboto', sans-serif;
  margin: 0;
}

.equalizer {
  display: flex;
}

.section {
  display: flex;
  text-align: center;
  flex-direction: column;
  margin: 0 8px;
  .title {
    line-height: 40px;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
  }
  .sliders {
    display: flex;
  }
}

.range-slider {
  width: 30px;
  height: 152px;
  background-color: rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 8px;
  margin-left: 4px;
  margin-right: 4px;
  border-radius: 4px;
  .param {
    color: #f7f7f7;
    font-size: 14px;
    line-height: 14px;
  }
  .scope {
    color: #f7f7f7;
    font-size: 12px;
    line-height: 12px;
    &-min {
      margin-top: 35px;
    }
  }
  input[type=range].vertical {
    transform: rotateZ(-90deg);
    width: 104px;
    margin-top: 44px;
  }
}


input[type=range] {
  -webkit-appearance: none;
  margin: 10px 0;
  width: 100%;
  background: transparent;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  animate: 0.2s;
  box-shadow: 0px 0px 0px #000000;
  background: #D8D8D8;
  border-radius: 3px;
  border: 0px solid #000000;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.32);
  border: none;
  height: 16px;
  width: 16px;
  border-radius: 8px;
  background: #44BFA3;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #D8D8D8;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  animate: 0.2s;
  background: #D8D8D8;
  border-radius: 3px;
  border: none;
}
input[type=range]::-moz-range-thumb {
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.32);
  border: none;
  height: 16px;
  width: 16px;
  border-radius: 8px;
  background: #44BFA3;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  animate: 0.2s;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #D8D8D8;
  border: none;
  border-radius: 6px;
}
input[type=range]::-ms-fill-upper {
  background: #D8D8D8;
  border: none;
  border-radius: 6px;
}
input[type=range]::-ms-thumb {
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.32);
  border: none;
  height: 16px;
  width: 16px;
  border-radius: 8px;
  background: #44BFA3;
  cursor: pointer;
}
input[type=range]:focus::-ms-fill-lower {
  background: #D8D8D8;
}
input[type=range]:focus::-ms-fill-upper {
  background: #D8D8D8;
}
            
          
!
            
              var context = new (window.AudioContext || window.webkitAudioContext)();
var mediaElement = document.querySelector('audio');
var source = context.createMediaElementSource(mediaElement);
var highShelf = context.createBiquadFilter();
var lowShelf = context.createBiquadFilter();
var highPass = context.createBiquadFilter();
var lowPass = context.createBiquadFilter();

source.connect(highShelf);
highShelf.connect(lowShelf);
lowShelf.connect(highPass);
highPass.connect(lowPass);
lowPass.connect(context.destination);

highShelf.type = "highshelf";
highShelf.frequency.value = 4700;
highShelf.gain.value = 50;

lowShelf.type = "lowshelf";
lowShelf.frequency.value = 35;
lowShelf.gain.value = 50;

highPass.type = "highpass";
highPass.frequency.value = 800;
highPass.Q.value = 0.7;

lowPass.type = "lowpass";
lowPass.frequency.value = 880;
lowPass.Q.value = 0.7;

var ranges = document.querySelectorAll('input[type=range]');
ranges.forEach(function(range){
  range.addEventListener('input', function() {
    window[this.dataset.filter][this.dataset.param].value = this.value;
  });
});


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console