//--------------------------------------------------------------------------------------- void ScoreMeter::get_staff_spacing(ImoScore* pScore) { int instruments = pScore->get_num_instruments(); m_staffIndex.reserve(instruments); int staves = 0; for (int iInstr=0; iInstr < instruments; ++iInstr) { m_staffIndex[iInstr] = staves; ImoInstrument* pInstr = pScore->get_instrument(iInstr); int numStaves = pInstr->get_num_staves(); staves += numStaves; for (int iStaff=0; iStaff < numStaves; ++iStaff) m_lineSpace.push_back( pInstr->get_line_spacing_for_staff(iStaff) ); } m_numStaves = staves; }