I also have been trying to digitize audio signals from a preamplified electret microphone using Arduino and Matlab/Simulink. I'm having trouble because of the high frequency of sound signals (20kHz or so)
From matlab i used the "GetAnalogInput.m" file to retrieve data, but by using the "tic-toc" matlab functions and seeing the final plot, it is evident that the sample frequency is low, around 55Hz.
From Simulink, there is the advantage that one can set the sample time of the Analog Input Block, but i am having problems retrieving the data. I created a model to deploy on arduino that reads the adc input and sends it to serial, and a model to run on PC that reads the serial data and saves it to workspace using scope.
I attached the .m file and image plotted from Matlab aswell as the Simulink models to run on arduino and PC.
Any help would be very appreciated.