Wiki source for OctaveGeneratingATestFile


Show raw source

=====Test File Generator for Audio Latency Measurement=====

See [[AudioLatencyMeasurement Audio Latency Measurement]]

%%(matlab;;audiogen.m)
% Andraes Tobola, March 2015
% Generates a test file for audio latency measurement
clc
clear

fs = 44100; % Sampling rate
fn = 'latency_test.wav'; % Filenemae

t_on = 100E-3; % Duration of noise
t_interv = 1; % Make noise each t_interv seconds
t_off = t_interv - t_on;
N = 10;

% Determinate number of samples to be on and for scilence
L_on = ceil(t_on * fs); % noise
L_off = ceil(t_off * fs); % silence

% Generate parts
x_noise = randn(1, L_on);
x_silentium = zeros(1, L_off);

% Construct sequence
x = [x_noise x_silentium];
for k=1:(N-1)
x = [x x];
end


% Normalize
m = max([max(x) -min(x)]);
x = x / m;

ausave(fn, x, fs)





%%

----
Siehe auch {{backlinks}}
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki