Class AnalysisCoordinator
Prepares, runs and completes analyses.
*** DO NOT CHANGE THIS CLASS UNLESS INSTRUCTED TOO ***.
Inherited Members
Namespace: AnalysisBase
Assembly: AnalysisBase.dll
Syntax
public class AnalysisCoordinator
Remarks
The process to analyze files can be complex. The overall idea is to begin with an analysis type and a list of audio objects and segments. Then those files are segmented using default settings from the analysis and possible modifications to the defaults by a user. Each segment is analyzed, and the results are put into either a purpose-created folder (which might be deleted once that analysis is complete), or a known location for later use.
Temp files can also be stored in sub folders named by analysis name and files named by segment id when another analysis is run, the files are overwritten.
Constructors
| Improve this Doc View SourceAnalysisCoordinator(ISourcePreparer, SaveBehavior, Boolean, Boolean)
Initializes a new instance of the AnalysisCoordinator class but also allows for advanced channel mapping options.
Declaration
public AnalysisCoordinator(ISourcePreparer sourcePreparer, SaveBehavior saveIntermediateWavFiles, bool uniqueDirectoryPerSegment = true, bool isParallel = false)
Parameters
Type | Name | Description |
---|---|---|
ISourcePreparer | sourcePreparer | The source preparer to use. |
SaveBehavior | saveIntermediateWavFiles | Defines when intermediate WAVE files should be saved. |
Boolean | uniqueDirectoryPerSegment | Whether or not to create unique directories per segment (in both temp and output directories). |
Boolean | isParallel | Whether or not to run the analysis with multiple threads. |
Properties
| Improve this Doc View SourceIsParallel
Gets a value indicating whether to run in parallel.
Declaration
public bool IsParallel { get; }
Property Value
Type | Description |
---|---|
Boolean |
SourcePreparer
Gets SourcePreparer.
Declaration
public ISourcePreparer SourcePreparer { get; }
Property Value
Type | Description |
---|---|
ISourcePreparer |
UniqueDirectoryPerSegment
Gets a value indicating whether to create uniquely named sub directories for each run, or reuse a single folder named using the analysis name. Applies to both temp and output directories.
Declaration
public bool UniqueDirectoryPerSegment { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceGetAnalyzers<T>(Assembly)
Get analyzers using a method that is compatible with MONO environment..
Declaration
public static IEnumerable<T> GetAnalyzers<T>(Assembly assembly)
where T : class, IAnalyser2
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The assembly. |
Returns
Type | Description |
---|---|
IEnumerable<T> | The System.Collections.Generic.IEnumerable`1[T -> AnalysisBase.IAnalyzer2]. |
Type Parameters
Name | Description |
---|---|
T |
GetNamedDirectory(DirectoryInfo, IAnalyser2, String[])
Gets a named output directory. For example, if baseDir
is "C:\Temp" and
analyzer
is the indices analysis, the result will be "C:\Temp\Towsey.Acoustic".
Declaration
public static DirectoryInfo GetNamedDirectory(DirectoryInfo baseDir, IAnalyser2 analyzer, params string[] subFolders)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | baseDir | The base output directory (either normal output or a temp directory). |
IAnalyser2 | analyzer | The IAnalyser2 to extract the identifier from. |
String[] | subFolders | An optional list of sub folders to append to the path. |
Returns
Type | Description |
---|---|
DirectoryInfo | A combined directory made up of all the path fragments. |
Run<TSource>(ISegment<TSource>, IAnalyser2, AnalysisSettings)
Analyze one file segment using the analysis and settings.
Declaration
public AnalysisResult2[] Run<TSource>(ISegment<TSource> segment, IAnalyser2 analysis, AnalysisSettings settings)
Parameters
Type | Name | Description |
---|---|---|
ISegment<TSource> | segment | The file Segment. |
IAnalyser2 | analysis | The analysis. |
AnalysisSettings | settings | The settings. |
Returns
Type | Description |
---|---|
AnalysisResult2[] | The analysis results. |
Type Parameters
Name | Description |
---|---|
TSource |
Run<TSource>(ISegment<TSource>[], IAnalyser2, AnalysisSettings)
Analyze one or more file segments using the same analysis and settings. Note each segment could be sourced from separate original audio files! If using a remote source preparer the segments could even be downloaded from a remote source!.
Declaration
public AnalysisResult2[] Run<TSource>(ISegment<TSource>[] segments, IAnalyser2 analysis, AnalysisSettings settings)
Parameters
Type | Name | Description |
---|---|---|
ISegment<TSource>[] | segments | The file Segments. |
IAnalyser2 | analysis | The analysis. |
AnalysisSettings | settings | The settings. |
Returns
Type | Description |
---|---|
AnalysisResult2[] | The analysis results. |
Type Parameters
Name | Description |
---|---|
TSource |