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 with patterns -> filter-pattern?

Featured Replies

an idea/extension could be to "filter-events" not only by singular pitches/lengths... but also by motifs, means sequences => "filter a PATTERN" 

function-name: filter-pattern

  • Author

violà, take it as a sketch...

 

;;; like this, but the question is how to structure the input-values
;;; the kind of structure decides about output...

(defun filter-pattern (pattern omn-list)
  (progn
    (if (atom (car pattern))
      (setf pattern (mapcar #'list pattern)))
    (flatten 
     (loop 
       for i in (single-events omn-list)
       with cnt = 0
       
       when (pattern-matchp i (nth cnt pattern))
       collect i and do (incf cnt)
       else collect (neg! (omn :length i))
       
       when (= cnt (length pattern)) do (setf cnt 0)))))
  

(setf seq '(e c4 mp -e fermata e. d4 -h e. c4 e e4))


(filter-pattern (rnd-sample-seq 2 (single-events seq)) 
                '(e c4 mp -e fermata e. d4 -h e. c4 e e4))

(filter-pattern '((e. c4) (e4))
                '(e c4 mp -e fermata e. d4 -h e. c4 e e4))

(filter-pattern '((c4) (e4))
                '(e c4 mp -e fermata e. d4 -h e. c4 e e4))

(filter-pattern '(c4 e4)
                '(e c4 mp -e fermata e. d4 -h e. c4 e e4))

 

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.