Switching between a 5-line staff and a single-line approximate pitch staff?

In a certain passage, I want to indicate approximate pitches using a single-line staff, like this one:


…but this is from a player who is also playing specific pitches, so I want to be able to switch back and forth, much as in the passage below:

…except the player isn’t actually changing instruments; they’re just shifting from specific to approximate pitches. (Both images are from Kurt Stone.)

I had the notion that I could fake this by giving the player a second instrument that uses a single-line staff, and then having them switch “instruments” in the approximate pitch passage. However, it looks like Dorico does not support multiple pitches on a single line staff as of April 2018.

Any progress since then? Is there a way to finagle this?

This is currently one of the major shortcomings of Dorico… AFAIK there is no way around the changing instrument routine, BUT you can (without hacking any of Dorico’s xml files) get a one-line instrument with full staff functionality into Dorico by way of MusicXML.

The problem is that Dorico will retain this staff configuration within the current file only, so in order to take advantage of it, you will have to (re)build your project around this file. I think you can import your target project into the XML one, then drag the oneliner into the player where it’s needed… I haven’t tested this in a while, but will do later today :slight_smile:

1 Like

Thanks for this! Rebuilding the project around a new file would be…a daunting prospect, to say the least: lots of custom engraving rules, font settings, etc. to recover. I might try prying open those .dtn files that are embedded in the .dorico file in a hex editor myself and see if I can locate the magical “number of lines” setting myself. If MusicXML imports can alter it, then it surely must exist…. If I’m fool enough to do that, I’ll report back here.

If you do have a chance to conduct your experiment, I’d certainly be curious to hear how it turns out!

Another solution, albeit a pain, would be to input the notes on the 5-line staff and then use a PDF editor to remove the lines from specific areas where you want things to appear unpitched. I’ve long decided that certain tasks are simply easier in affinity publisher than in Dorico, so I engrave things certain ways with the foreknowledge that I will export the PDF to AP and finish it there.

If you search through @FredGUnn’s posts I’m pretty sure you’ll find a primer on how to edit the instruments.xml file in order to achieve the same result as importing in a one-line pitched staff via MusicXML.

2 Likes

Yep, I’ve needed this quite a few times, so I just redefined an instrument I’m not likely to ever need to use a 1-line staff. You can do this in your instruments.xml file:
1linedef

After that, you can just change to that instrument and input whatever you want:

1 Like

The instruments.xml file approach sounds promising! But if I understand correctly, the file is global and embedded in the Dorico app itself, not embedded in the project…correct? Editing that seems like an invitation to trouble.

It sort of is, and isn’t officially supported so I would make a backup first. As Dorico doesn’t have a fully featured instrument designer, we are left with hacking this file when we have instruments or situations the developers didn’t account for. I’ve modified quite a few things in mine.

How do you handle app upgrades? I imagine you have to re-replace the instruments.xml every time you install a new Dorico version?

Yup. Once the instrument exists in the project, it really doesn’t matter, though. Changes to the instruments.xml file only affect instruments that you add to projects in future, not ones that already exist.

1 Like

Editing an existing instrument works fine for a single line staff with all privileges, but today I had no luck cloning (extending) instruments, although I’m pretty sure I did that way back…

Oh well, what seems to be impossible though is staves of this kind: (also by XML…)
image

Success! I now have a transition into an approximate pitch section:

Screen Shot 2021-05-21 at 10.36.56 AM

…added to my existing project file (no lossy MusicXML export/import/recreate), and the project file opens properly even with an unmodified Dorico app (including its unmodified instruments.xml): Hooray!

Lots to clean up there with the clef, instrument change label, etc., but I think I’m good to go from here.

In case it’s useful to someone else in the future, here’s how I did it:

  1. Quit Dorico.

  2. Duplicate the Dorico app.

  3. Inside the duplicated app bundle, in Contents/Resources (on a Mac; don’t know where the Windows files are), make the following edits:

    instruments.xml

    Insert the following after the </InstrumentEntityDefinition> that closes the Piano instrument definition:

    		<InstrumentEntityDefinition>
    			<name>Piano (approximate pitches)</name>
    			<entityID>instrument.keyboard.piano.approx</entityID>
    			<parentEntityID/>
    			<inheritanceMask>0</inheritanceMask>
    			<nameID>instrumentname.keyboard.piano.approx</nameID>
    			<numStaves>2</numStaves>
    			<musicXMLSoundID>keyboard.piano</musicXMLSoundID>
    			<numberingStyle>kDummy</numberingStyle>
    			<showGuitarChords>false</showGuitarChords>
    			<showChordSymbols>true</showChordSymbols>
    			<staveDefinition>
    				<numStaveLines>1</numStaveLines>
    				<barlineSpan>2</barlineSpan>
    				<bracketSpan>2</bracketSpan>
    				<useBrace>true</useBrace>
    				<isVocalStave>false</isVocalStave>
    				<defaultContextualStemDirectionIsUp>false</defaultContextualStemDirectionIsUp>
    			</staveDefinition>
    			<clefs>
    				<clefIDsForEachStave array="true">
    					<staveClefIDs>
    						<idForTransposingLayouts>clef.treble</idForTransposingLayouts>
    					</staveClefIDs>
    					<staveClefIDs>
    						<idForTransposingLayouts>clef.bass</idForTransposingLayouts>
    					</staveClefIDs>
    				</clefIDsForEachStave>
    			</clefs>
    			<pitchedInstrumentData>
    				<standardRange>A0-C8</standardRange>
    				<advancedRange>A0-C8</advancedRange>
    				<concertOctaveTransposition>0</concertOctaveTransposition>
    				<transposedChromaticTransposition>0</transposedChromaticTransposition>
    				<transposedDiatonicTransposition>0</transposedDiatonicTransposition>
    				<useKeySignatures>true</useKeySignatures>
    				<showTransposition>kNever</showTransposition>
    			</pitchedInstrumentData>
    			<playingTechniques array="true">
    				<playingTechnique>
    					<techniqueID>pt.accent</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.arpeggioDown</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.arpeggioUp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.crescendo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.crescendoDiminuendo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.diminuendo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.diminuendoCrescendo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.f</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.ff</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.fff</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.ffp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.fp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.glissandoDown</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.glissandoUp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.legato</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.marcato</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.mf</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.mp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.natural</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.nonLegato</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.p</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.pp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.ppp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.sf</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.sfp</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.sfz</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.simile</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.sostenutoPedal</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.staccatissimo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.staccato</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.sustainPedal</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.tenuto</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.tremblement</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.tremolo</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.trill</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.unaCorda</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.laissezVibrer</techniqueID>
    				</playingTechnique>
    				<playingTechnique>
    					<techniqueID>pt.pizzicato</techniqueID>
    				</playingTechnique>
    			</playingTechniques>
    		</InstrumentEntityDefinition>
    
    instrumentFamiliesDefinitions.xml

    Find <entityID>instrument family.keyboards</entityID>, then add instrument.keyboard.piano.approx to the <instrumentDefinitionIDs> immediately below so the result looks like this:

    		<InstrumentFamilyEntityDefinition>
    			<entityID>instrument family.keyboards</entityID>
    			<name>Keyboards</name>
    			<order>5</order>
    			<parentEntityID/>
    			<inheritanceMask>0x0</inheritanceMask>
    			<instrumentDefinitionIDs>instrument.keyboard, instrument.keyboard.accordion, instrument.keyboard.bandoneon, instrument.keyboard.celesta, instrument.keyboard.celesta.alias.celeste, instrument.keyboard.clavichord, instrument.keyboard.harmonium, instrument.keyboard.harpsichord, instrument.keyboard.melodica, instrument.keyboard.organ, instrument.keyboard.organ.electric, instrument.keyboard.organ.grandstaff, instrument.keyboard.piano, instrument.keyboard.piano.approx, instrument.keyboard.piano.alias.pianoforte, instrument.keyboard.piano.electric, instrument.keyboard.piano.honky-tonk, instrument.keyboard.synthesizer, instrument.strings.hurdy-gurdy</instrumentDefinitionIDs>
    		</InstrumentFamilyEntityDefinition>
    
    instrumentnames_en.xml

    Insert the following immediately after the </InstrumentNameEntityDefinition> that closes the normal Piano’s name entry:

    		<InstrumentNameEntityDefinition>
    			<entityID>instrumentname.keyboard.piano.approx</entityID>
    			<name>Piano (approximate pitches)</name>
    			<parentEntityID/>
    			<inheritanceMask>0</inheritanceMask>
    			<data>
    				<uiName>Piano (approximate pitches)</uiName>
    				<singularFullName>Piano (approximate pitches)</singularFullName>
    				<singularShortName>Pno (approx)</singularShortName>
    				<pluralFullName>Pianos (approximate pitches)</pluralFullName>
    				<pluralShortName>Pnos (approx)</pluralShortName>
    				<gender>kNeutral</gender>
    				<language>kEnglish</language>
    			</data>
    		</InstrumentNameEntityDefinition>
    

    (Not sure this one was necessary, but…I did it!)

  4. Open the modified Dorico app.

  5. Open my project.

  6. Setup mode > Select player in left sidebar > Shift-I to edit instruments

  7. “Piano (approximate pitches)” should now show up in keyboard instruments. Add it to the existing player.

  8. Write mode > View > Galley view should show approximate pitches as a separate staff group below the piano. Move some notes into it. As long as there are no pitches simultaneously in the Piano and Piano (approximate pitches) instruments, Dorico should merge them into a single staff/system when you switch back out of Galley view.

  9. Save project.

  10. Quit Dorico.

  11. Delete modified Dorico app and restore original.

A thousand thanks to all of you on this thread who helped figure this out!

2 Likes

Seems like an awful lot of steps, but sure, if it works, great! :slight_smile:

On Windows I just did:

  1. Locate the instruments.xml file (Program Files>Steinberg>Dorico3.5 )
    and make a backup. (copy/rename) Then open the orig. file and change the numStaveLines entry to 1 for an instrument you’re not going to use in the current project. (e.g. Ukulele) Save the file.
  2. Start Dorico, load the relevant project and add the edited instrument to the Player where it’s needed. Save the Dorico file.
  3. If paranoid, restore the backup instruments.xml file

The only difference between that and what I did is:

  • I returned my Dorico app to its original state. (Having it modified makes me nervous.)
  • I created a new instrument instead of using an existing one.
  • I provided a little more step-by-step detail about the process.

That’s why the extra steps. Otherwise identical!