MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Yantra::IntervalScanSettings Struct Reference

How one score column is turned into intervals. More...

#include <IntervalExtractor.hpp>

Collaboration diagram for MayaFlux::Yantra::IntervalScanSettings:

Public Attributes

bool emit_on_close { false }
 Emit each interval as soon as it closes, with full padding on both sides.
double enter_threshold { 0.5 }
 Score at or above which a run starts.
uint32_t first_sample { 0 }
 Sample position of score 0.
uint32_t gap_at_limit { 1568 }
 Gaps longer than this are candidates for cutting a capped run, in samples.
uint32_t gate_channel { no_channel }
 Column that gates this one, or no_channel.
double gate_threshold { 0.5 }
 Gate score below which this column is silent.
double leave_floor { 0.01 }
 Lowest leave threshold.
double leave_margin { 0.15 }
 How far below the enter threshold a score must fall to count as a gap.
uint32_t max_run { 0 }
 Longest interval in samples, 0 for no cap.
uint32_t min_gap { 1600 }
 Shortest gap that ends a run, in samples.
uint32_t min_run { 4000 }
 Shortest run kept, in samples.
uint32_t padding { 480 }
 Samples added on each side of an interval.
uint32_t samples_per_score { 512 }
 Samples between successive scores.
bool use_longest_gap { true }
 Cut a capped run at its longest gap instead of the last one.

Static Public Attributes

static constexpr uint32_t no_channel { std::numeric_limits<uint32_t>::max() }
 Value of gate_channel for no gate.

Detailed Description

How one score column is turned into intervals.

Lengths are in samples and positions are 32 bit. Score i of the column sits at first_sample + i * samples_per_score. The leave threshold is max(enter_threshold - leave_margin, leave_floor). A run shorter than min_run is dropped. A gap shorter than min_gap does not end a run. Each interval is widened by padding on both sides, and a gap between neighbours smaller than twice the padding is split between them.

max_run caps one interval, 0 for no cap. A capped run is cut at its longest gap when use_longest_gap is set, else at the last gap longer than gap_at_limit, else where the cap falls. It must exceed samples_per_score plus twice the padding when set.

gate_channel names the column that gates this one, or no_channel for none. Where the gate's score is below gate_threshold this column is silent: an open run ends there at once whatever min_gap is, and a gap is bridged only while the gate stays at or above its threshold. The gate is another column of the same call, of the same length, and is scanned by its own settings. A column is never gated by itself.

emit_on_close releases each interval when it closes, padded by the full padding on both sides. Nothing waits for a successor, so neighbouring paddings may overlap.

Definition at line 61 of file IntervalExtractor.hpp.


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