Integrate instrument and staff type changes

• Feb 26, 2019 - 17:45
Reported version
P1 - High
S5 - Suggestion

This is critical relative to the staff-type change functionality itself. Changing staff types is almost useless at this time because it does not integrate with the instrument change function.
For example, to get to the number of strings from a tablature Staff pointer it would look like this:
All of the advanced style properties are stored as Instrument and InstrumentTemplate class members, not class Staff or StaffType. In 99% of all real world staff type changes, the reason for changing staff types is a simultaneous instrument change.
The staff-type change functionality must be integrated with the instrument change functionality for it to make sense - from a design perspective, forget about the low level code details. I am not proposing a specific design, but this issue can be used as the place to discuss a new design.


Title v3 Change Staff Type design is flawed Integrate instrument and staff type changesI'm not sure
Severity S3 - Major S5 - Suggestion
Priority P1 - High

I'm not so sure the correlation is anything like 99% - I see staff type changes used for purely notational purposes, and the vast majority of instrument changes I see require no staff type change. But it's obviously true for the special case of for changes between pitched and unpitched percussion or tablature. In any case, definitely worth looking at improvements.

In reply to by Marc Sabatella

Title Integrate instrument and staff type changes Integrate instrument and staff type changesI'm not sure

I'll rephrase: Instrument changes certainly do not require staff type changes. But staff type changes might well require an instrument change at the same time. In the cases where a staff-type change does require an instrument change, the current code does not handle it.

Title Integrate instrument and staff type changesI'm not sure Integrate instrument and staff type changes

I messed up Jojo's title change. So I'm fixing it.

I think it's not easy to integrate both because of the many different use cases. But it would be very nice if every Instrument Change automatically adds a Staff Change when really needed (mainly on tablatures), so the composer can then delete it if she/he doesn't want it. Could that be done?

In reply to by elerouxx

@elerouxx, I believe the work you have been doing to allow all instrument changes will make staff type changes very rare at instrument changes, though there will no doubt be cases where someone will want more or fewer lines on something like temple blocks. Ideally, cases like this could be handled in the staff/parts properties dialog after the instrument change so the staff type change would be unnecessary.

In reply to by mike320

I thought of several ways to integrate staff Type and instrument changes but I found so many obstacles for this: for example, instruments can change in the middle of a measure and staff types don't. And even if we allow that, it would be very hard with the actual code to have more than one kind of staff (1-line, 5-lines etc) in the same measure. Then there is a series of issues on: how do you switch from normal Note Entry to drum mode...

It eventually seemed to me that tying to force a Staff Type change to do what is actually the instrument's job (to know if is pitched, which clefs are allowed, etc) was actually the hard way, and changing that made things start to work better. In my opinion (unless the whole thing is rethought) Staff Type Changes should take care of the visual stuff while Instrument Changes take care of what's functional.

Speaking of that, I was thinking on adding at least these two fields to Instrument Changes, so they start replacing the staff names from that tick on.

Attachment Size
instrument names.jpg 51.62 KB

As someone who does a lot of instrument changes in symphonic pieces, I'm content to change the instrument names in staff/part properties. In many cases I change the transposition at the same time, like horns written in the bass clef written an octave lower than sounding, which was common in the 1800's. These are actually my most common instrument changes. As you mentioned, you can't do a staff type change mid measure, so a horn that switches between treble and bass mid measure requires a transposition change at the same time.