Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Constructor is undefined - Minim AudioInput

$
0
0
Right... and there are two tabs in that file. Frequency Energy and BeatListener. 

BeatListener is it's own class. You have to include it with any modified examples you make. 
It looks like this: 

  1. class BeatListener implements AudioListener
  2. {
  3.   private BeatDetect beat;
  4.   private AudioPlayer source;
  5.   
  6.   BeatListener(BeatDetect beat, AudioPlayer source)
  7.   {
  8.     this.source = source;
  9.     this.source.addListener(this);
  10.     this.beat = beat;
  11.   }
  12.   
  13.   void samples(float[] samps)
  14.   {
  15.     beat.detect(source.mix);
  16.   }
  17.   
  18.   void samples(float[] sampsL, float[] sampsR)
  19.   {
  20.     beat.detect(source.mix);
  21.   }
  22. }
The one other thing you have to do is change it to accept a LineIn instead of a AudioPlayer... 

Viewing all articles
Browse latest Browse all 1768

Trending Articles