Jump 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.

Featured Replies

is there an RESPELL-function which would change sharps into flats and flats into sharps for single pitch-values? enharmonic changes....

 

like: 

 

(enharmonic 'cs4)
=> db4

(enharmonic 'db4)
=> cs4

 

but there is an other solution for an EQUALP* whicht is "independent" from pitch-name (enharmonic)... but a function like ENHARMONIC or EQUALP* could be useful (for pattern-match etc)...

 

(defun equalp* (a b)
  (equal (pitch-to-midi a) (pitch-to-midi b)))


(equalp* 'cs4 'db4)
=> t

 

there is an EQUALP in the system (but not documented), and works like that

(equalp 'cs4 'db4)
=> nil

(equalp 'cs4 'cs4)
=> t

:

 

 

  • 3 weeks later...
  • Author

thank you, torsten!
by now I have noticed that too (equalp in LISP) 🙂

 

 

  • Author

 

RESPELL/ENHARMONIC

 

here is a solution for that (i hope i got all cases) - could be usefull in OPMO - it was/is a explode/compress-thing of the pitch-symbols and to think about all cases. please check it!!

greetings

andré

 

(defun enharmonic* (pitches)
  (let ((liste '((cs db)
                 (ds eb)
                 (e fb)
                 (es f)
                 (fs gb)
                 (gs ab)
                 (as bb)
                 (b cb)
                 (bs c))))

    (loop for n in pitches
      collect (let ((octave (car (last (explode n))))
                    (pitchname (compress (butlast  (explode n)))))
                
                (append (compress (list (car (set-difference 
                                              (loop for i in liste
                                                
                                                ;; cases with octave-change
                                                when (or (and (equal i '(bs c))
                                                              (equal pitchname 'bs))
                                                         (and (equal i '(b cb))
                                                              (equal pitchname 'b)))
                                                do (setf octave (1+ octave))
                                                
                                                when (or (and (equal i '(bs c))
                                                              (equal pitchname 'c))
                                                         (and (equal i '(b cb))
                                                              (equal pitchname 'cb)))
                                                do (setf octave (1- octave))
                                              
                                              ;; ordinary cases
                                              when (member pitchname i)
                                              append i) 
                                            (list pitchname)))

                                        octave)))))))


(enharmonic* '(fb4 fb4 cb5))
=> (e4 e4 b4)

(enharmonic* '(f4 b7))
=> (es4 cb8)

(enharmonic* '(bs4 cs5 cb5))
=> (c5 db5 b4)

(enharmonic* '(c6 gs7 gb4))
=> (bs5 ab7 fs4)

 

Maybe a Kind of Substitute map function could be useful

something like

I did it to interval substitution, to transform interval ( 0 - 11) to interval classes (0 - 6)

(replace-map '((-11 1) (-10 2) (-9 3) (-8 4) (-7 5) (7 -5) (8 -4) (9 -3)(10 -2)(11 -1)) '(1 2 3 4 5 6 7 8 9 10 11 12 13))

Maybe a kind of mapping to tonalities could be useful.

Respell to tonality function

or

respell-to-collection '( pitch list)

1 hour ago, AM said:

code it, julio!! 🙂

 

 

I´m good in having ideas, but as coder...

I´ll try in the summer vacancy !

Best,

Julio

 

I can try to code within the existent functions in OM

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

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.