tmhglnd / mercury

A minimal and human-readable language and environment for the live coding of algorithmic electronic music.
http://www.timohoogland.com/mercury-livecoding
GNU General Public License v3.0
291 stars 13 forks source link

Samples with uppercase extension are not loaded #49

Closed hay closed 4 years ago

hay commented 4 years ago

I have a folder with two samples called 808_kick.wav and 808_snare.WAV. Note the uppercase extension on the second file. If i load this folder the second sample doesn't appear to be loaded, and also doesn't show up if i use the 'Show loaded sounds' command.

hay commented 4 years ago

I've added the two samples in question here. samples.zip

tmhglnd commented 4 years ago

Partially fixed, I ultimately like to have a case-insensitive file search, but the fast-glob package I use currently doesn't seem to allow that for extensions (only for filenames). So for now hardcoded the extensions to search for like: wav|WAV|aif|AIF|aiff|AIFF|mp3|MP3|m4a|M4A|flac|FLAC

hay commented 4 years ago

Great, tested and works. There must be some way to simplify the code, if i have some time i'll take a look at it.