Hello!
I am curious if anyone has had success running the Audio Library at 120 Mhz?
Specifically I am trying to get AudioAnalyzeNoteFrequency to work with AudioInputAnalog (no Audio shield, just analog input pins). My sketch runs fine at 96Mhz and 144Mhz, but notefreq and peak don't return anything when its running at 120Mhz.
Here is my sketch (just a modified version of the NoteFrequency example)
I am curious if anyone has had success running the Audio Library at 120 Mhz?
Specifically I am trying to get AudioAnalyzeNoteFrequency to work with AudioInputAnalog (no Audio shield, just analog input pins). My sketch runs fine at 96Mhz and 144Mhz, but notefreq and peak don't return anything when its running at 120Mhz.
Here is my sketch (just a modified version of the NoteFrequency example)
Code:
#include <Wire.h>
#include <Audio.h>
#include <analyze_notefreq.h>
// GUItool: begin automatically generated code
AudioInputAnalog adc1(A9); //xy=401.2000274658203,269.20001220703125
AudioAnalyzePeak peak1;
AudioAnalyzeNoteFrequency notefreq; //xy=894.2000274658203,440.2000274658203
AudioConnection patchCord1(adc1, notefreq);
AudioConnection patchCord2(adc1, peak1);
// GUItool: end automatically generated code
void setup(){
delay(10);
AudioMemory(50);
Serial.begin(9600);
delay(10);
notefreq.begin(.15);
Serial.println("sizeof adc1: " + String(sizeof(adc1)));
Serial.println("sizeof notefreq: " + String(sizeof(notefreq)));
Serial.println("sizeof patchCord1: " + String(sizeof(patchCord1)));
pinMode(13, OUTPUT);
}
void loop(){
delay(100);
digitalWrite(13, HIGH);
delay(100);
if (notefreq.available()) {
float note = notefreq.read();
float prob = notefreq.probability();
Serial.printf("Note: %3.2f | Probability: %.2f\n", note, prob);
Serial.println(String(millis() )+ " -- " + String(AudioMemoryUsage()));
}
if (peak1.available()){
Serial.println("peaks1: " + String(peak1.read()));
}
digitalWrite(13, LOW);
}