Skip to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automatic Cross Staff Piano Layout

Featured Replies

Dear Friends,

 

I'm working on a piano piece where each hand

 plays complementary rhythms.

For example,

If LH plays  (s -s s s -s) then

   RH plays  (-s s -s -s s)  accordingly whit the concept.

 

Everything is parametric, each hand have a set of pitches, dynamics and articulations,

so I did one OMN assembling for each hand, to have more control over the material.

It ends like you can see in the code, below.

 

Since all I have is just the complementary rhythms, I'd like to write it in a form of continuous sixtenth notes, in cross staff.

So, the problem is that in Finale I have to manually do all this painful work, dragging notes up and down, to make cross staffing, because,

the output in the XML gives me two independent voices. It's really boring to do.

Is there some way to automatically generating this cross staff layout, with this architeture of coding, preserving the content

 of each hand ?  I use this kind of writing it a lot.

 

Thanks for help !

 

Best,

Julio

(setf pianoassemblerh (assemble-seq lhmat1))
;;; Material for Left hand
(setf pianoassemblelh (assemble-seq rhmat1b))
;;; Material for Right hand

;;; SCORE

(def-score Piano-1
           (:key-signature 'atonal
            ;:time-signature '((4 4 3) (4 4 1))
            :time-signature '((3 4))
           :tempo 80
            :layout (piano-layout 'piano-rh 'piano-lh :all-accidentals t))
(piano-rh
   :omn pianoassemblerh
   :channel 1
   :sound 'gm
   :program 'acoustic-grand-piano)
  (piano-lh
   :omn pianoassemblelh   
))

 

  • Author

I can try the gen divide strategy, but first I'm going to save everything in one voice only, using Explode in Finale.

After That, import Midi to Opusmodus (loosing all articulations and Dynamics) and try to

 use gen divide, gen colletct approach (like the help of Grand Layout).

I'll have to calculate how many notes are in LH and How Many in RH to divide the staff
(Actually there's a pattern).

I don't know if I'm going to suceed.

 

A Better approach would be a form of merging my materials (LH and RH) all inside Opusmodus,

without loosing the dynamics and articulations and then use the Grand Layout  example Strategy

(that of gen-divide and Gen Collect)

Looks complicated but less tedious than manually doing all the stuff.

 

Any help ?

Best

Julio

Is this what you are looking for:

(setf sine (gen-sine 120 1 '(0.5 0.2 0.1) :phase 60))
(setf vec (add-sine-waves 4 120 4 0.6 :modulation sine))
(setf mat (vector-to-pitch '(g2 g7) vec))

(setf divide (gen-divide 6 mat))
(setf div1 (gen-collect 3 divide))
(setf div2 (gen-collect 3 divide :remain t))

(setf pich1 (rnd-octaves '(g2 b7) div1))
(setf pich2 (rnd-octaves '(c2 g7) div2))

(setf pitch (gen-mix pich1 pich2 :flatten t))
(setf velocity (rnd-sample 120 '(pp mp mf ff)))

(setf omn1 (make-omn 
           :length (rnd-sample 120 '(s -))
           :pitch pich1
           :velocity velocity
           :span :pitch))

(setf omn2 (make-omn 
           :length (rnd-sample 120 '(s -))
           :pitch pich2
           :velocity velocity
           :span :pitch))

(def-score grand
           (:key-signature 'atonal
            :time-signature '(3 8)
            :tempo 130
            :octave-shift '(c2 c6)
            :accidentals :all
            :layout (grand-layout 'pno))
  
  (pno :omn (merge-voices omn1 omn2)
       :channel 1
       :sound 'gm
       :program 0)
  )

 

Note:

Accidentals types:

:accidentals :all

:accidentals :natural

:accidentals :cautionary
 

The :all-accidentals t is not correct.

  • Author

Yes, specially the last lines. The merge stuff.

Thanks a lot !

Best,

Julio

 

(pno :omn (merge-voices omn1 omn2)
       :channel 1
       :sound 'gm
       :program 0)
  )
  • Author

Tested !!!

This is so cool !! Really works and save the time !!

So many thanks !!

I love Opusmodus !

  • Author

Almost there ....

Actually the cross staff worked almost perfectly but some

 notes got wrong.

I have the exact ambitus for the hands: LH (g3 c6) and RH (g1 g3).

Is there a way to force the split point of cross staff to these values ?

A kind of split point function  ?

Best,

Julio

 

Quote

LH (g3 c6) and RH (g1 g3).

here only c6 is in the treble clef.

(def-score grand
           (:key-signature 'atonal
            :time-signature '(2 8)
            :tempo 130
            :octave-shift '(c2 c6)
            :flexible-clef t
            :layout (grand-layout 'pno))
  
  (pno :omn (merge-voices '((e g3 c6)  (e g1 g3)))
       :channel 1
       :sound 'gm
       :program 0)
  )

Screen Shot 2017-11-21 at 15.41.25.png

  • Author

Sorry, it's the reverse:

 

RH (g3 c6) and LH (g1 g3)

 

I'm thinking more like left hand in lower staff and right hand in upper staff, independently of the clef used.

And, I was presuming that RH (g3 to c6) as the interval that goes from g3 (bass clef, maybe, and treble

 clef from the c4 on).

But if the RH stay just in treble clef is ok for me, since the content of eache hand is preserved, so the

extra ledger lines to reach g3 in treble clef is not a problem.

Thanks a lot !

Julio

If the LH and RH pitches are placed correctly then I would use piano-layout:

(def-score grand
           (:key-signature 'atonal
            :time-signature '(2 8)
            :tempo 130
            :octave-shift '(c2 c6)
            ;:flexible-clef t
            :layout (piano-layout 'rh 'lh))
  
  (lh :omn '(e g1 g3)
       :channel 1
       :sound 'gm
       :program 0)

  (rh :omn '(e g3 c6))
  )

Screen Shot 2017-11-21 at 16.18.50.png

 

  • Author

Great !!!

Precisely what I intended.

So, the Grand layout permit a lot of customization !

Thanks, Janusz !

Julio

added 2 minutes later

But using this, we return to the first problem, because

it supposes the rhythmic independence of the voices, am I right ?

  • Author

My definitive solution:

I took the approach of merging the material into only one stream of 16th notes.

After, I transpose up 4 semitones the pitch material, before the assembling.

So, the Grand layout did the job of cros staff and also the split, because

 with the transposition, my low note became b3, instead of g3.

So, I got it right from xml output with really need of small adjustments,

having just to transpose the thing up 4 semitones again.

Thanks,

Julio

Many thanks for exemples. It's very interesting. 

Create an account or sign in to comment


Copyright © 2014-2026 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.