Running Audio Library at 120Mhz

Status
Not open for further replies.

tenkai

Well-known member
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)
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);

}
 
Seems like it. Its hard to test AudioInputAnalog all on its own, but I can't it it to work with AudioAnalyzeFFT1024 either.

I am digging up my audio shield and will test AudioAnalyzeFFT1024 at 120Mhz without AudioInputAnalog to verify that works, in which case I would be fairly confident that it doesn't work with 120Mhz as well.
 
Status
Not open for further replies.
Back
Top