Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加一个音高修正标注脚本 #80

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
删点没用的变量
  • Loading branch information
djkcyl committed Apr 24, 2023
commit f489e25050dead70acf166463f6c3bfe7847be94
12 changes: 8 additions & 4 deletions utils/pitch_corrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.ticker import MultipleLocator
from rich.progress import Progress, BarColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn
from rich.progress import (
Progress,
BarColumn,
TextColumn,
TimeElapsedColumn,
TimeRemainingColumn,
)

from utils.binarizer_utils import get_pitch_parselmouth

Expand Down Expand Up @@ -98,9 +104,7 @@ def plot_notes(self, note_seq, note_dur, f0, corrected_pitches, pitch_deviations

show_corrected = True
# 绘制音符块和计算后的音高曲线
for pitch, duration, corrected_pitch, deviation in zip(
note_seq, note_dur, corrected_pitches, pitch_deviations
):
for pitch, duration, deviation in zip(note_seq, note_dur, pitch_deviations):
if pitch == "rest":
start_time += duration
continue
Expand Down