You can now show only the right hand or left hand of a piano score:
osmd.sheet.Instruments[0].Staves[1].Visible = false;
// osmd.sheet.Instruments[0].Staves[1].audible = false; // for audio player to disable audio as well
osmd.render();
Same for left hand only:
osmd.sheet.Instruments[0].Staves[0].Visible = false;
// osmd.sheet.Instruments[0].Staves[0].audible = false; // for audio player to disable audio as well
osmd.render();
(Take care not to set both to invisible)
Previously, we could only hide whole instruments (instrument.Visible = false), but the piano is usually given in one instrument with two staffs (except in very old xmls),
and there was no Visible attribute on Staff.
(Implementing this was a little more work than adding the attribute, there were some parts of the code that assumed a staff is visible when the parent instrument is Visible)
You can now show only the right hand or left hand of a piano score:
Same for left hand only:
(Take care not to set both to invisible)
Previously, we could only hide whole instruments (instrument.Visible = false), but the piano is usually given in one instrument with two staffs (except in very old xmls),
and there was no Visible attribute on Staff.
(Implementing this was a little more work than adding the attribute, there were some parts of the code that assumed a staff is visible when the parent instrument is Visible)