def _enhance_bass(self):
if not self._bass_enhancement:<EOL><INDENT>return<EOL><DEDENT>bass_span = DEFAULT_SPANS[BASS_INDEX]<EOL>enhanced_spans = []<EOL>for i, best_span_here in enumerate(self._best_span_at_each_point):<EOL><INDENT>best_smooth_index = DEFAULT_SPANS.index(best_span_here)<EOL>best_span = DEFAULT_SPANS[best_smooth_index]<EOL>best_span_residual = self._residual_smooths[best_smooth_index][i]<EOL>bass_span_residual = self._residual_smooths[BASS_INDEX][i]<EOL>if <NUM_LIT:0> < best_span_residual < bass_span_residual:<EOL><INDENT>ri = best_span_residual / bass_span_residual<EOL>bass_factor = ri ** (<NUM_LIT> - self._bass_enhancement)<EOL>enhanced_spans.append(best_span + (bass_span - best_span) * bass_factor)<EOL><DEDENT>else:<EOL><INDENT>enhanced_spans.append(best_span)<EOL><DEDENT><DEDENT>self._best_span_at_each_point = enhanced_spans<EOL>
Update best span choices with bass enhancement as requested by user (Eq. 11).