schollz / teoperator

Make OP-1 and OP-Z drum and synth patches from any sound. :musical_keyboard:
https://op1z.com
MIT License
151 stars 15 forks source link

Allow spaces in input files #14

Closed jbonhag closed 2 years ago

jbonhag commented 2 years ago

Hey! First off, just want to say thank you so much for creating this - it's pretty much essential for anybody who wants to make their own OP patches.

I was trying to make some OP-Z drum patches from a sample kit and I noticed that ffmpeg was erroring - it looks like the combination of fmt.Sprintf and strings.Fields is causing malformed ffmpeg commands when input files have spaces in their filenames.

For this PR, I replaced the fmt.Sprintf calls to use a slice of strings instead. For consistency, I did this for all the commands, not just ffmpeg - would love your feedback!

Example:

% go run . drum "BD dx200-909ishShortBeautyKick.wav" "BD dx200-909ishThumppppoKick.wav"
converted [BD dx200-909ishShortBeautyKick.wav BD dx200-909ishThumppppoKick.wav] -> BD dx200-909ishShortBeautyKick_patch.aif
schollz commented 2 years ago

Thanks this is so great!!! I really appreciate your digging into this