%% Compare Loudness Before and After Audio Processing
% Measure momentary and short-term loudness before and after compression of
% a streaming audio signal in Simulink(R).
%
open_system('LoudnessMeterBasicExample')

%% 
% 1. Open the Time Scope and Compressor blocks.
%
% 2. Run the model. To switch between listening to the compressed
% signal and the original signal, double-click the switch.
%
% 3. Observe the effect of compression on loudness by tuning the Compressor
% block parameters and viewing the momentary loudness on the Time Scope
% block.
%
open_system('LoudnessMeterBasicExample/Time Scope')
sim('LoudnessMeterBasicExample',6)

%%
% 4. Stop the model. For both Loudness blocks, replace momentary loudness
% with short-term loudness as input to the Matrix Concatenate block. Run
% the model again and observe the effect of compression on short-term
% loudness.
%
close_system('LoudnessMeterBasicExample')

%% 
% Copyright 2012 The MathWorks, Inc.