Skip to content

Commit

Permalink
Fixed bugged export due to incorrect params
Browse files Browse the repository at this point in the history
  • Loading branch information
arkrow committed Apr 8, 2020
1 parent a4a6d67 commit c6cb4da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
8 changes: 3 additions & 5 deletions pymusiclooper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ def bounded_float(x):

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

if args.export:
track.export(loop_start, loop_end, score)
print("Successfully exported intro/loop/outro parts to {}".format(
os.path.dirname(args.path)))
track.export(loop_start, loop_end)
print("Successfully exported intro/loop/outro sections.")

elif args.play:
loop_track(
Expand Down
7 changes: 2 additions & 5 deletions pymusiclooper/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,8 @@ def play_looping(self, loop_start, loop_end):
except KeyboardInterrupt:
print() # so that the program ends on a newline

def export(self, loop_start, loop_end, filename=None, format="WAV"):
if filename is None:
filename = os.path.splitext(self.filename)[0]

filename = os.path.abspath(filename)
def export(self, loop_start, loop_end, format="WAV"):
filename = os.path.abspath(self.filename)

loop_start = self.frames_to_samples(loop_start)
loop_end = self.frames_to_samples(loop_end)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy==1.17.2
librosa==0.7.2
numpy>=1.17.2
librosa>=0.7.2
mpg123==0.4
SoundFile==0.10.3.post1

0 comments on commit c6cb4da

Please sign in to comment.