Actually I’m finding this isn’t working. :confused: First of all it didn’t seem to be able to handle spaces in folder names, then when I removed spaces it just did… nothing. I can’t see anything I’m doing wrong on my end, very confusing

Shell scripts have a tough time with filenames that have spaces, though usually that goes away if you put variables inside of quotes “$like_this”.

For spaces and other special characters, you’ll need to escape them with a \
Such as:

$ find . -name Unreal\ Projects
./Unreal Projects
./Documents/Unreal Projects
1 Like

Again: I was deliberately trying to work with your original one-liner. Yeah spaces in are not so fun.

On topic: I don’t have any spaces in file names, which to me seems like the simplest solution

Off topic: when doing more involved tasks, I quickly switch to python (from bash), I find it much more robust and elegant. For a purpose similar to yours I wrote a python script “a2wav”, which is an elaborate wrapper around sox.

1 Like

Has anyone been playing with Ish? It’s an Alpine emulator for ipadOS/iOS. I almost entirely set up a Pi Hole with it :grinning:

1 Like
for file in *.wav; do ffmpeg -i $file -ar 44100 -b:a 320k ${file%.*}.mp3; done

save yourself (from all that clicking seriously)

edit: bonus: id3mtag

6 Likes

Ish looks nifty! Too bad it needs TestFlight

yum - this looks better than sox

I recently (over the last 2 years) became more aquatinted with the cli. And after compiling a number of open source sample packs (CardOne, SuperDirt, etc…) I was left with lots of non .wav files in several sample directories.

find . -type f ! -iname '*.wav' -delete

^^^was my friend. Pretty basic stuff, but I wish I would have been more willing to learn this a while back.

p.s. -iname because for whatever reason half the wav files were all caps.

p.p.s. Can’t wait to make use of id3mtag. Last month I discovered my old college external hard drive which barely works but I was able to scrape old data from. All my mp3s no longer have any metadata other than decent folder organization and file names.

1 Like

youtube-dl "<URL HERE>" -o - | ffmpeg -i pipe: sample.wav

When you hear a sound in a YouTube video that you want to sample

10 Likes

If you have to tag a lot of music try beets as well http://beets.io it’s been working great for me.

Gonna mention easytag here just so it’s out there. If you don’t mind occasionally using a GUI, it’s really powerful, can scan tags from directory structure or file names, reorganize by tags, do batch operations, etc.

If you’re having trouble with spaces in paths when doing things like iterating over the output of ls, you can use

IFS="\t\n"

before your command. The IFS shell variable (“internal field separator”) governs how the shell splits strings, and here we set it to split on tabs and newlines only - the default value includes spaces.

4 Likes