Samplicity icon indicating copy to clipboard operation
Samplicity copied to clipboard

IOError: [Errno 2] No such file or directory

Open negativerad opened this issue 10 years ago • 8 comments

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'

negativerad avatar Apr 08 '14 16:04 negativerad

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

ckald avatar Apr 08 '14 16:04 ckald

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

negativerad avatar Apr 08 '14 16:04 negativerad

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

ckald avatar Apr 08 '14 16:04 ckald

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

negativerad avatar Apr 08 '14 16:04 negativerad

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

ckald avatar Apr 08 '14 16:04 ckald

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/' *

negativerad avatar Apr 08 '14 16:04 negativerad

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.

ckald avatar Apr 08 '14 16:04 ckald

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

negativerad avatar Apr 08 '14 17:04 negativerad