from os import remove
+REFNUM_SEP = ':'
+
class ABCPlayer (object):
def __init__(self):
f,self._tempfile = mkstemp(prefix='abcplay-', suffix='.midi')
def play_files(self, filenames):
for filename in filenames:
- refnums = list(self._refnums(filename))
+ if REFNUM_SEP in filename:
+ fields = filename.split(REFNUM_SEP)
+ filename = fields[0]
+ refnums = fields[1:]
+ else:
+ refnums = list(self._refnums(filename))
while len(refnums) > 0:
refnum = refnums.pop(0)
try: