Search Results for

    Show / Hide Table of Contents

    Class Track

    Inheritance
    Object
    Track
    Implements
    ITrack
    IPointData
    IDrawableEvent
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: AudioAnalysisTools.Events.Tracks
    Assembly: AudioAnalysisTools.dll
    Syntax
    public class Track : ITrack, IPointData, IDrawableEvent

    Constructors

    | Improve this Doc View Source

    Track(UnitConverters, TrackType)

    Initializes a new instance of the Track class. Constructor.

    Declaration
    public Track(UnitConverters converter, TrackType trackType)
    Parameters
    Type Name Description
    UnitConverters converter

    A reference to unit conversions this track class should use to convert spectrogram data to real units.

    TrackType trackType

    The type of track.

    | Improve this Doc View Source

    Track(UnitConverters, TrackType, (Int32 Frame, Int32 Bin, Double Amplitude)[])

    Declaration
    public Track(UnitConverters converter, TrackType trackType, params (int Frame, int Bin, double Amplitude)[] initialPoints)
    Parameters
    Type Name Description
    UnitConverters converter
    TrackType trackType
    (T1, T2, T3)<Int32, Int32, Double>[] initialPoints

    A set of initial points to add into the point data collection.

    Properties

    | Improve this Doc View Source

    DurationSeconds

    Declaration
    public double DurationSeconds { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    EndTimeSeconds

    Declaration
    public double EndTimeSeconds { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    HighFreqHertz

    Declaration
    public double HighFreqHertz { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    LowFreqHertz

    Declaration
    public double LowFreqHertz { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    PointCount

    Declaration
    public int PointCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Points

    Declaration
    public ICollection<ISpectralPoint> Points { get; }
    Property Value
    Type Description
    ICollection<ISpectralPoint>
    | Improve this Doc View Source

    SegmentStartOffset

    Declaration
    public TimeSpan SegmentStartOffset { get; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    StartFrequency

    Gets the frequency of the first point in the track. Where there is more than one frequency in this first frame, returns the lowest frequency.

    Declaration
    public double StartFrequency { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    StartTimeSeconds

    Declaration
    public double StartTimeSeconds { get; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    TrackBandWidthHertz

    Declaration
    public double TrackBandWidthHertz { get; }
    Property Value
    Type Description
    Double

    Methods

    | Improve this Doc View Source

    CheckPoint(Int32, Int32)

    Does a sanity check on the conversion of frame/bins to real values and back again.

    Declaration
    public string CheckPoint(int frame, int bin)
    Parameters
    Type Name Description
    Int32 frame

    The frame number.

    Int32 bin

    The freq bin number.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    Draw(IImageProcessingContext, EventRenderingOptions)

    Draws the track on an image given by its processing context.

    Declaration
    public void Draw(IImageProcessingContext graphics, EventRenderingOptions options)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Processing.IImageProcessingContext graphics
    EventRenderingOptions options
    Remarks

    Implementation is fairly simple. It sorts all points by the default IComparable method which sorts points by time (ascending), frequency (ascending) and finally value. The sorted collection is then used as a set of points to connect lines to.

    | Improve this Doc View Source

    DrawTracksOnSpectrogram(SpectrogramStandard, List<Track>, TimeSpan)

    Declaration
    public static Image<Rgb24> DrawTracksOnSpectrogram(SpectrogramStandard sonogram, List<Track> tracks, TimeSpan segmentStartOffset)
    Parameters
    Type Name Description
    SpectrogramStandard sonogram
    List<Track> tracks
    TimeSpan segmentStartOffset
    Returns
    Type Description
    SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24>
    | Improve this Doc View Source

    GetAmplitudeOverTimeFrames()

    Returns the maximum amplitude in each time frame.

    Declaration
    public double[] GetAmplitudeOverTimeFrames()
    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    GetAverageTrackAmplitude()

    Returns the maximum amplitude in each time frame.

    Declaration
    public double GetAverageTrackAmplitude()
    Returns
    Type Description
    Double
    | Improve this Doc View Source

    GetTrackAsSequenceOfHertzValues()

    Returns an array that has the same number of time frames as the track. Each element contains the highest frequency (Hertz) for that time frame. NOTE: For tracks that include extreme frequency modulation (e.g. clicks and vertical tracks), this method returns the highest frequency value in each time frame.

    Declaration
    public double[] GetTrackAsSequenceOfHertzValues()
    Returns
    Type Description
    Double[]

    An array of Hertz values.

    | Improve this Doc View Source

    GetTrackFrequencyProfile()

    Returns an array of Hertz difference values. The array has length one less than the number of dicrete time frames in the track. THis array can be used to compare simularity bewteen the shapes of tracks even if absolute frequency values are not similar.

    Declaration
    public double[] GetTrackFrequencyProfile()
    Returns
    Type Description
    Double[]

    An array of Hertz difference values.

    | Improve this Doc View Source

    SetPoint(Int32, Int32, Double)

    Adds a new point to track given the fram, freq bin and amplitude.

    Declaration
    public void SetPoint(int frame, int bin, double amplitude)
    Parameters
    Type Name Description
    Int32 frame

    The frame number.

    Int32 bin

    The freq bin number.

    Double amplitude

    The amplitude at given point.

    Implements

    ITrack
    IPointData
    IDrawableEvent

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top