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

;;;;perhaps you could/would extend the "rnd-sample-seq" function by:
;;;;(also with OMN-format) ... regards andré


;;;;SUBFUNCTIONS

(defun pick-sample-from-center (list span)
  (let ((center (if (evenp (length list))
                  (/ (length list) 2)
                  (/ (1+ (length list)) 2)))
        (span (if (> span (length list))
                    (length list)
                    (append span))))
    (loop repeat span
      with startpoint = (if (evenp span)
                          (- center (/ span 2))
                          (- center (/ (1+ span) 2)))

      for i = startpoint then (incf startpoint)
      collect (nth i list))))


;;;;MAINFUNCTION 
;;;;sampling-machine

(defun sampling-seq-machine (&key seq (type 'rnd) (sample-lengths 'rnd))
  (let ((span (if (equal sample-lengths 'rnd)
                 (1+ (random (length seq)))
                 (rnd-pick sample-lengths))))

    (cond ((equal type 'rnd)
           (rnd-sample-seq span
                           seq))
          ((equal type 'from-center)
           (loop repeat span
             with center = (center-position-in-list (omn :length seq))
             with startpoint = (if (evenp span)
                                 (- center (/ span 2))
                                 (- center (/ (1+ span) 2)))
             
             for i = startpoint then (incf startpoint)
             append (position-filter i seq)))
          
          ((equal type 'from-start)
           (loop repeat span
             for i = 0 then (incf i)
             append (position-filter i seq)))
          
          ;;; don't
          ((equal type 'from-end)
           (loop repeat span
             for i = (- (length (omn :length seq)) span) then (incf i)
             append (position-filter i seq))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(sampling-seq-machine :seq '(1 2 3 4 5 6 7 8 9) 
                      :type 'from-end
                      :sample-lengths '(3 5 7))
                  
(sampling-seq-machine :seq '(t bb3 pppp a3 ppp g3 pp eb3 p gs2 mp cs2 mf fs1 mp d1 p c1 pp) 
                      :type 'rnd
                      :sample-lengths '(3 5 7))

(sampling-seq-machine :seq '(t bb3 pppp a3 ppp g3 pp eb3 p gs2 mp cs2 mf fs1 mp d1 p c1 pp) 
                      :type 'from-start
                      :sample-lengths '(3 5 7))

(sampling-seq-machine :seq '(t bb3 pppp a3 ppp g3 pp eb3 p gs2 mp cs2 mf fs1 mp d1 p c1 pp) 
                      :type 'from-center
                      :sample-lengths '(3 5 7))

(sampling-seq-machine :seq '(t bb3 pppp a3 ppp g3 pp eb3 p gs2 mp cs2 mf fs1 mp d1 p c1 pp) 
                      :type 'from-end
                      :sample-lengths '(3 5 7))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

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.