% Mambila declination and final lowering
%
% Louis Goldstein
% 14 March 2020
% Model the results in Table 1 of Connell's article
% Idea:
% Over time, the internal target F0 of all four tones show decrease
% in F0, under the control of a 1st order linear declination system
% for each tone.
%
% The tone targets also repel each other with a force that is inversely
% proportional to the current f0 difference between the two tones.
%
% Individual speakers differ in the overall scaling of the repulse force
% (r)
% Set r = 20 for S1-S3, r = 10 for S4-S5
%
% 24 March 2020: Add low boundary tone.
% All tones are attraction boundary tone, with strength inversely
% proportional to the fifference between tone target and boundary target
clear
ntones = 4;
% Set the initial f0 value of each tone
T(1,1) = 200;
T(2,1) = 180;
T(3,1) = 160;
T(4,1) = 140;
%Set the goal value for the declination system for each tone
for j = 1:ntones
Tgoal(j) = T(j,1) - 15;
end
L_ = Tgoal (4) - 20; % boundary "tone" target
F = zeros(ntones, ntones); % F is the matrix of inter-tone repulsive forces
k = .1; %stiffness of the declination systems
r = 20; % scaling of the repulsive forces
a = 200; % scaling of attractive force
nsyll = 10;
for i = 2:nsyll
for j = 1:ntones
for l = 1:ntones
if ~(j==l)
F(j,l) = r./(T(j,i-1) - T(l,i-1)); % repulsive forces
end
end
push = sum(F,1); % push total amount of force on a given tone from all the others
dT = -k*T(j, i-1) + k*Tgoal(j) - push(j); % dynamics
if i == nsyll
dT = dT - a./(T(j,i-1) - L_); % attraction to boundary tone
end
T(j,i) = T(j, i-1) + dT;
end
end
syll = 1:nsyll;
plot (syll, T, '-o', 'LineWidth' ,2);