Skip to content

Commit deb9691

Browse files
committed
s5p: parse tempos after first_bar_length is defined
1 parent d1a2fdb commit deb9691

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libresvip/plugins/acep/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class AcepAudioPattern(AcepPattern):
274274
@classmethod
275275
def validate_path(cls, path: str, info: ValidationInfo) -> str:
276276
audio_path = pathlib.Path(path)
277-
if not audio_path.is_absolute():
277+
if not audio_path.is_absolute() and info.context is not None:
278278
project_path: Optional[pathlib.Path]
279279
if (project_path := info.context.get("path")) and not hasattr(project_path, "protocol"):
280280
audio_path = (project_path.parent / path).resolve()

libresvip/plugins/s5p/synthv_editor_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ class SynthVEditorParser:
5252
vibrato_coef_interval_dict: PiecewiseIntervalDict = dataclasses.field(init=False)
5353

5454
def parse_project(self, s5p_project: S5pProject) -> Project:
55-
tempo_list = self.parse_tempos(s5p_project.tempo)
5655
time_signature_list = self.parse_time_signatures(s5p_project.meter)
5756
self.first_bar_length = round(time_signature_list[0].bar_length())
57+
tempo_list = self.parse_tempos(s5p_project.tempo)
5858
self.synchronizer = TimeSynchronizer(tempo_list)
5959
track_list = self.parse_singing_tracks(s5p_project.tracks)
6060
if self.options.import_instrumental_track and s5p_project.instrumental.filename:

0 commit comments

Comments
 (0)