JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::AudioPlayHead::PositionInfo Class Reference

Describes the time at the start of the current audio callback. More...

#include "juce_AudioPlayHead.h"

Public Member Functions

Optional< int64_tgetTimeInSamples () const
 Returns the number of samples that have elapsed.
 
void setTimeInSamples (Optional< int64_t > timeInSamplesIn)
 
Optional< doublegetTimeInSeconds () const
 Returns the number of seconds that have elapsed.
 
void setTimeInSeconds (Optional< double > timeInSecondsIn)
 
Optional< doublegetBpm () const
 Returns the bpm, if available.
 
void setBpm (Optional< double > bpmIn)
 
Optional< TimeSignaturegetTimeSignature () const
 Returns the time signature, if available.
 
void setTimeSignature (Optional< TimeSignature > timeSignatureIn)
 
Optional< LoopPointsgetLoopPoints () const
 Returns host loop points, if available.
 
void setLoopPoints (Optional< LoopPoints > loopPointsIn)
 
Optional< int64_tgetBarCount () const
 The number of bars since the beginning of the timeline.
 
void setBarCount (Optional< int64_t > barCountIn)
 
Optional< doublegetPpqPositionOfLastBarStart () const
 The position of the start of the last bar, in units of quarter-notes.
 
void setPpqPositionOfLastBarStart (Optional< double > positionIn)
 
Optional< FrameRategetFrameRate () const
 The video frame rate, if available.
 
void setFrameRate (Optional< FrameRate > frameRateIn)
 
Optional< doublegetPpqPosition () const
 The current play position, in units of quarter-notes.
 
void setPpqPosition (Optional< double > ppqPositionIn)
 
Optional< doublegetEditOriginTime () const
 For timecode, the position of the start of the timeline, in seconds from 00:00:00:00.
 
void setEditOriginTime (Optional< double > editOriginTimeIn)
 
Optional< uint64_tgetHostTimeNs () const
 Get the host's callback time in nanoseconds, if available.
 
void setHostTimeNs (Optional< uint64_t > hostTimeNsIn)
 
bool getIsPlaying () const
 True if the transport is currently playing.
 
void setIsPlaying (bool isPlayingIn)
 
bool getIsRecording () const
 True if the transport is currently recording.
 
void setIsRecording (bool isRecordingIn)
 
bool getIsLooping () const
 True if the transport is currently looping.
 
void setIsLooping (bool isLoopingIn)
 
bool operator== (const PositionInfo &other) const noexcept
 
bool operator!= (const PositionInfo &other) const noexcept
 

Detailed Description

Describes the time at the start of the current audio callback.

Not all hosts and plugin formats can provide all of the possible time information, so most of the getter functions in this class return an Optional that will only be engaged if the host provides the corresponding information. As a plugin developer, you should code defensively so that the plugin behaves sensibly even when the host fails to provide timing information.

A default-constructed instance of this class will return nullopt from all functions that return an Optional.

Definition at line 317 of file juce_AudioPlayHead.h.

Member Function Documentation

◆ getBarCount()

Optional< int64_t > juce::AudioPlayHead::PositionInfo::getBarCount ( ) const

The number of bars since the beginning of the timeline.

This value isn't available in all hosts or in all plugin formats.

Definition at line 354 of file juce_AudioPlayHead.h.

◆ getBpm()

Optional< double > juce::AudioPlayHead::PositionInfo::getBpm ( ) const

Returns the bpm, if available.

Definition at line 333 of file juce_AudioPlayHead.h.

◆ getEditOriginTime()

Optional< double > juce::AudioPlayHead::PositionInfo::getEditOriginTime ( ) const

For timecode, the position of the start of the timeline, in seconds from 00:00:00:00.

Definition at line 384 of file juce_AudioPlayHead.h.

◆ getFrameRate()

Optional< FrameRate > juce::AudioPlayHead::PositionInfo::getFrameRate ( ) const

The video frame rate, if available.

Definition at line 372 of file juce_AudioPlayHead.h.

◆ getHostTimeNs()

Optional< uint64_t > juce::AudioPlayHead::PositionInfo::getHostTimeNs ( ) const

Get the host's callback time in nanoseconds, if available.

Definition at line 390 of file juce_AudioPlayHead.h.

◆ getIsLooping()

bool juce::AudioPlayHead::PositionInfo::getIsLooping ( ) const

True if the transport is currently looping.

Definition at line 411 of file juce_AudioPlayHead.h.

◆ getIsPlaying()

bool juce::AudioPlayHead::PositionInfo::getIsPlaying ( ) const

True if the transport is currently playing.

Definition at line 396 of file juce_AudioPlayHead.h.

◆ getIsRecording()

bool juce::AudioPlayHead::PositionInfo::getIsRecording ( ) const

True if the transport is currently recording.

(When isRecording is true, then isPlaying will also be true).

Definition at line 405 of file juce_AudioPlayHead.h.

◆ getLoopPoints()

Optional< LoopPoints > juce::AudioPlayHead::PositionInfo::getLoopPoints ( ) const

Returns host loop points, if available.

Definition at line 345 of file juce_AudioPlayHead.h.

◆ getPpqPosition()

Optional< double > juce::AudioPlayHead::PositionInfo::getPpqPosition ( ) const

The current play position, in units of quarter-notes.

Definition at line 378 of file juce_AudioPlayHead.h.

◆ getPpqPositionOfLastBarStart()

Optional< double > juce::AudioPlayHead::PositionInfo::getPpqPositionOfLastBarStart ( ) const

The position of the start of the last bar, in units of quarter-notes.

This is the time from the start of the timeline to the start of the current bar, in ppq units.

Note - this value may be unavailable on some hosts, e.g. Pro-Tools.

Definition at line 366 of file juce_AudioPlayHead.h.

◆ getTimeInSamples()

Optional< int64_t > juce::AudioPlayHead::PositionInfo::getTimeInSamples ( ) const

Returns the number of samples that have elapsed.

Definition at line 321 of file juce_AudioPlayHead.h.

◆ getTimeInSeconds()

Optional< double > juce::AudioPlayHead::PositionInfo::getTimeInSeconds ( ) const

Returns the number of seconds that have elapsed.

Definition at line 327 of file juce_AudioPlayHead.h.

◆ getTimeSignature()

Optional< TimeSignature > juce::AudioPlayHead::PositionInfo::getTimeSignature ( ) const

Returns the time signature, if available.

Definition at line 339 of file juce_AudioPlayHead.h.

◆ operator!=()

bool juce::AudioPlayHead::PositionInfo::operator!= ( const PositionInfo other) const
noexcept

Definition at line 439 of file juce_AudioPlayHead.h.

◆ operator==()

bool juce::AudioPlayHead::PositionInfo::operator== ( const PositionInfo other) const
noexcept

Definition at line 416 of file juce_AudioPlayHead.h.

◆ setBarCount()

void juce::AudioPlayHead::PositionInfo::setBarCount ( Optional< int64_t barCountIn)
See also
getBarCount()

Definition at line 357 of file juce_AudioPlayHead.h.

◆ setBpm()

void juce::AudioPlayHead::PositionInfo::setBpm ( Optional< double bpmIn)
See also
getBpm()

Definition at line 336 of file juce_AudioPlayHead.h.

◆ setEditOriginTime()

void juce::AudioPlayHead::PositionInfo::setEditOriginTime ( Optional< double editOriginTimeIn)
See also
getEditOriginTime()

Definition at line 387 of file juce_AudioPlayHead.h.

◆ setFrameRate()

void juce::AudioPlayHead::PositionInfo::setFrameRate ( Optional< FrameRate frameRateIn)
See also
getFrameRate()

Definition at line 375 of file juce_AudioPlayHead.h.

◆ setHostTimeNs()

void juce::AudioPlayHead::PositionInfo::setHostTimeNs ( Optional< uint64_t hostTimeNsIn)
See also
getHostTimeNs()

Definition at line 393 of file juce_AudioPlayHead.h.

◆ setIsLooping()

void juce::AudioPlayHead::PositionInfo::setIsLooping ( bool  isLoopingIn)
See also
getIsLooping()

Definition at line 414 of file juce_AudioPlayHead.h.

◆ setIsPlaying()

void juce::AudioPlayHead::PositionInfo::setIsPlaying ( bool  isPlayingIn)
See also
getIsPlaying()

Definition at line 399 of file juce_AudioPlayHead.h.

◆ setIsRecording()

void juce::AudioPlayHead::PositionInfo::setIsRecording ( bool  isRecordingIn)
See also
getIsRecording()

Definition at line 408 of file juce_AudioPlayHead.h.

◆ setLoopPoints()

void juce::AudioPlayHead::PositionInfo::setLoopPoints ( Optional< LoopPoints loopPointsIn)
See also
getLoopPoints()

Definition at line 348 of file juce_AudioPlayHead.h.

◆ setPpqPosition()

void juce::AudioPlayHead::PositionInfo::setPpqPosition ( Optional< double ppqPositionIn)
See also
getPpqPosition()

Definition at line 381 of file juce_AudioPlayHead.h.

◆ setPpqPositionOfLastBarStart()

void juce::AudioPlayHead::PositionInfo::setPpqPositionOfLastBarStart ( Optional< double positionIn)
See also
getPpqPositionOfLastBarStart()

Definition at line 369 of file juce_AudioPlayHead.h.

◆ setTimeInSamples()

void juce::AudioPlayHead::PositionInfo::setTimeInSamples ( Optional< int64_t timeInSamplesIn)
See also
getTimeInSamples()

Definition at line 324 of file juce_AudioPlayHead.h.

◆ setTimeInSeconds()

void juce::AudioPlayHead::PositionInfo::setTimeInSeconds ( Optional< double timeInSecondsIn)
See also
getTimeInSamples()

Definition at line 330 of file juce_AudioPlayHead.h.

◆ setTimeSignature()

void juce::AudioPlayHead::PositionInfo::setTimeSignature ( Optional< TimeSignature timeSignatureIn)
See also
getTimeSignature()

Definition at line 342 of file juce_AudioPlayHead.h.


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