HART  0.2.0
High level Audio Regression and Testing
Loading...
Searching...
No Matches
Slice Struct Reference

Represents a slice of analysis data. More...

#include <hart_slice.hpp>

Public Types

enum class  Type {
  whole , frames , time , bins ,
  frequency
}
 

Public Member Functions

bool isEmpty () const
 

Static Public Member Functions

static Slice whole ()
 
static Slice frames (size_t startFrame, size_t stopFrame)
 
static Slice time (double startSeconds, double stopSeconds)
 
static Slice bins (size_t startBin, size_t stopBin)
 
static Slice freq (double startHz, double stopHz)
 

Public Attributes

Type type = Type::whole
 
double start = -hart::inf
 
double stop = hart::inf
 

Detailed Description

Represents a slice of analysis data.

Slice stores the user's intent in a raw, domain-specific form. Interpretation happens later inside of containers like AudioBuffer or Spectrum.

Examples:

Slice::frames (100, 200)
Slice::time (50_ms, 100_ms)
Slice::frequency (500_Hz, 1000_Hz)
Slice::bins (10, 20)
Represents a slice of analysis data.

Definition at line 25 of file hart_slice.hpp.

Member Enumeration Documentation

◆ Type

enum class Type
strong
Enumerator
whole 
frames 
time 
bins 
frequency 

Definition at line 27 of file hart_slice.hpp.

Member Function Documentation

◆ isEmpty()

bool isEmpty ( ) const
inline

Definition at line 40 of file hart_slice.hpp.

◆ whole()

static Slice whole ( )
inlinestatic

Definition at line 47 of file hart_slice.hpp.

◆ frames()

static Slice frames ( size_t  startFrame,
size_t  stopFrame 
)
inlinestatic

Definition at line 52 of file hart_slice.hpp.

◆ time()

static Slice time ( double  startSeconds,
double  stopSeconds 
)
inlinestatic

Definition at line 64 of file hart_slice.hpp.

◆ bins()

static Slice bins ( size_t  startBin,
size_t  stopBin 
)
inlinestatic

Definition at line 81 of file hart_slice.hpp.

◆ freq()

static Slice freq ( double  startHz,
double  stopHz 
)
inlinestatic

Definition at line 93 of file hart_slice.hpp.

Member Data Documentation

◆ type

Type type = Type::whole

Definition at line 36 of file hart_slice.hpp.

◆ start

double start = -hart::inf

Definition at line 37 of file hart_slice.hpp.

◆ stop

double stop = hart::inf

Definition at line 38 of file hart_slice.hpp.


The documentation for this struct was generated from the following file: