% 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{:});
