MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
mostly_harmless::TransportState Struct Referencefinal

Contains info from the host about the current transport state. More...

#include <mostlyharmless_TransportState.h>

Public Attributes

std::optional< double > bpm {}
 
std::optional< double > positionBeats {}
 
std::optional< double > positionSeconds {}
 
std::optional< TimeSignaturetimeSignature {}
 
bool isPlaying { false }
 
bool isRecording { false }
 
bool isLoopActive { false }
 
std::optional< LoopInfoloopInfo
 
bool isWithinPreroll { false }
 

Detailed Description

Contains info from the host about the current transport state.

Note that the host isn't guaranteed to provide all of, or even any of this information - which is why most of the members are optional. Make sure you check they're valid before blindly dereferencing them!

Member Data Documentation

◆ bpm

std::optional<double> mostly_harmless::TransportState::bpm {}

Contains the current bpm of the host, or std::nullopt.

◆ isLoopActive

bool mostly_harmless::TransportState::isLoopActive { false }

true if the host is currently looping, false otherwise. If this is true, then (hopefully), loopInfo is not a nullopt..

◆ isPlaying

bool mostly_harmless::TransportState::isPlaying { false }

true if the host is currently playing, false otherwise.

◆ isRecording

bool mostly_harmless::TransportState::isRecording { false }

true if the host is currently recording, false otherwise.

◆ isWithinPreroll

bool mostly_harmless::TransportState::isWithinPreroll { false }

true if the host is currently in a "preroll" (count-in).

◆ loopInfo

std::optional<LoopInfo> mostly_harmless::TransportState::loopInfo

Contains positional info about the currently active loop (if isLoopActive), or nullopt.

◆ positionBeats

std::optional<double> mostly_harmless::TransportState::positionBeats {}

Contains the current playback position in beats, or std::nullopt.

◆ positionSeconds

std::optional<double> mostly_harmless::TransportState::positionSeconds {}

Contains the current playback position in seconds, or std::nullopt.

◆ timeSignature

std::optional<TimeSignature> mostly_harmless::TransportState::timeSignature {}

Contains the current time signature, or std::nullopt.


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