Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/quantiser.hpp"
Facility to create grid-aligned time values.
Effectively, a quantiser exposes the value Grid API, but additionally also manages a set of supported (display) formats or "time code" formats. Plus there is an static API to fetch a suitable quantiser instance by-name; actually this utilises a hidden link to the Lumiera session. Time quantisation and timecode handling explicitly relies on this Quantiser interface.
Definition at line 93 of file quantiser.hpp.
Public Member Functions | |
virtual TimeValue | gridLocal (TimeValue const &raw) const =0 |
virtual FrameCnt | gridPoint (TimeValue const &raw) const =0 |
TimeValue | materialise (TimeValue const &raw) const |
convenience shortcut: materialise a raw time value based on this grid or time axis, but returning a raw time value. More... | |
template<class FMT > | |
bool | supports () const |
virtual TimeValue | timeOf (FrameCnt gridPoint) const =0 |
virtual TimeValue | timeOf (FSecs, int=0) const =0 |
Public Member Functions inherited from Grid | |
virtual | ~Grid () |
this is an Interface | |
Static Public Member Functions | |
static PQuant | retrieve (Symbol gridID) |
Access an existing grid definition or quantiser, known by the given symbolic ID. More... | |
Protected Attributes | |
format::Supported | supportedFormats_ |
Access an existing grid definition or quantiser, known by the given symbolic ID.
Typically this fetches a meta::TimeGrid (asset) from the session.
error::Logic | if the given gridID wasn't registered |
Definition at line 96 of file common-services.cpp.
Referenced by Mutation::nudge().
convenience shortcut: materialise a raw time value based on this grid or time axis, but returning a raw time value.
Implemented as combination of the #gridPoint and #timeOf operations, i.e. we quantise into this scale, but transform the result back onto the global raw time value scale.
Definition at line 101 of file quantiser.cpp.
References FixedFrameQuantiser::gridPoint(), and FixedFrameQuantiser::timeOf().