Mercurial > hg > nimfks
annotate src/matlab/SynthesisCache.m @ 0:c52bc3e8d3ad tip
user: boblsturm
branch 'default'
added README.md
added assets/.DS_Store
added assets/playButton.jpg
added assets/stopButton.png
added assets/swapButton.jpg
added data/.DS_Store
added data/fiveoctaves.mp3
added data/glock2.wav
added data/sinScale.mp3
added data/speech_female.mp3
added data/sweep.wav
added nimfks.m.lnk
added src/.DS_Store
added src/matlab/.DS_Store
added src/matlab/AnalysisCache.m
added src/matlab/CSS.m
added src/matlab/DataHash.m
added src/matlab/ExistsInCache.m
added src/matlab/KLDivCost.m
added src/matlab/LoadFromCache.m
added src/matlab/SA_B_NMF.m
added src/matlab/SaveInCache.m
added src/matlab/Sound.m
added src/matlab/SynthesisCache.m
added src/matlab/chromagram_E.m
added src/matlab/chromagram_IF.m
added src/matlab/chromagram_P.m
added src/matlab/chromsynth.m
added src/matlab/computeSTFTFeat.m
added src/matlab/controller.m
added src/matlab/decibelSliderReleaseCallback.m
added src/matlab/drawClickCallBack.m
added src/matlab/fft2chromamx.m
added src/matlab/hz2octs.m
added src/matlab/ifgram.m
added src/matlab/ifptrack.m
added src/matlab/istft.m
added src/matlab/nimfks.fig
added src/matlab/nimfks.m
added src/matlab/nmfFn.m
added src/matlab/nmf_beta.m
added src/matlab/nmf_divergence.m
added src/matlab/nmf_euclidean.m
added src/matlab/prune_corpus.m
added src/matlab/rot_kernel.m
added src/matlab/templateAdditionResynth.m
added src/matlab/templateDelCb.m
added src/matlab/templateScrollCb.m
author | boblsturm |
---|---|
date | Sun, 18 Jun 2017 06:26:13 -0400 |
parents | |
children |
rev | line source |
---|---|
boblsturm@0 | 1 classdef SynthesisCache < handle |
boblsturm@0 | 2 properties |
boblsturm@0 | 3 Iterations |
boblsturm@0 | 4 Seed |
boblsturm@0 | 5 Convergence |
boblsturm@0 | 6 CostMetric |
boblsturm@0 | 7 RepRestrict |
boblsturm@0 | 8 PolyRestrict |
boblsturm@0 | 9 ContRestrict |
boblsturm@0 | 10 DiagPattern |
boblsturm@0 | 11 Rotation |
boblsturm@0 | 12 Endtime |
boblsturm@0 | 13 Lambda |
boblsturm@0 | 14 Prune |
boblsturm@0 | 15 Hash |
boblsturm@0 | 16 AnalysisHash |
boblsturm@0 | 17 end |
boblsturm@0 | 18 |
boblsturm@0 | 19 methods |
boblsturm@0 | 20 function obj = SynthesisCache(varargin) |
boblsturm@0 | 21 if nargin == 13 |
boblsturm@0 | 22 obj.Iterations = varargin{1}; |
boblsturm@0 | 23 obj.Seed = varargin{2}; |
boblsturm@0 | 24 obj.Convergence = varargin{3}; |
boblsturm@0 | 25 obj.CostMetric = varargin{4}; |
boblsturm@0 | 26 obj.RepRestrict = varargin{5}; |
boblsturm@0 | 27 obj.PolyRestrict = varargin{6}; |
boblsturm@0 | 28 obj.ContRestrict = varargin{7}; |
boblsturm@0 | 29 obj.DiagPattern = varargin{8}; |
boblsturm@0 | 30 obj.Rotation = varargin{9}; |
boblsturm@0 | 31 obj.Endtime = varargin{10}; |
boblsturm@0 | 32 obj.Lambda = varargin{11}; |
boblsturm@0 | 33 obj.Prune = varargin{12}; |
boblsturm@0 | 34 obj.AnalysisHash = varargin{13}; |
boblsturm@0 | 35 end |
boblsturm@0 | 36 end |
boblsturm@0 | 37 |
boblsturm@0 | 38 function obj = GenerateHash(obj) |
boblsturm@0 | 39 ArrayToHash = [obj.Iterations; obj.Seed; obj.Convergence; obj.CostMetric; ... |
boblsturm@0 | 40 obj.RepRestrict; obj.PolyRestrict; obj.ContRestrict; ... |
boblsturm@0 | 41 obj.DiagPattern; obj.Rotation; obj.Endtime; obj.Lambda; obj.Prune ]; |
boblsturm@0 | 42 |
boblsturm@0 | 43 ArrayToHash = [ ArrayToHash; (1*obj.AnalysisHash)']; |
boblsturm@0 | 44 Opt = struct( 'Method', 'SHA-1' ); |
boblsturm@0 | 45 obj.Hash = ['id', char(DataHash(ArrayToHash, Opt))]; |
boblsturm@0 | 46 end |
boblsturm@0 | 47 end |
boblsturm@0 | 48 end |