Skip to content

Commit

Permalink
fix: Chroma rolling半個音(#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keycatowo committed May 16, 2023
1 parent 66a2f35 commit 40f1c29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pitch_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def plot_pitch_class(
)
note_probs = np.mean(chroma >= 1/np.sqrt(2), axis=1)
note_probs = note_probs / note_probs.sum() # normalize
# 將note_probs rolling (resolution_ratio/2)格
note_probs = np.roll(note_probs, resolution_ratio//2)

# 建立位置mask
unit_pos = np.zeros(resolution_ratio, dtype=bool) # 一個音的標記長度
Expand Down

0 comments on commit 40f1c29

Please sign in to comment.