No sound when using external instruments
Closed this issue · 2 comments
OS: win64
python: 3.6
Hello.py works fine, but other test files(ex.piano_test.py) using external instruments will not work(no sound).
Is it because I need to install more software? (I only downloaded the python_test folder)
ps. before this I changed two places in the init.py of ScoreDraft for it causes compile errors and may be a logic error
First one:
ScoreDraftPath_old= os.path.dirname(__file__)
ScoreDraftPath=""
#\\escaping fix
for ch in ScoreDraftPath_old:
if ch=="\\":
ScoreDraftPath+="/"
else:
ScoreDraftPath+=ch
Second one:
try:
from .InstrumentSampler import InstrumentSampler_Single
from .InstrumentSampler import InstrumentSampler_Multi
INSTR_SAMPLE_ROOT=ScoreDraftPath+'/InstrumentSamples'
if os.path.isdir(INSTR_SAMPLE_ROOT):
for item in os.listdir(INSTR_SAMPLE_ROOT):
inst_path = INSTR_SAMPLE_ROOT+'/'+item
if os.path.isfile(inst_path) and item.endswith(".wav"):
name = item[0:len(item)-4]
definition="""
def """+name+"""():
return InstrumentSampler_Single('"""+inst_path+"""')
"""
exec(definition)
Catalog['Instruments'] += [name+' - InstrumentSampler_Single']
elif os.path.isdir(inst_path):
definition="""
def """+item+"""():
return InstrumentSampler_Multi('"""+inst_path+"""')
"""
name=item #name fix (added)
exec(definition)
Catalog['Instruments'] += [name+' - InstrumentSampler_Multi']
except ImportError:
pass
Sorry for being inactive for so long..
Most of the sample doesn't work because I can't and won't upload all the data files (voice banks, wave files etc) needed for the synthesis, partially because of copyright issues..
Thanks for fixing the errors.
Strange that the "\" escaping of Windows never caused a problem for me.
Thank you very much for your explanation, the software you developed is pretty useful!