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

Represents information about each instrument in the document. This is calculated from the staves, staff groups, and multistaff instrument groups. More...

#include <Document.h>

Public Member Functions

std::vector< StaffCmpergetSequentialStaves () const
 Returns the staffIds in sequence as they appear in Scroll View in the score.
 

Static Public Member Functions

static const InstrumentInfogetInstrumentForStaff (const InstrumentMap &map, StaffCmper staffId)
 Get the instrument info for the given staffId in the given map.
 

Public Attributes

std::unordered_map< StaffCmper, size_t > staves
 List of each staffId with its sequence index from top to bottom.
 
Cmper staffGroupId {}
 The details::StaffGroup that visually represents the instrument. (May be zero.)
 
Cmper multistaffGroupId {}
 The others::MultiStaffInstrumentGroup that defines the instrument. (May be zero.)
 

Detailed Description

Represents information about each instrument in the document. This is calculated from the staves, staff groups, and multistaff instrument groups.

Member Function Documentation

◆ getInstrumentForStaff()

const InstrumentInfo * musx::dom::InstrumentInfo::getInstrumentForStaff ( const InstrumentMap map,
StaffCmper  staffId 
)
static

Get the instrument info for the given staffId in the given map.

Parameters
mapThe map to search.
staffIdThe staffId to find.
Returns
The InstrumentInfo for the staffId or null if not found.