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.

filter-events-by-length

Featured Replies

you can filter all events by length (>= min).

all other events will be replaced by rests...

 


(defun filter-events-by-length (omnlist &key min)
  (let ((omnlist (single-events omnlist))
        (min (car (omn :length (list min)))))
    (flatten 
     (length-rest-merge 
      (loop for i in omnlist
        when (>= (car (omn :length i)) min)
        collect i
        else collect (neg! (car (omn :length i))))))))


(filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'e)
=> (e c4 mf e d4 mf e e4 mf e e5 mf q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf)

(filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'q)
=> (-h q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf)

(filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'h)
=> (-wq h c4 mf h d4 mf h e4 mf)

 

 

  • Author

@janusz: you could expand it with conditionals like >, <, =, span .... and implement it....

and... if you would write this function with conditionals for pitches (sequences of pitches) you could filter by vector-envelope...

  • Author

for pitch-seq or length-seq + vector-envelope you will need SPAN

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.