annotate general/fileutils/music_files.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents e44f49929e56
children
rev   line source
samer@4 1 % music_files - search for audio files under music directory
samer@4 2 %
samer@4 3 % music_files ::
samer@4 4 % string ~'Path based at ~/Music'
samer@4 5 % options {
samer@4 6 % pattern :: string/'*' ~'filename matching patter';
samer@4 7 % rec :: bool/0 ~'recurse into subdirs?'
samer@4 8 % }
samer@4 9 % -> cells {string}.
samer@4 10 %
samer@4 11 % This function assumes that the HOME environment variable points to the
samer@4 12 % user's home directory and that there exists there a directory called 'Music'.
samer@4 13
samer@4 14 function L=music_files(d,varargin)
samer@4 15 L=listfiles([getenv('HOME'),filesep,'Music',filesep,d],'regexp','.*\.(mp3|ogg|m4a|wav|au|flac)',varargin{:});