#include <SegmentUtils.h>
◆ containsAnyValidNotes()
Whether a segment chord voicing contains any valid notes
- Parameters
-
- Returns
- true if contains any valid notes
◆ describe()
std::string SegmentUtils::describe |
( |
const SegmentChoice & |
choice | ) |
|
|
static |
- Parameters
-
- Returns
- description of choice
◆ findFirstOfType() [1/2]
Find first segment choice of a given type in a collection of segment choices
- Parameters
-
segmentChoices | to filter from |
type | to find one of |
- Returns
- segment choice of given type
◆ findFirstOfType() [2/2]
Find first segment choice of a given type in a collection of segment choices
- Parameters
-
segmentChoices | to filter from |
type | to find one of |
- Returns
- segment choice of given type
◆ getCrafted()
std::vector< const Segment * > SegmentUtils::getCrafted |
( |
const std::vector< const Segment * > & |
segments | ) |
|
|
static |
Get only the dubbed from any collection of Segments
- Parameters
-
segments | to get dubbed from |
- Returns
- dubbed segments from collection
◆ getDurationMinMicros()
long SegmentUtils::getDurationMinMicros |
( |
std::vector< Segment > & |
segments | ) |
|
|
static |
Get the duration of a collection of segments in microseconds
- Parameters
-
segments | collection of segments |
- Returns
- duration in microseconds
◆ getEndAtChainMicros()
long SegmentUtils::getEndAtChainMicros |
( |
const Segment * |
segment | ) |
|
|
static |
Get the end-at time of a segment in chain micros
- Parameters
-
segment | for which to get time |
- Returns
- end-at time in chain micros
◆ getIdentifier()
std::string SegmentUtils::getIdentifier |
( |
const Segment * |
segment | ) |
|
|
static |
Get the identifier or a Segment: ship key if available, else ID
- Parameters
-
segment | to get identifier of |
- Returns
- ship key if available, else ID
◆ getLast()
std::optional< const Segment * > SegmentUtils::getLast |
( |
const std::vector< const Segment * > & |
segments | ) |
|
|
static |
Get the last from any collection of Segments
- Parameters
-
- Returns
- last segment from collection
◆ getLastCrafted()
std::optional< const Segment * > SegmentUtils::getLastCrafted |
( |
const std::vector< const Segment * > & |
segments | ) |
|
|
static |
Get the last dubbed from any collection of Segments
- Parameters
-
segments | to get last dubbed from |
- Returns
- last dubbed segment from collection
◆ getStorageFilename() [1/2]
std::string SegmentUtils::getStorageFilename |
( |
const Segment * |
segment | ) |
|
|
static |
Get the full storage key for a segment audio
- Parameters
-
segment | for which to get storage key |
- Returns
- storage key for segment
◆ getStorageFilename() [2/2]
std::string SegmentUtils::getStorageFilename |
( |
const Segment * |
segment, |
|
|
const std::string & |
extension |
|
) |
| |
|
static |
Get the storage filename for a Segment
- Parameters
-
segment | for which to get storage filename |
extension | of key |
- Returns
- segment ship key
◆ isIntersecting()
bool SegmentUtils::isIntersecting |
( |
const Segment * |
segment, |
|
|
unsigned long long |
atChainMicros, |
|
|
unsigned long long |
thresholdMicros |
|
) |
| |
|
static |
Whether the segment is intersecting a given time. Inclusive of segment start time; exclusive of segment end time. Designed so to return true when within the threshold of being active (may true for multiple segments)
- return false when threshold is 0 and at the exact end of the segment (to avoid double-activation)
- Parameters
-
segment | to test |
atChainMicros | to test at |
thresholdMicros | to test threshold |
- Returns
- true if segment is spanning time
◆ isSameButUpdated()
bool SegmentUtils::isSameButUpdated |
( |
const Segment * |
s1, |
|
|
const Segment * |
s2 |
|
) |
| |
|
static |
Whether two segments are the same but updated
- Parameters
-
s1 | segment one |
s2 | segment two |
- Returns
- true if same but updated
◆ isSpanning()
bool SegmentUtils::isSpanning |
( |
const Segment * |
segment, |
|
|
unsigned long long |
fromChainMicros, |
|
|
unsigned long long |
toChainMicros |
|
) |
| |
|
static |
Whether the segment is spanning a given time frame. Inclusive of segment start time; exclusive of segment end time.
- Parameters
-
segment | to test |
fromChainMicros | to test frame from |
toChainMicros | to test frame to |
- Returns
- true if segment is spanning time frame
The documentation for this class was generated from the following files:
- /home/runner/work/xjmusic/xjmusic/engine/include/xjmusic/fabricator/SegmentUtils.h
- /home/runner/work/xjmusic/xjmusic/engine/src/fabricator/SegmentUtils.cpp