Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for GNU/Linux using Timidity

  • Loading branch information...
commit d3911dc8418fe6ace3ff97746a90169b891df387 1 parent e759a58
@calebsmith authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 sebastian/midi/player.py
View
12 sebastian/midi/player.py
@@ -12,13 +12,13 @@
def play(tracks):
+ f = tempfile.NamedTemporaryFile(suffix=".mid", delete=False)
+ s = write_midi.SMF(tracks)
+ s.write(f)
+ f.close()
if sys.platform == "darwin":
-
- f = tempfile.NamedTemporaryFile(suffix=".mid", delete=False)
- s = write_midi.SMF(tracks)
- s.write(f)
- f.close()
-
subprocess.call(["open", f.name])
+ elif sys.platform == "linux2":
+ subprocess.call(["timidity", f.name])
else:
print "Only OS X supported at the moment. Patches accepted!"
Please sign in to comment.
Something went wrong with that request. Please try again.