ckald/Samplicity

IOError: [Errno 2] No such file or directory

Opened this issue · 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'

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

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

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

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

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

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

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.

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