📄 pcdra.m
字号:
% Script : select a knob on the pitch wave on the GCI display using the mouse
% and move the knob up or down
% pcdra.m is a call_function executed by "wave_slt" "wave_up" "wave_down"
% on figure(Pset_f).
figure(Pdis_f);
if UP==0 %% select the knob
% use the mouce to select the knob
[xx,yy]=ginput(1);
% 2. find the knob in the neighborhood of the mouse pointer
[dum,knob_idx]=min( abs(xx-knob_xx) );
xx=knob_xx(knob_idx);
o_yy=knob_yy(knob_idx);
% 3. plot the selected point
hold on;
plot(xx,o_yy,'co')
hold off;
set(wave_up,'Visible','on');
set(wave_down,'Visible','on');
else %% move the knob up or down
xx=knob_xx(knob_idx);
yy=knob_yy(knob_idx);
if exist('o_yy')==0
o_yy=yy;
end
v=axis;
dev=v(4)/50;
if UP==1 %%%% move the selected knob up
yy=yy+dev;
elseif UP==-1 %%%% move the selected knob down
yy=yy-dev;
end
knob_yy(knob_idx)=yy;
% plot the labeled points and the fit of the data
NR=length(seglens1);
sp=1; % starting point of one segment
for ii=1:NR
ep=seglens1(ii)+sp-1; % ending point of one segment
% plot the pitch wave
plot( gcidx1(sp:ep),pw1(sp:ep),'k' ); hold on;
% plot the modeled pitch wave
plot( gcidx1(sp:ep),mwave(sp:ep),'g--' );
% plot the pitch jitter
plot(gcidx1(sp:ep),jitter(sp:ep),'r');
sp=ep+1;
end
% plot the spline knobs
plot(knob_xx,knob_yy,'g*');
title('Pitch Wave (black line) and Pitch Jitter (red line) ');
% plot the selected knob
plot(xx, yy, 'cx'); % new position
plot(xx,o_yy,'co'); % original position
hold off;
end
clear xx yy UP;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -