Mercurial > hg > massef
changeset 11:f4d7400f5cf4
Added messl_massef to example.
author | Christopher Hummersone <c.hummersone@surrey.ac.uk> |
---|---|
date | Tue, 07 Mar 2017 11:02:56 +0000 |
parents | 063175bfe283 |
children | 3c20128a1f52 |
files | help_html/source/help_Example.m help_html/source/help_Separators.m help_html/source/messl_massef.m |
diffstat | 3 files changed, 80 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/help_html/source/help_Example.m Fri Mar 03 10:36:11 2017 +0000 +++ b/help_html/source/help_Example.m Tue Mar 07 11:02:56 2017 +0000 @@ -58,6 +58,10 @@ p = messl_massef(fs); +%% +% |messl_massef| is a wrapper class for the <https://github.com/mim/messl +% messl> algorithm. The class implementation is shown below. + %% Choose MASSEF options % Specify the parameters of the MASSEF object: @@ -78,6 +82,11 @@ resultsTable = massef.results.data; +%% MESSL wrapper implementation +% <include>messl_massef.m</include> +% +% See <help_Separators.html Separation Algorithms> for more information. + %% See also % <help_MASSEF.html MASSEF>, <help_MASSEFresults.html MASSEFresults>. %
--- a/help_html/source/help_Separators.m Fri Mar 03 10:36:11 2017 +0000 +++ b/help_html/source/help_Separators.m Tue Mar 07 11:02:56 2017 +0000 @@ -48,7 +48,8 @@ % % The |MASSEFseparator| class is provided for use as a base class for % separation algorithms. The |separate()| method is abstract and hence must -% be implemented in the derived class. +% be implemented in the derived class. See the <help_Example.html Example> +% page for an example of the use of |MASSEFseparator|. % %% See also % <help_MASSEF.html MASSEF>, <help_MASSEF_execute.html MASSEF.execute>.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help_html/source/messl_massef.m Tue Mar 07 11:02:56 2017 +0000 @@ -0,0 +1,69 @@ +classdef messl_massef < MASSEFseparator +%MESSL_MASSEF Wrapper class for the MESSL algorithm. +% +% A wrapper class for the MESSL algorithm (https://github.com/mim/messl). +% +% MESSL_MASSEF properties: +% label - A label for the instance of the algorithm (shown in +% the results file). +% estTag - Tags for the estimated outputs. +% fs - The sampling frequency that the separator will run +% at. +% +% MESSL_MASSEF methods: +% messl_massef - Create an instance of the algorithm. +% separate - Run the separation algorithm on the time-domain +% mixture. +% +% See also MASSEF. + +% Copyright 2016 University of Surrey. + + properties % Public properties + fs % Sampling frequency + end + + methods + + function obj = messl_massef(fs) % constructor + %MESSL_MASSEF Create an instance of the separation algorithm + % + % OBJ = MESSL_MASSEF(FS) creates an instance of the MESSL + % algorithm at the sampling frequency FS. + + % this code creates an instance of the object + obj.label = 'MESSL'; + obj.estTag = {'Fancier usage'}; + obj.fs = fs; + + % check dependency is compiled + iosr.general.checkMexCompiled('logProbGmm.cpp'); + + end + + % separation + function [signal,mask,est_azis,est_eles] = separate(obj,mixture) + %SEPARATE separate the mixture + % + % SIGNAL = OBJ.SEPARATE(MIXTURE) separates the time-domain + % mixture signal MIXTURE and produces the estimated output + % SIGNAL. + + lr = mixture'; + tau = tauGrid(0.15, obj.fs, 31); + + m = messl(lr, tau, 2, 'vis', 1, 'ildPriorPrec', 3, ... + 'GarbageSrc', 1, 'sr', 16000, 'vis', 0); + + m2 = prob2mask(m); + signal = reconstruct(m2, lr, 1); + + mask = []; + est_azis = []; + est_eles = []; + + end + + end + +end