congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Equalizer
Code IndexAdd Tabnine to your IDE (free)

How to use
Equalizer
in
javazoom.jl.decoder

Best Java code snippets using javazoom.jl.decoder.Equalizer (Showing top 20 results out of 315)

origin: tulskiy/musique

/**
 * Retrieves an array of floats whose values represent a
 * scaling factor that can be applied to linear samples
 * in each band to provide the equalization represented by
 * this instance.
 *
 * @return an array of factors that can be applied to the
 * subbands.
 */
float[] getBandFactors() {
  float[] factors = new float[BANDS];
  for (int i = 0, maxCount = BANDS; i < maxCount; i++) {
    factors[i] = getBandFactor(settings[i]);
  }
  return factors;
}
origin: javazoom/jlayer

public void setFrom(float[] eq)
{
  reset();
  int max = (eq.length > BANDS) ? BANDS : eq.length;
  
  for (int i=0; i<max; i++)
  {
    settings[i] = limit(eq[i]);
  }
}
origin: javazoom/jlayer

/**
 * Sets the bands of this equalizer to the value the bands of
 * another equalizer. Bands that are not present in both equalizers are ignored. 
 */
public void setFrom(Equalizer eq)
{
  if (eq!=this)
  {
    setFrom(eq.settings);
  }
}
 
origin: tulskiy/musique

public void setEqualizer(Equalizer eq) {
  if (eq == null)
    eq = Equalizer.PASS_THRU_EQ;
  equalizer.setFrom(eq);
  float[] factors = equalizer.getBandFactors();
  if (filter1 != null)
    filter1.setEQ(factors);
  if (filter2 != null)
    filter2.setEQ(factors);
}
origin: com.googlecode.soundlibs/jlayer

public float setBand(int band, float neweq)
{
  float eq = 0.0f;
  
  if ((band>=0) && (band<BANDS))
  {
    eq = settings[band];
    settings[band] = limit(neweq);
  }
  
  return eq;		
}
 
origin: tulskiy/musique

private void initialize(Header header)
    throws DecoderException {
  // REVIEW: allow customizable scale factor
  float scalefactor = 32700.0f;
  int mode = header.mode();
  int layer = header.layer();
  int channels = mode == Header.SINGLE_CHANNEL ? 1 : 2;
  // set up output buffer if not set up by client.
  if (output == null)
    output = new SampleBuffer(header.frequency(), channels);
  float[] factors = equalizer.getBandFactors();
  filter1 = new SynthesisFilter(0, scalefactor, factors);
  // REVIEW: allow mono output for stereo
  if (channels == 2)
    filter2 = new SynthesisFilter(1, scalefactor, factors);
  outputChannels = channels;
  outputFrequency = header.frequency();
  initialized = true;
}
origin: stackoverflow.com

  releaseEqualizer();
mEqualizer = new Equalizer(0, 0);
mEqualizer.setEnabled(true);
mEqualizer.setControlStatusListener(this);
origin: javazoom/jlayer

public void setEqualizer(Equalizer eq)
{
  if (eq==null)
    eq = Equalizer.PASS_THRU_EQ;
  
  equalizer.setFrom(eq);
  
  float[] factors = equalizer.getBandFactors();
  if (filter1!=null)
    filter1.setEQ(factors);
  
  if (filter2!=null)
    filter2.setEQ(factors);            
}
 
origin: javazoom/jlayer

public float setBand(int band, float neweq)
{
  float eq = 0.0f;
  
  if ((band>=0) && (band<BANDS))
  {
    eq = settings[band];
    settings[band] = limit(neweq);
  }
  
  return eq;		
}
 
origin: javazoom/jlayer

private void initialize(Header header)
  throws DecoderException
{
  
  // REVIEW: allow customizable scale factor
  float scalefactor = 32700.0f;
  
  int mode = header.mode();
  int layer = header.layer();
  int channels = mode==Header.SINGLE_CHANNEL ? 1 : 2;
        
  // set up output buffer if not set up by client.
  if (output==null)
    output = new SampleBuffer(header.frequency(), channels);
  
  float[] factors = equalizer.getBandFactors();
  filter1 = new SynthesisFilter(0, scalefactor, factors);
      // REVIEW: allow mono output for stereo
  if (channels==2) 
    filter2 = new SynthesisFilter(1, scalefactor, factors);
  outputChannels = channels;
  outputFrequency = header.frequency();
  
  initialized = true;
}
 
origin: com.googlecode.soundlibs/jlayer

public void setFrom(float[] eq)
{
  reset();
  int max = (eq.length > BANDS) ? BANDS : eq.length;
  
  for (int i=0; i<max; i++)
  {
    settings[i] = limit(eq[i]);
  }
}
origin: com.googlecode.soundlibs/jlayer

public void setEqualizer(Equalizer eq)
{
  if (eq==null)
    eq = Equalizer.PASS_THRU_EQ;
  
  equalizer.setFrom(eq);
  
  float[] factors = equalizer.getBandFactors();
  if (filter1!=null)
    filter1.setEQ(factors);
  
  if (filter2!=null)
    filter2.setEQ(factors);            
}
 
origin: com.googlecode.soundlibs/jlayer

/**
 * Sets the bands of this equalizer to the value the bands of
 * another equalizer. Bands that are not present in both equalizers are ignored. 
 */
public void setFrom(Equalizer eq)
{
  if (eq!=this)
  {
    setFrom(eq.settings);
  }
}
 
origin: tulskiy/musique

public float setBand(int band, float neweq) {
  float eq = 0.0f;
  if ((band >= 0) && (band < BANDS)) {
    eq = settings[band];
    settings[band] = limit(neweq);
  }
  return eq;
}
origin: com.googlecode.soundlibs/jlayer

/**
 * Retrieves an array of floats whose values represent a
 * scaling factor that can be applied to linear samples
 * in each band to provide the equalization represented by
 * this instance. 
 * 
 * @return    an array of factors that can be applied to the
 *            subbands.
 */
float[] getBandFactors()
{
  float[] factors = new float[BANDS];
  for (int i=0, maxCount=BANDS; i<maxCount; i++)
  {
    factors[i] = getBandFactor(settings[i]);
  }
  
  return factors;
}
 
origin: com.googlecode.soundlibs/jlayer

private void initialize(Header header)
  throws DecoderException
{
  
  // REVIEW: allow customizable scale factor
  float scalefactor = 32700.0f;
  
  int mode = header.mode();
  int layer = header.layer();
  int channels = mode==Header.SINGLE_CHANNEL ? 1 : 2;
        
  // set up output buffer if not set up by client.
  if (output==null)
    output = new SampleBuffer(header.frequency(), channels);
  
  float[] factors = equalizer.getBandFactors();
  filter1 = new SynthesisFilter(0, scalefactor, factors);
      // REVIEW: allow mono output for stereo
  if (channels==2) 
    filter2 = new SynthesisFilter(1, scalefactor, factors);
  outputChannels = channels;
  outputFrequency = header.frequency();
  
  initialized = true;
}
 
origin: tulskiy/musique

public void setFrom(float[] eq) {
  reset();
  int max = (eq.length > BANDS) ? BANDS : eq.length;
  for (int i = 0; i < max; i++) {
    settings[i] = limit(eq[i]);
  }
}
origin: pdudits/soundlibs

public void setEqualizer(Equalizer eq)
{
  if (eq==null)
    eq = Equalizer.PASS_THRU_EQ;
  
  equalizer.setFrom(eq);
  
  float[] factors = equalizer.getBandFactors();
  if (filter1!=null)
    filter1.setEQ(factors);
  
  if (filter2!=null)
    filter2.setEQ(factors);            
}
 
origin: tulskiy/musique

/**
 * Sets the bands of this equalizer to the value the bands of
 * another equalizer. Bands that are not present in both equalizers are ignored.
 */
public void setFrom(Equalizer eq) {
  if (eq != this) {
    setFrom(eq.settings);
  }
}
origin: pdudits/soundlibs

public float setBand(int band, float neweq)
{
  float eq = 0.0f;
  
  if ((band>=0) && (band<BANDS))
  {
    eq = settings[band];
    settings[band] = limit(neweq);
  }
  
  return eq;		
}
 
javazoom.jl.decoderEqualizer

Javadoc

The Equalizer class can be used to specify equalization settings for the MPEG audio decoder.

The equalizer consists of 32 band-pass filters. Each band of the equalizer can take on a fractional value between -1.0 and +1.0. At -1.0, the input signal is attenuated by 6dB, at +1.0 the signal is amplified by 6dB.

Most used methods

  • getBandFactor
    Converts an equalizer band setting to a sample factor. The factor is determined by the function f =
  • getBandFactors
    Retrieves an array of floats whose values represent a scaling factor that can be applied to linear s
  • limit
  • reset
    Sets all bands to 0.0
  • setFrom
  • <init>

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now