Yes, how for sure I can't say. Web Doc page is here:
Teensy Audio Library it links to here:
Audio System Design Tool
Using T_FFT_SINEWAVE.ino sample above (the included analyze/fft.ino) you'll see the SINEWAVE as input to a patch cord.
From the Design tool you drag and drop lay out to what you want (items on left and notes on right) and it generates the init code like this from Export in the browser:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
AudioInputAnalog adc1; //xy=143,73.99998474121094
AudioAnalyzeFFT1024 fft1024_1; //xy=311.79998779296875,73.19999694824219
AudioConnection patchCord1(adc1, fft1024_1);
// GUItool: end automatically generated code
Given this I assume you just adjust the patch cord setting in the FFT sample to specify a PIN ( "adc1" ) and that will sample from that point. This is my next step with my analog mic.
I'm still using the FFT_SINEWAVE.ino as my basis and have done some edits to see the time taken and merged in the MemoryAndCpuUsage.ino so I can see CPU and RAM usage in this sample and then recompiling for 512 and 1024 FFT's.
QUESTION:
> Is this the common/best/intended process?
> After Setup can I changed the processing type in loop()? i.e. Stop 1024 and Start 512?
> I looked for an .end() function and didn't see it.
> Will it quit if I just stop doing .read()? What about the resources?
> Similarly can I cycle through the FFT Methods while in loop() or do I need to restart?
> I'm not even sure what I don't know yet, but from the sample I found CPU higher on 1024, but 512 takes twice as long at 25% of CPU usage?
> Can I record/capture the Sample 'analog mic' data and create a way to feed it in statically like the Sine wave
My status info on my 120 sample loop:
// CPU%, Mem Use, cum loop() pass count sample Ready and Not, Samples per loop, Per sample time, and time for Samples
// fft1024=52,52 all=53.31,53.92 Memory: 4,8 Ready:240 Not:967795 # Samples:120 Time per sample:11 Sample Time:1393
// fft256=12,12 all=13.84,14.34 Memory: 1,2 Ready:240 Not:2160366 # Samples:120 Time per sample:23 Sample Time:2785