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.

omn-pitch-position-remove / omn-position-remove

Featured Replies

;;; removes pitches by its position-number, will be replaced by rests. (starts with 0)

(defun omn-pitch-position-remove (positions omnseq)
  (length-rest-merge (loop for i in (single-events omnseq)
                       with cnt = 0
                       
                       when (and (pitchp (cadr i)) 
                                 (not (equal 'nil (member cnt positions))))
                       append (make-omn :length (list (length-invert (car i))))
                       else append i
                       
                       when (pitchp (cadr i))
                       do (incf cnt))))


(omn-pitch-position-remove '(0 1) '(-q e c4 e d4 e e4 e e e e))
=> (-h e e4 mf e4 e4 e4 e4)

(omn-pitch-position-remove '(2 4) '(-q e c4 e d4 e e4 e e e e))
=> (-q e c4 mf d4 - e4 - e4 e4)

or more common

 



(defun omn-position-remove (positions omnseq &key (type 'pitch))
  (length-rest-merge (loop for i in (single-events omnseq)
                       with cnt = 0
                       
                       when (and (cond ((equal type 'pitch)
                                        (pitchp (cadr i)))
                                       ((equal type 'length)
                                        (lengthp (car i))))                                     
                                 (not (equal 'nil (member cnt positions))))

                       append (make-omn :length (list (length-invert (car i))))
                       else append i
                       
                       when (cond ((equal type 'pitch)
                                   (pitchp (cadr i)))
                                  ((equal type 'length)
                                   (lengthp (car i))))
                       do (incf cnt))))

(omn-position-remove '(2 4) '(-q e c4 e d4 e e4 e e e e) :type 'pitch)
=> (-q e c4 mf d4 - e4 - e4 e4)

(omn-position-remove '(0 4) '(e c4 e d4 e e4 e e e e) :type 'length)
=> (-e d4 mf e4 e4 - e4 e4)

could be also extended for articulation/velocity

 

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.