MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::EntryFrame Class Reference

Represents a vector of EntryInfo instances for a given frame, along with computed information. More...

#include <Entries.h>

+ Inheritance diagram for musx::dom::EntryFrame:

Classes

struct  TupletInfo
 class to track tuplets in the frame More...
 

Public Member Functions

 EntryFrame (const details::GFrameHoldContext &gfhold, InstCmper staff, MeasCmper measure, LayerIndex layerIndex, bool forWrittenPitch, util::Fraction timeStretch)
 Constructor function.
 
DocumentPtr getDocument () const
 Get the document for the entry frame.
 
Cmper getRequestedPartId () const
 Get the requested part ID for the entry frame.
 
InstCmper getStaff () const
 Get the staff for the entry.
 
MeasCmper getMeasure () const
 Get the measure for the entry frame.
 
LayerIndex getLayerIndex () const
 Get the layer index (0..3) of the entry frame.
 
bool isForWrittenPitch () const
 Returns if this entry frame was created for written pitch.
 
util::Fraction getTimeStretch () const
 Get the time stretch in this frame. Rather than accessing this value directly, consider using EntryInfoPtr::calcGlobalElapsedDuration or EntryInfoPtr::calcGlobalActualDuration instead.
 
const std::vector< std::shared_ptr< const EntryInfo > > & getEntries () const
 Get the entry list.
 
EntryInfoPtr getFirstInVoice (int voice) const
 Returns the first entry in the specified v1/v2 or null if none.
 
EntryInfoPtr getLastInVoice (int voice) const
 Returns the last entry in the specified v1/v2 or null if none.
 
void addEntry (const std::shared_ptr< const EntryInfo > &entry)
 Add an entry to the list.
 
std::shared_ptr< const EntryFramegetNext () const
 Gets the entry frame for the next measure with the same staff and layer.
 
std::shared_ptr< const EntryFramegetPrevious () const
 Gets the entry frame for the previous measure with the same staff and layer.
 

Public Attributes

std::vector< TupletInfotupletInfo
 A list of the tuplets in the frame and their calculated starting and ending information.
 
std::shared_ptr< KeySignaturekeySignature
 this can be different than the measure key sig if the staff has independent key signatures
 

Detailed Description

Represents a vector of EntryInfo instances for a given frame, along with computed information.

Its pointers are owned by EntryInfoPtr

Constructor & Destructor Documentation

◆ EntryFrame()

musx::dom::EntryFrame::EntryFrame ( const details::GFrameHoldContext gfhold,
InstCmper  staff,
MeasCmper  measure,
LayerIndex  layerIndex,
bool  forWrittenPitch,
util::Fraction  timeStretch 
)
explicit

Constructor function.

Parameters
gfholdThe details::GFrameHoldContext instance creating this EntryFrame
staffThe Cmper for the others::Staff of the entry
measureThe Cmper for the others::Measure of the entry
layerIndexThe LayerIndex (0..3) of the entry
forWrittenPitchIf true, the key and clef for each entry are calculated for written pitch rather than concert pitch.
timeStretchThe ratio of global Edu to staff edu.

Member Function Documentation

◆ getFirstInVoice()

EntryInfoPtr musx::dom::EntryFrame::getFirstInVoice ( int  voice) const

Returns the first entry in the specified v1/v2 or null if none.

Parameters
voice1 or 2

◆ getLastInVoice()

EntryInfoPtr musx::dom::EntryFrame::getLastInVoice ( int  voice) const

Returns the last entry in the specified v1/v2 or null if none.

Parameters
voice1 or 2

◆ getNext()

std::shared_ptr< const EntryFrame > musx::dom::EntryFrame::getNext ( ) const

Gets the entry frame for the next measure with the same staff and layer.

Returns
Frame or nullpter if the next measure has no matching frame.

◆ getPrevious()

std::shared_ptr< const EntryFrame > musx::dom::EntryFrame::getPrevious ( ) const

Gets the entry frame for the previous measure with the same staff and layer.

Returns
Frame or nullpter if the previous measure has no matching frame,

◆ isForWrittenPitch()

bool musx::dom::EntryFrame::isForWrittenPitch ( ) const
inline

Returns if this entry frame was created for written pitch.

Returns
True if for written pitch, false if for sounding pitch (i.e., concert pitch)

Member Data Documentation

◆ tupletInfo

std::vector<TupletInfo> musx::dom::EntryFrame::tupletInfo

A list of the tuplets in the frame and their calculated starting and ending information.

Note
Tuplets that start on grace notes are omitted from this list. Finale does not display them, and it is not possible to calculate their endpoints correctly in the general case. (Which is probably why Finale does not display them.)