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.

Weird notation behavior with chordize

Featured Replies

Hi!

I'm encountering a notation glitch/issue that I just can't nail down.

I have a function (assign-registers) that assigns a list of pitch-classes to different registers. My goal is to notate them as chords on a Piano Staff as whole-notes.

The chords should not have any octave duplications, and in this case should all have eight notes. To illustrate that, I've added a format statement that shows both the list of chords created by the (pitch-transpose -24 (chordize pitch-list))) as well as the original untrnsposed list of pitches.

[Note: The OpusModus forum interface wants to consume the asterisks (*) in my variable names. The variables are correct regardless of the actual string shown here]

My starting PC-set and octave range is:
(setf *my-set* '(0 1 2 3 4 6 7 9))

(setf *octave-range* 3)

Here is how I am trying to create the list of chords I want to notate:

(dotimes (n 12)

(let ((*pitch-list* (mapcar (lambda (x) (integer-to-pitch x)) (assign-registers-nonrec *my-set* octave-range*))))

(setq new-chord (sort-asc (pitch-transpose -24 (chordize pitch-list))))

(setq chord-list (append chord-list (list new-chord)))

(format t "Added chord ~d with length ~d :: Pitches: ~a :: Chordized: ~a" n (length *pitch-list*) *pitch-list* new-chord )

)

)

(terpri)

(format t "*chord-list*: ~a ~%" chord-list)

(setq chords-rh (ambitus-filter '(0 96) chord-list))

(setq chords-lh (ambitus-filter '(-60 -1) chord-list))

(def-score my-pcseq-score

(:key-signature 'atonal

:time-signature '(4 4 4)

:title (format nil "set:~a" my-set)

:tempo base-tempo

:accidentals :all

:ignore-velocity t

:flexible-clef nil

)

(rh

:omn (make-omn

:length (gen-repeat num-chords 'w)

:pitch chords-rh

:velocity '(mp))

:sound 'gm :channel 1 :program 'acoustic-grand-piano)

(lh

:omn (make-omn

:length (gen-repeat num-chords 'w)

:pitch chords-lh

:velocity '(mp))

:sound 'gm :channel 1 :program 'acoustic-grand-piano)

)

)

The output of the line: (format t "Added chord ~d with length ~d :: Pitches: ~a :: Chordized: ~a" n (length new-chord) *pitch-list* new-chord )

seems to verify that the chords have only 8 notes and do not contain any duplicated pitch-classes:

Added chord 0 with length 8 :: Pitches: (c7 cs6 d7 eb7 e7 fs6 g6 a6) :: Chordized: (cs4fs4g4a4c5d5eb5e5)gen-weight :seed 623605

Added chord 1 with length 8 :: Pitches: (c7 cs7 d5 eb7 e6 fs7 g7 a7) :: Chordized: (d3e4c5cs5eb5fs5g5a5)gen-weight :seed 415867

Added chord 2 with length 8 :: Pitches: (c6 cs7 d6 eb7 e6 fs6 g7 a6) :: Chordized: (c4d4e4fs4a4cs5eb5g5)gen-weight :seed 537044

Added chord 3 with length 8 :: Pitches: (c5 cs7 d6 eb7 e5 fs7 g7 a7) :: Chordized: (c3e3d4cs5eb5fs5g5a5)gen-weight :seed 497550

And here is the list of chords:

chord-list: ((cs4fs4g4a4c5d5eb5e5) (d3e4c5cs5eb5fs5g5a5) (c4d4e4fs4a4cs5eb5g5) (c3e3d4cs5eb5fs5g5a5) (cs3fs3g3d4e4a4c5eb5) (d3g3eb4c5cs5e5fs5a5) (c4fs4cs5d5eb5e5g5a5) (c3a3cs4d4eb4g4e5fs5) (eb3a3d4g4c5cs5e5fs5) (cs3e4c5d5eb5fs5g5a5) (c3d3eb3a3fs4cs5e5g5) (d4eb4e4g4c5cs5fs5a5))

The clearest example is the third chord (c4d4e4fs4a4cs5eb5g5) (chord 2 in the list above).

In the attached image, the treble staff contains the correct rendition of the chord (c4d4e4fs4a4cs5eb5g5). But the bass staff '(cs3 fs3 g3) has spurious notes not found in (c4d4e4fs4a4cs5eb5g5) that are also duplicated in the treble staff.

Also easily notable is that the previous chord (chord 1) has the C-natural and E-natural duplicated between the two staves.

Any ideas are much appreciated.

If it solves the duplication problem, it may even be clearer to render these pitch-sets as an ascending series of quavers/eight-notes. If there's an easy way of doing that, that would work just as well.

OpusModus weird behavior 2025-07-21-17-44-12.pngOpusModus weird chord behavior.xml

Thanks for any ideas.

Regards,

Paul M

(setf chord-list1 '((cs4fs4g4a4c5d5eb5e5) (d3e4c5cs5eb5fs5g5a5) (c4d4e4fs4a4cs5eb5g5) (c3e3d4cs5eb5fs5g5a5) (cs3fs3g3d4e4a4c5eb5) (d3g3eb4c5cs5e5fs5a5) (c4fs4cs5d5eb5e5g5a5) (c3a3cs4d4eb4g4e5fs5) (eb3a3d4g4c5cs5e5fs5) (cs3e4c5d5eb5fs5g5a5) (c3d3eb3a3fs4cs5e5g5) (d4eb4e4g4c5cs5fs5a5)))
(setf chord-list (make-omn :pitch chord-list1 :length '(w) :velocity '(mp) :span :pitch))
(setq chords-rh (ambitus-filter '(0 96) chord-list))
(setq chords-lh (ambitus-filter '(-60 -1) chord-list))
(def-score myscore
(:title "score title"
:composer "composer name"
:copyright "copyright  2015"
:key-signature 'atonal
:time-signature '(4 4 4)
:tempo 132)
(rh
:omn chords-rh
:channel 1
:sound 'gm
:program 'acoustic-grand-piano)
(lh :omn chords-lh))

You could also use split-chord

Jesper

(setf chord-list1 '((cs4fs4g4a4c5d5eb5e5) (d3e4c5cs5eb5fs5g5a5) (c4d4e4fs4a4cs5eb5g5)
                    (c3e3d4cs5eb5fs5g5a5) (cs3fs3g3d4e4a4c5eb5) (d3g3eb4c5cs5e5fs5a5)
                    (c4fs4cs5d5eb5e5g5a5) (c3a3cs4d4eb4g4e5fs5) (eb3a3d4g4c5cs5e5fs5)
                    (cs3e4c5d5eb5fs5g5a5) (c3d3eb3a3fs4cs5e5g5) (d4eb4e4g4c5cs5fs5a5)))

(setf chord-list (make-omn :pitch chord-list1 :length '(w) :velocity '(mp) :span :pitch))
(setf SC (split-chord 32 chord-list :upper-size 5 :lower-size 3 :index 'p))

(def-score myscore
(:title "score title"
:composer "composer name"
:copyright "copyright  2015"
:key-signature 'atonal
:time-signature '(4 4 4)
:tempo 132)
(rh
:omn p1
:channel 1
:sound 'gm
:program 'acoustic-grand-piano)
(lh :omn p2))

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.