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.

why a alternative version of LENGTH-INVERT is useful

Featured Replies

i coded a new/alternative version of LENGTH-INVERT. i used it for a so called BINARY-FILTER (for events) - have a look to the example and you see the reason.

in some cases you will have a much better DISPLAY/SCORE, is there an OPMO version for that?

 

greetings

andré

 

;;; --------------------------------------------------------
;;; VERSION WITH OPMO length-invert
;;; --------------------------------------------------------

(defun binary-filter-old (alist bin-list)
  (let ((event-list (cond ((omn-formp alist)
                           (single-events alist))
                          (t alist))))
    (flatten 
     (loop 
       for i in event-list
       for j in bin-list
       when (= j 1)
       collect i
       else append (list (length-invert (car i)))))))


;;; --------------------------------------------------------
;;; VERSION WITH OWN length-invert
;;; --------------------------------------------------------

(defun binary-filter* (alist bin-list)
  (let ((event-list (cond ((omn-formp alist)
                           (single-events alist))
                          (t alist))))
     (flatten 
      (loop 
        for i in event-list
        for j in bin-list
        when (= j 1)
        collect i
        else append (list (length-invert** (car i)))))))
         
(defun length-invert** (length-val)
  (append (compress (list '- length-val))))   

 

 

EXAMPLE WITH THE ORIGINAL VERSION:

 


;;; EXAMPLE => complex rhythms 

(setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t)
                        :pitch '(a4)))


;;; when you use my BINARY-FILTER_OLD which has the OPMO length-invert you will get a strange display-result (looks bad)
;; have a look with cmd3

(binary-filter-old omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1))

=> (-1/32 s a4 mf -1/32 3q a4 mf -13/96 t a4 mf -1/10 5h a4 mf -3/35 7q a4 mf -1/28 7q a4 mf -1/28 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf)

old.jpeg

 

 

 

EXAMPLE WITH USING THE ALTERNATIVE VERSION:

 

;;; EXAMPLE => complex rhythms 
(setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t)
                        :pitch '(a4)))

;;; when you use the new BINARY-FILTER with the new length-invert**
;; have a look with cmd3

(binary-filter* omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1))

=> (-t s a4 mf -t 3q a4 mf -3e_s. t a4 mf -5h 5h a4 mf -5q_7q 7q a4 mf -7q 7q a4 mf -7q 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf)

;;; you see the FORMAT (-3e_s.) didn't changed in the rests (not -13/96), so it will be displayed well

new.jpeg

 

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.