proper scene folder discovery
This commit is contained in:
parent
c87c517217
commit
4046e757ef
7 changed files with 94 additions and 31 deletions
|
|
@ -24,7 +24,9 @@ def extract_loop_data_from_files(files_in, fout):
|
|||
if res is not None:
|
||||
collect[os.path.splitext(os.path.basename(x))[0]] = res
|
||||
with open(fout, "w") as out:
|
||||
json.dump(collect, out, ensure_ascii=False, indent="\t", sort_keys=True)
|
||||
json.dump(
|
||||
collect, out, ensure_ascii=False, indent="\t", sort_keys=True
|
||||
)
|
||||
|
||||
|
||||
def extract_loop_data_from_file(file_in, fout=None):
|
||||
|
|
@ -46,5 +48,7 @@ def extract_loop_data_from_file(file_in, fout=None):
|
|||
|
||||
if fout is not None and res is not None:
|
||||
with open(fout, "w") as out:
|
||||
json.dump(res, out, ensure_ascii=False, indent="\t", sort_keys=True)
|
||||
json.dump(
|
||||
res, out, ensure_ascii=False, indent="\t", sort_keys=True
|
||||
)
|
||||
return res
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class adx_file(object):
|
|||
if self.l_start > self.sam_count or self.l_end > self.sam_count:
|
||||
raise ValueError("Invalid Loop Data")
|
||||
return None
|
||||
if not self.l_style in LOOP_TYPE_SUP:
|
||||
if self.l_style not in LOOP_TYPE_SUP:
|
||||
raise NotImplementedError(
|
||||
"Loop Style {} Not Implemented".format(str(self.l_style))
|
||||
)
|
||||
|
|
@ -123,5 +123,7 @@ class adx_file(object):
|
|||
ret["loop_end"] = {}
|
||||
ret["loop_end"]["seconds"] = self.l_end / self.sam_rate
|
||||
ret["loop_end"]["samples_native"] = self.l_end
|
||||
ret["loop_end"]["samples_48k"] = dumb_round(self.l_end / self.sam_rate * 48000)
|
||||
ret["loop_end"]["samples_48k"] = dumb_round(
|
||||
self.l_end / self.sam_rate * 48000
|
||||
)
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue