MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_time_map()

void MayaFlux::Kakshya::CursorAccessProcessor::set_time_map ( const std::shared_ptr< const Kinesis::TimeMap > &  map)

Drive the read position from a function of time instead of speed.

The map takes seconds since the last reset() and returns a source position in frames, read with linear interpolation. Reverse, scrubbing and a fixed position are all valid. Speed and loop count are ignored while a map is set. Positions outside the loop region wrap if looping, otherwise the voice ends. A different map restarts its clock at zero.

Parameters
mapTime map, or null to go back to speed based reading.

Definition at line 248 of file CursorAccessProcessor.cpp.

249{
250 if (map == m_time_map)
251 return;
252
253 m_time_map = map;
254 m_clock_frames = 0;
255 m_repeat_start = 0;
256 m_repeat_length = 0;
257}
std::shared_ptr< const Kinesis::TimeMap > m_time_map
constexpr T map(T x, T in_lo, T in_hi, T out_lo, T out_hi) noexcept
Map x from [in_lo, in_hi] to [out_lo, out_hi], unclamped.
Definition Scalar.hpp:18

References m_clock_frames, m_repeat_length, m_repeat_start, and m_time_map.