sforkowany z mirror/rnsutils
Support multiple input files
rodzic
9bf71e034a
commit
d192f13a3a
|
@ -30,7 +30,7 @@ from sf2utils.generator import Sf2Gen
|
|||
from sf2utils.sf2parse import Sf2File
|
||||
|
||||
__date__ = '2016-01-22'
|
||||
__updated__ = '2016-01-25'
|
||||
__updated__ = '2016-01-28'
|
||||
__author__ = 'olivier@pcedev.com'
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ class Sf2ToXrni(object):
|
|||
|
||||
def main(argv=None):
|
||||
program_name = os.path.basename(sys.argv[0])
|
||||
program_version = "v0.5"
|
||||
program_version = "v0.6"
|
||||
program_build_date = "%s" % __updated__
|
||||
|
||||
program_version_string = '%%prog %s (%s)' % (program_version, program_build_date)
|
||||
|
@ -238,7 +238,7 @@ def main(argv=None):
|
|||
parser.add_argument("-t", dest="template", help="template filename [default: %(default)s]",
|
||||
default="empty-31.xrni")
|
||||
|
||||
parser.add_argument("sf2_filename", help="input file in SoundFont2 format")
|
||||
parser.add_argument("sf2_filename", help="input file in SoundFont2 format", nargs="+")
|
||||
|
||||
# process options
|
||||
opts = parser.parse_args(argv)
|
||||
|
@ -254,7 +254,12 @@ def main(argv=None):
|
|||
else:
|
||||
logging.root.setLevel(logging.INFO)
|
||||
|
||||
with open(opts.sf2_filename, "rb") as sf2_file:
|
||||
for sf2_filename in opts.sf2_filename:
|
||||
|
||||
if not opts.quiet:
|
||||
print("Reading instruments from '{}'".format(sf2_filename))
|
||||
|
||||
with open(sf2_filename, "rb") as sf2_file:
|
||||
sf2 = Sf2File(sf2_file)
|
||||
|
||||
# print(sf2.pretty_print())
|
||||
|
|
Ładowanie…
Reference in New Issue