Namespace AudioAnalysisTools.LongDurationSpectrograms
Classes
LdSpectrogram3D
This class generates false-colour spectrograms of long duration audio recordings. Important properties are:
- the colour map which maps three acoutic indices to RGB.
- The scale of the x and y axes which are dtermined by the sample rate, frame size etc. In order to create false colour spectrograms, copy the method public static void DrawFalseColourSpectrograms(LDSpectrogramConfig configuration) All the arguments can be passed through a config file. Create the config file throu an instance of the class LDSpectrogramConfig and then call config.WritConfigToYAML(FileInfo path). Then pass that path to the above static method.
LdSpectrogram3D.Arguments
LDSpectrogramClusters
This class contains two methods: (1) StitchPartialSpectrograms() and (2) ConcatenateSpectralIndexFiles()
(1) StitchPartialSpectrograms() This method stitches together images and/or indices derived from a sequence of short recordings with gaps between them. It was written to deal with a set of recordings with protocol of Gianna Pavan (10 minutes every 30 minutes).
The following Powershell command was constructed by Anthony to do the analysis and join the sequence of images so derived: Y:\Italy_GianniPavan\Sassofratino1day | % { & "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisPrograms\bin\Release\AnalysisPrograms.exe" audio2csv -so ($.FullName) -o "Y:\Italy_GianniPavan\output" -c "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisConfigFiles\Towsey.Acoustic.Parallel.yml" } where: Y:\Italy_GianniPavan\Sassofratino1day is the directory containing recordings | = a pipe % = foreach{} = perform the operation in curly brackets on each item piped from the directory. & "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisPrograms\bin\Release\AnalysisPrograms.exe" = runs an executable audio2csv = first command line argument which determines the "activity" performed -so ($.FullName) = the input file -o "Y:\Italy_GianniPavan\output" = the output directory -c "PATH\Towsey.Acoustic.Parallel.yml" is the config file
The following PowerShell command was used by Anthony to stitch together a sequence of spectrogam images without any gap between them. It requires ImageMagick software to be installed: i.e. C:\Program Files\ImageMagick-6.8.9-Q16\montage.exe Y:\Italy_GianniPavan\output\Towsey.Acoustic> & "C:\Program Files\ImageMagick-6.8.9-Q16\montage.exe" -mode concatenate -tile x1 2MAP "....\merge.png"
(2) ConcatenateSpectralIndexFiles() This method was written to deal with a new recording protocol in which 24 hours of recording are made in 4 blocks of 6 hours each. It merges all files of acoustic indices derived from a sequence of consecutive 6 hour recording, into one file. It then creates the images.
LdSpectrogramConfig
CONFIG CLASS FOR the class LDSpectrogramRGB.
LdSpectrogramDifference
LDSpectrogramDiscreteColour
LDSpectrogramDistance
LDSpectrogramRGB
This class generates false-color spectrograms of long duration audio recordings. Important properties are:
- the color map which maps three acoustic indices to RGB.
- The scale of the x and y axes which are determined by the sample rate, frame size etc. In order to create false color spectrograms, copy the method public static void DrawFalseColorSpectrograms(LDSpectrogramConfig configuration) All the arguments can be passed through a config file. Create the config file through an instance of the class LDSpectrogramConfig and then call config.WritConfigToYAML(FileInfo path). Then pass that path to the above static method.
LdSpectrogramRibbons
LdSpectrogramStitching
This class used to contain only two methods: (1) StitchPartialSpectrograms() and (2) ConcatenateSpectralIndexFiles() Now it contains several versions to concatenate Index files. This is because there are now several use cases.
Here are the original two methods: (1) StitchPartialSpectrograms() This method stitches together images and/or indices derived from a sequence of short recordings with gaps between them. It was written to deal with a set of recordings with protocol of Gianna Pavan (10 minutes every 30 minutes).
The following Powershell command was constructed by Anthony to do the analysis and join the sequence of images so derived:
Y:\Italy_GianniPavan\Sassofratino1day | % {& "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisPrograms\bin\Release\AnalysisPrograms.exe" audio2csv -so ($_.FullName) -o "Y:\Italy_GianniPavan\output" -c "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisConfigFiles\Towsey.Acoustic.Parallel.yml" }
where:
Y:\Italy_GianniPavan\Sassofratino1day is the directory containing recordings
| = a pipe
% = foreach{} = perform the operation in curly brackets on each item piped from the directory.
& "C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisPrograms\bin\Release\AnalysisPrograms.exe" = runs an executable
audio2csv = first command line argument which determines the "activity" performed
-so ($_.FullName) = the input file
-o "Y:\Italy_GianniPavan\output" = the output directory
-c "PATH\Towsey.Acoustic.Parallel.yml" is the config file
The following PowerShell command was used by Anthony to stitch together a sequence of spectrogam images without any gap between them.
It requires ImageMagick software to be installed: i.e. C:\Program Files\ImageMagick-6.8.9-Q16\montage.exe
Y:\Italy_GianniPavan\output\Towsey.Acoustic> & "C:\Program Files\ImageMagick-6.8.9-Q16\montage.exe" -mode concatenate -tile x1 *2MAP* "..\..\merge.png"
(2) ConcatenateSpectralIndexFiles() This method was written to deal with a new recording protocol in which 24 hours of recording are made in 4 blocks of 6 hours each. It merges all files of acoustic indices derived from a sequence of consecutive 6 hour recording, into one file. It then creates the images.