Lumiera  0.pre.03
»edit your freedom«
Quantiser Class Referenceabstract

#include "lib/time/quantiser.hpp"

Description

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 102 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_
 

Member Function Documentation

◆ retrieve()

PQuant retrieve ( Symbol  gridID)
static

Access an existing grid definition or quantiser, known by the given symbolic ID.

Note
defined in common-services.cpp

Typically this fetches a meta::TimeGrid (asset) from the session.

Exceptions
error::Logicif the given gridID wasn't registered
Returns
smart-ptr to the quantiser instance

Definition at line 105 of file common-services.cpp.

Referenced by Mutation::nudge().

+ Here is the caller graph for this function:

◆ materialise()

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.

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.

Warning
this operation incurs information loss. Values may be rounded and / or clipped, according to the grid used. And, contrary to a QuTime value, the information about the actual grid is discarded. Please resist the temptation to abuse this operation to "just get a simple number", without understanding what quantisation means!

Definition at line 110 of file quantiser.cpp.

References FixedFrameQuantiser::gridPoint(), and FixedFrameQuantiser::timeOf().

+ Here is the call graph for this function:
+ Inheritance diagram for Quantiser:
+ Collaboration diagram for Quantiser:

The documentation for this class was generated from the following files: