ckald / Samplicity

.SFZ to .XI sample format converter
18 stars 6 forks source link

IOError: [Errno 2] No such file or directory #9

Open negativerad opened 10 years ago

negativerad commented 10 years ago

Using latest version of Samplicity and get these errors.

negativerad@debian:~/Downloads/Samplicity$ python samplicity.py Keys\ -\ Grand\ Piano.sfz

Converting " Keys - Grand Piano.sfz "

Traceback (most recent call last): File "samplicity.py", line 483, in magic(arg) File "samplicity.py", line 274, in magic instrument = SFZ_instrument(cwd + filename) File "samplicity.py", line 236, in init region.load_audio() File "samplicity.py", line 150, in load_audio (self['sample_data'], self['sample_type'], self['sample_bittype']) = read_wav(self['sample_path']) File "samplicity.py", line 51, in read_wav (format, sampling_rate, channels, frames_count, bits_per_sample) = sndhdr.what(cwd + sample_path) File "/usr/lib/python2.7/sndhdr.py", line 37, in what res = whathdr(filename) File "/usr/lib/python2.7/sndhdr.py", line 43, in whathdr f = open(filename, 'rb') IOError: [Errno 2] No such file or directory: '/home/negativerad/Downloads/Samplicity/samples/grand piano/piano-f-c1.wav'

ckald commented 10 years ago

Does this path really exist? '/home/negativerad/Downloads/Samplicity/samples/grand piano/piano-f-c1.wav'

Frequently things don't work because of malformed sfz or missing sample files

negativerad commented 10 years ago

No i don't see it, i thought the python script would export the wav files?

ckald commented 10 years ago

From where? SFZ format is just a text file that does not contain samples. You should have both *.sfz files and "samples" folder

negativerad commented 10 years ago

Ahh i see the problem case sensitive issue. The sfz is looking for samples but the folder is Samples. Thanks!

ckald commented 10 years ago

That's another thing about SFZ: if it was created under Windows, it will contain windows-style paths. I haven't fixed this yet

negativerad commented 10 years ago

That make sense because windows is not case sensitive. In Linux i just ran this command to rename everything to lowercase

rename 'y/A-Z/a-z/' *
ckald commented 10 years ago

Good idea, but I probably should not make this a part of the script :) Looks like some recursive search is required here

Actually, your bugreports reminded me of this project and of a new version that I have written once but eventually lost all the sources. So if this script is useful for anyone I will probably carry on with it.

negativerad commented 10 years ago

I think it's really useful to the Sunvox community, for those at least using XI samples.