NoteFrequency HELP!!! Live input

Status
Not open for further replies.
What do I need to add to my code to make NoteFrequency example work for a live input.

I tired the design tool but nothing is printing out in the serial monitor.

I have the teensy 3.6 and audio shield

I get the FFT example to work but not the Note Frequency example for live input to work.

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=103.00000762939453,57.000000953674316
AudioAnalyzeNoteFrequency notefreq;      //xy=297,56
AudioConnection          patchCord1(i2s1, 0, notefreq, 0);
// GUItool: end automatically generated code

IntervalTimer playNoteTimer;


//---------------------------------------------------------------------------------------
void setup() {

  Serial.begin(9600);
    AudioMemory(30);
    /*
     
     *  threshold, this is good number.
     */
      notefreq.begin(.15);
    pinMode(LED_BUILTIN, OUTPUT);
    
   
  
}

void loop() {
    // read back fundamental frequency
    if (notefreq.available()) {
        float note = notefreq.read();
       
        Serial.printf("Note: %3.2f \n", note);
    }
}
 
Status
Not open for further replies.
Back
Top