Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Sep 21, 2024
1 parent 0a76d48 commit 016c706
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libresvip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

__version__ = "1.3.0"
__version__ = "1.3.1"
os.environ.setdefault("LOGURU_AUTOINIT", "false")
27 changes: 15 additions & 12 deletions libresvip/plugins/vpr/vpr_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,20 @@ def parse_notes(self, notes: list[VocaloidNotes], pos: int, default_lyric: str)
if len(notes):
next_pos = None
for note in notes[::-1]:
note_list.insert(
0,
Note(
start_pos=note.pos + pos,
length=note.duration
if next_pos is None
else min(note.duration or 0, next_pos - note.pos),
key_number=note.number,
lyric=note.lyric or default_lyric,
pronunciation=None,
),
)
if (
normalized_duration := note.duration
if next_pos is None
else min(note.duration or 0, next_pos - note.pos)
) > 0:
note_list.insert(
0,
Note(
start_pos=note.pos + pos,
length=normalized_duration,
key_number=note.number,
lyric=note.lyric or default_lyric,
pronunciation=None,
),
)
next_pos = note.pos
return note_list

0 comments on commit 016c706

Please sign in to comment.