📄 resthandle.m
字号:
function outputPv=restHandle(inputPv, useRest)
% restHandle: Rest handling for melody recognition
% Usage: outputPv=restHandle(inputPv, useRest)
% inputPv: input PV (pitch vector)
% useRest: 0 ===> remove rests, 1 ===> replace a rest by its previous non-rest pitch
% Roger Jang, 20040613
outputPv=inputPv;
% ====== Cut out leading/trailing rests
while outputPv(1)==0; outputPv(1)=[]; end
while outputPv(end)==0; outputPv(end)=[]; end
% ====== Handle in-between rests
if ~useRest
outputPv(outputPv==0)=[]; %
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -