topical media & game development

talk show tell print

graphic-processing-site-examples-Libraries-Minim--Sound--FrequencyEnergy-BeatListener.pde / pde



  class BeatListener implements AudioListener
  {
    private BeatDetect beat;
    private AudioPlayer source;
    
    BeatListener(BeatDetect beat, AudioPlayer source)
    {
      this.source = source;
      this.source.addListener(this);
      this.beat = beat;
    }
    
    void samples(float[] samps)
    {
      beat.detect(source.mix);
    }
    
    void samples(float[] sampsL, float[] sampsR)
    {
      beat.detect(source.mix);
    }
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.