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.

pitch-demix function

Featured Replies

Currently pitch-demix function requires as the first parameter an integer (not a list) which defines the one voice to extract.

Is there a way to extract more than one voice from a chord at once (example: extract 3rd, 5th & 7th of chord at once), by applying a list of integers at once?

This would be great for orchestration to define which pitch of a chord goes into which strata..

;; Define chords
(setf chords (-<> 
              '((c4 maj7)
                (a3 m7)
                (d4 m7)
                (g3 7 ))
              (expand-chord <>)
              (make-omn :pitch <>
                        :length '(w)
                        :span :pitch)
              ))
; => (w c4e4g4b4 mf a3c4e4g4 d4f4a4c5 g3b3d4f4)
; works as expected :-)


;; Extract root
(setf bass (-<>
            chords
            (pitch-demix 1 <> :sort nil)
            (pitch-transpose -24 <>)
            ))
;=> (w c2 a1 d2 g1)
; works as expected :-)


;; Extract 3rd, 5th & 7th at once
(setf harmo (-<>
             chords
             (pitch-demix '(2 3 4) <> :sort nil)))
;=> (w e4 mf c4 f4 b3)
;
; not as expected:
; expected is: (w e4g4b4 mf c4e4g4 f4a4c5 b3d4f4)


; alternative try with nested list:
(setf harmo (-<>
             chords
             (pitch-demix '((2 3 4)) <> :sort nil)))
; error


; 2nd alternative try:
(setf harmo (-<>
             (list
              (pitch-demix 2 chords :sort nil)
              (pitch-demix 3 chords :sort nil)
              (pitch-demix 4 chords :sort nil)
              )
             (pitch-mix <>)
             ))

;=> (d. e4g4b4 c4e4g4 f4a4c5 b3d4f4)
; close but not correct, see length


; 3rd try:
(setf harmo (-<>
             (list
              (pitch-demix 2 chords :sort nil)
              (pitch-demix 3 chords :sort nil)
              (pitch-demix 4 chords :sort nil)
              )
             (pitch-mix <>)
             (length-diminution 3 <>)
             ))
;=> (w e4g4b4 c4e4g4 f4a4c5 b3d4f4)
; OK
; But very involved and fragile
; Can this be done easier by accepting chord-specific list inside pitch-demix function ?

  • Author

Opusmodus version 4.0.31467:

;; Define chords
(setf chords (-<> 
              '((c4 maj7)
                (a3 m7)
                (d4 m7)
                (g3 7 ))
              (expand-chord <>)
              (make-omn :pitch <>
                        :length '(w)
                        :span :pitch)
              ))
; => (w c4e4g4b4 mf a3c4e4g4 d4f4a4c5 g3b3d4f4)

;; Extract 3rd, 5th & 7th at once
(setf harmo (-<>
             chords
             (pitch-demix '(2 3 4) <> :sort nil)
             ))
; => (w e4g4b4 c4e4g4 f4a4c5 b3d4f4)
; works as expected :-)

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.