Sound Cards - fo-am/sonic-kayaks GitHub Wiki
Three USB sound cards have been used on the project. They are all the same design (with a flexible USB cable, two headphones and one microphone jack. They have been labelled 2015 A (the original), 2018 A and 2018 B, both bought in May 2018.
Testing for consistency
Using a white noise generating website, a sound sample was recorded with each sound card with Audcacity and analysed in Matlab by Jo Garrett.
Matlab code
%Approx 40 s white noise each
%Fs = sampling frequency
[a2015, Fs]=audioread('white_noise_2015a.wav');
[a2018, Fs]=audioread('white_noise_2018a.wav');
[b2018, Fs]=audioread('white_noise_2018b.wav');
% 50 % overlapping windows of 1 s
start=1:Fs/2:numel(b2018);
end_window = Fs:Fs/2:numel(b2018);
for i = 1:length(end_window)
%read in 1 s at a time
%for each wav file
data=a2015(start(i):end_window(i));
%apply fft
data_fft=fft(data);
Y=(data_fft.*conj(data_fft))/(Fs^2);
Z = fftshift(Y);
B(:,i) = Z(Fs/2+1:end);
end
%for each wav file
a2015_output=B;
mean_a2015=mean(a2015_output,2);
mean_b2018=mean(b2018_output,2);
mean_a2018=mean(a2018_output,2);
hold off
plot(10:18000,10*log10(mean_a2015(10:18000)),'k')
hold on
plot(10:18000,10*log10(mean_a2018(10:18000)), 'r')
plot(10:18000,10*log10(mean_b2018(10:18000)),'b')
set(gca, 'XScale','log')
xlabel('Frequency (Hz)', 'FontSize',12)
ylabel('dB re 1 µPa^2 Hz^-^1', 'FontSize',12)
legend('2015a','2018a','2018b')
set(gca,'XLim',[10,18000])