Skip to content

Commit

Permalink
ust: fix vibrato params validation
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Jan 5, 2025
1 parent 7ef5eb7 commit 9e3b1d4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libresvip/plugins/ust/vibrato_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ def append_utau_note_vibrato(
* 1000
)
vibrato_length = note_length * vibrato_params.length / 100
if vibrato_length <= 0:
return note_values
frequency: float = 1.0 / vibrato_params.period
if not math.isfinite(frequency):
return note_values
depth = vibrato_params.depth / 100
if depth <= 0:
if vibrato_length <= 0 or not vibrato_params.period or depth <= 0:
return note_values
frequency: float = 1.0 / vibrato_params.period
ease_in_length = note_length * vibrato_params.fade_in / 100
ease_out_length = note_length * vibrato_params.fade_out / 100
phase = vibrato_params.phase_shift / 100
Expand Down

0 comments on commit 9e3b1d4

Please sign in to comment.