title: How to implement Equalizer in android
body: <p>I have to implement an Equalizer in android and i also find <a href="http://kevinboone.net/android_simple_eq.html" rel="nofollow noreferrer">source code here</a></p>
  
  <p>But i have no idea about NumberOfBands and BandLevelRange(What are they?) and how can i handle them.</p>
  
  <p>the given code i have shown you is from the source code i mentioned.  </p>
  
  <pre><code>eq = new Equalizer(0, 0);
  
          if (eq != null)
          {
              eq.setEnabled(true);
  
              int num_bands = eq.getNumberOfBands();
  
              num_sliders = num_bands;
  
              short r[] = eq.getBandLevelRange();
  
              min_level = r[0];
  
              max_level = r[1];
  
              for (int i = 0; i &lt; num_sliders &amp;&amp; i &lt; MAX_SLIDERS; i++) 
              {
                  int[] freq_range = eq.getBandFreqRange((short) i);
  
                  sliders[i].setOnSeekBarChangeListener(this);
  
                  slider_labels[i].setText(formatBandLabel(freq_range));
              }
  
          }
  
          for (int i = num_sliders; i &lt; MAX_SLIDERS; i++) 
          {
              sliders[i].setVisibility(View.GONE);
  
              slider_labels[i].setVisibility(View.GONE);
          }
  
          bb = new BassBoost(0, 0);
  
          if (bb != null) 
          {
          }
          else 
          {
              bass_boost.setVisibility(View.GONE);
  
              bass_boost_label.setVisibility(View.GONE);
          }
  
          updateUI();
  </code></pre>
  
  <p>And in onProgresschanged it does</p>
  
  <pre><code>@Override
      public void onProgressChanged(SeekBar seekBar, int level, boolean fromTouch) {
  
          if (seekBar == bass_boost) {
              bb.setEnabled(level &gt; 0 ? true : false);
  
              bb.setStrength((short) level); // Already in the right range 0-1000
          } else if (eq != null) {
              int new_level = min_level + (max_level - min_level) * level / 100;
  
              for (int i = 0; i &lt; num_sliders; i++) {
                  if (sliders[i] == seekBar) {
                      eq.setBandLevel((short) i, (short) new_level);
  
                      break;
                  }
              }
          }
  
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/wsJBK.png" alt="Desired equilizer"></p>
  
  <p>I have to create it similar to the above image but don't what is 60, 3k, 14k, and what -15db to  +15db means. </p>
  
  <p><strong>Edit</strong> </p>
  
  <p><strong>I understand what it does,it changes frequency of each band, but what happen when we increase or decrease frequency. At which stage i get the maximum sound output and what stage i get the minimum sound output.</strong></p>