Skip to content

Commit

Permalink
move position of warngings
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Jan 22, 2024
1 parent eda3fdd commit ad4be06
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions libresvip/plugins/vpr/vpr_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def generate_tracks(self, track_list: list[Track]) -> list[VocaloidTracks]:
)
)
elif isinstance(track, SingingTrack):
singing_track_found = True
notes = [
VocaloidNotes(
pos=note.start_pos,
Expand Down
14 changes: 7 additions & 7 deletions libresvip/plugins/vsqx/vsq3_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ def generate_singing_tracks(
) -> tuple[list[Vsq3VsTrack], list[Vsq3VsUnit]]:
vs_track_list = []
vs_unit_list = []
if len(track_list):
warnings.warn(
_(
'Phonemes of all notes were set to "la". Please use "Lyrics" -> "Convert Phonemes" in the menu of VOCALOID3 to reset them.'
),
PhonemeWarning,
)
for track_index, track in enumerate(track_list):
vsqx_track = Vsq3VsTrack(
vs_track_no=track_index,
Expand Down Expand Up @@ -186,13 +193,6 @@ def generate_notes(self, notes: list[Note]) -> list[Vsq3Note]:
value="l a",
)
note_list.append(vsqx_note)
if len(note_list):
warnings.warn(
_(
'Phonemes of all notes were set to "la". Please use "Lyrics" -> "Convert Phonemes" in the menu of VOCALOID3 to reset them.'
),
PhonemeWarning,
)
return note_list

def generate_pitch(self, pitch: ParamCurve, notes: list[Note]) -> list[Vsq3MCtrl]:
Expand Down
14 changes: 7 additions & 7 deletions libresvip/plugins/vsqx/vsq4_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ def generate_singing_tracks(
) -> tuple[list[Vsq4VsTrack], list[Vsq4VsUnit]]:
vs_track_list = []
vs_unit_list = []
if len(track_list):
warnings.warn(
_(
'Phonemes of all notes were set to "la". Please use "Lyrics" -> "Convert Phonemes" in the menu of VOCALOID4 to reset them.'
),
PhonemeWarning,
)
for track_index, track in enumerate(track_list):
vsqx_track = Vsq4VsTrack(
vs_track_no=track_index,
Expand Down Expand Up @@ -186,13 +193,6 @@ def generate_notes(self, notes: list[Note]) -> list[Vsq4Note]:
value="l a",
)
note_list.append(vsqx_note)
if len(note_list):
warnings.warn(
_(
'Phonemes of all notes were set to "la". Please use "Lyrics" -> "Convert Phonemes" in the menu of VOCALOID4 to reset them.'
),
PhonemeWarning,
)
return note_list

def generate_pitch(self, pitch: ParamCurve, notes: list[Note]) -> list[Vsq4MCtrl]:
Expand Down

0 comments on commit ad4be06

Please sign in to comment.