view 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
line wrap: on
line source
% music_files - search for audio files under music directory
%
% music_files :: 
%    string ~'Path based at ~/Music'
%    options {
%       pattern :: string/'*' ~'filename matching patter';
%       rec     :: bool/0     ~'recurse into subdirs?'
%    }
% -> cells {string}.
%
% This function assumes that the HOME environment variable points to the
% user's home directory and that there exists there a directory called 'Music'.

function L=music_files(d,varargin)
	L=listfiles([getenv('HOME'),filesep,'Music',filesep,d],'regexp','.*\.(mp3|ogg|m4a|wav|au|flac)',varargin{:});