Jump to content

Controlling the score layout with ps (combining separate instruments with brackets, braces etc.)

Featured Replies

Posted

The functions ps and def-instrument-set allow some control over the resulting layout of the score (grouping of instruments by brackets etc.), e.g., by using some predefined ensemble "instruments" like :sq for string quartet.

 

Is it perhaps also possible to somehow set the layout options supported by def-score in this context? For example, would it be possible to specify the music for the left and right hand of a piano separately (i.e. not together in a triple-nested list), but then have both parts notated on a grand staff? Here is an example (not working) -- amended from the ps documentation. How can I define an instrument set such that this score would wrap the two parts below in a grand staff?

 

(ps 'my-instrument-set
    :rh '(((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)
           (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)
           (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)
           (s fs4 leg d4 leg e4 leg cs4 leg e d4)))
    :lh '(((e fs3 d3 e3)
           (e fs3 d3 e3)
           (e fs3 g3 a3)
           (e d3 a2 d2))))

Another example would be the four strings of a string quartet specified separately etc. 

 

I know of course that I could include both parts in a triple nested list for the instrument :p with the gm instrument set, or the strings with the instrument :sq (as demonstrated in the ps documentation). However if possible, I would prefer to specify the left and hand right hand (upper and lower stave) separately, e.g., because I am further processing partial polyphonic scores before they are given to ps (e.g., appending multiple partial scores into a larger score), and for this processing it would help me to know which part is which by its keyword label. 

 

Thanks! 

  • Author

Thanks! Yes, as I said I know that I can write the following, where rh and lh etc. are standard single-nested OMN sequences. 

(ps 'my-instrument-set :p (list rh lh))
(ps 'gm :sq (list vl1 vl2 va vc))

 

Perhaps I just need to define some custom function that automatically translates my preferred representation -- where all parts (including rh and lh) are represented individually for simplifying further processing -- into the representation above 🙂 

  • Author

Just for context: my function preview-score (link to doc) in the tot library -- which was perhaps the inspiration for the later function ps -- expands in the background simply into a call to def-score. In def-score, we can specify a layout of nested brackets, braces etc. separately of the actual music, which is expressed by individual single-nested OMN sequences. The function preview-score retained this separation: individual single-nested OMN sequences on the one hand, and the specification of the nested layout separately. 

 

By contrast, in the function ps this separation of concerns -- the actual music and the nested layout -- is seemingly gone. The input to ps seemingly must already be nested as required by the layout. That may be more convenient in some situations, but is limiting in others. For example, in a full orchestral score we can have a layout of multiple nesting levels (e.g., brackets for orchestral sections wrapped in "squares" for divisions or the standard combination of the violins in a string section, below is an example). 

(bracket-group
 (square-group
  (violin1-layout 'vl1)
  (violin2-layout 'vl2))
 (viola-layout 'va)
 (violoncello-layout 'vc)
 (contrabass-layout 'cb))

Can the function ps handle such nested layouts, or is it only designed for sketches and a full score should be created separately afterwards? In principle, it would be possible with shorthand functions like ps to allow for arbitrary layouts when it expands to def-score in the background (again, as demonstrated by preview-score), but keeping the actual music and the layout separately would likely then be preferable. 

 

... I am just trying to make a switch from preview-score to ps to unify efforts, but I don't want to loose too much functionality 😊

 

I will soon share a version of ps that supports the tot score format (https://tanders.github.io/tot/sources/score.html) so that we can have ps together with various score processing functions.  

 

To get a final score in OM we use DEF-SCORE instance. The PS (preview score) function should be seen as a snippet (momentaufnahme). To add all the options etc... to PS would defeat the primary idea.

  • Author

Yes, I understood that, and for a mere preview this is good enough (e.g., no nested layouts needed).

  • 7 months later...
On 8/23/2020 at 9:08 AM, opmo said:

Every layout from the "Instrument Layout Presets" document can be used in the DEF-INSTRUMENT-SET function i.e., PS.

Dear Janusz,

 

Please, I´d like to make an acoustic guitar quartet, all with treble octave down clefs.

I did´t find this configuration in the Instrument Layout Presets document.

How can I proceed ?

 

Thanks  !

Best !

Julio

 

Yes, Janusz

I´d like to use PS. I´m generating a lot of stuff to assemble after.

I don´t know where are the lisp file that contains the Instrument Layout Presets

 (if it´s editable)

Thank you !

Best,

Julio

Dear Janusz,

 

Maybe a good update would be the possibility of customizing the ensembles and its related clefs.

For example, somebody may want to write a extended technique violin piece using a percussion clef or something like this.

Or maybe a Pierrot Ensemble with some added instrument,  a prepared piano piece with three or four staves,

or a strange combination of instruments/clefs.

 

The ability of customizing specific groups and bracketsis interesting.

 

Best,

Julio

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy