Y_mag_offset = NORMALIZE(Y_mag) - threshold
# hard cut based on sign
hard_cut = (SIGN(Y_mag_offset)+1) / 2
# apply the hard-cut filter
X_mag_cut = hard_cut * X_mag
# rephase
X_mag_rephased = COMPLEX_MUL(X_pha, X_mag_cut)
# inverse stft
x_new = ISTFT(X_mag_rephased)
# add
output = x_new * step_size + y
return output</code></pre>
<p><span id="function" label="function">[function]</span></p>
<p>Therefore, a hard-cut filter (Figure <a href="#fig:melspecs" data-reference-type="ref" data-reference="fig:melspecs">