Skip to content

Commit c6cb4da

Browse files
committed
Fixed bugged export due to incorrect params
1 parent a4a6d67 commit c6cb4da

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

pymusiclooper/__main__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,11 @@ def bounded_float(x):
194194

195195
if args.json:
196196
track.export_json(loop_start, loop_end, score)
197-
print("Successfully exported loop points to {}".format(
198-
os.path.dirname(args.path)))
197+
print(f"Successfully exported loop points to {args.path}-lps.json")
199198

200199
if args.export:
201-
track.export(loop_start, loop_end, score)
202-
print("Successfully exported intro/loop/outro parts to {}".format(
203-
os.path.dirname(args.path)))
200+
track.export(loop_start, loop_end)
201+
print("Successfully exported intro/loop/outro sections.")
204202

205203
elif args.play:
206204
loop_track(

pymusiclooper/core.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,8 @@ def play_looping(self, loop_start, loop_end):
293293
except KeyboardInterrupt:
294294
print() # so that the program ends on a newline
295295

296-
def export(self, loop_start, loop_end, filename=None, format="WAV"):
297-
if filename is None:
298-
filename = os.path.splitext(self.filename)[0]
299-
300-
filename = os.path.abspath(filename)
296+
def export(self, loop_start, loop_end, format="WAV"):
297+
filename = os.path.abspath(self.filename)
301298

302299
loop_start = self.frames_to_samples(loop_start)
303300
loop_end = self.frames_to_samples(loop_end)

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numpy==1.17.2
2-
librosa==0.7.2
1+
numpy>=1.17.2
2+
librosa>=0.7.2
33
mpg123==0.4
44
SoundFile==0.10.3.post1

0 commit comments

Comments
 (0)