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

One more small (improved) function: a starting rhythm (pattern) gradually changes its values towards a constant pulse/value (endvalue).

Other possible applications: An initial pitch sequence evolves into a steady, constant pitch. A start pattern for velocity gradually shifts towards a fixed velocity.

(defun gen-acc/rit (alist endvalue) ;; startpattern + endvalue
  (loop while (not (equal alist (gen-repeat (length alist) endvalue))) 
          collect (setf alist (loop for i in alist
                                    when (/= i endvalue)
                                      collect (if (> i endvalue)
                                                     (- i 1)
                                                  (+ i 1))
                                 else collect i))))


(list-plot (flatten (gen-acc/rit '(1 7 4 2 11 9 5 3) 3)) :join-points t :style :fill)

=> ((2 6 3 3 10 8 4 3) (3 5 3 3 9 7 3 3) (3 4 3 3 8 6 3 3) (3 3 3 3 7 5 3 3) (3 3 3 3 6 4 3 3) (3 3 3 3 5 3 3 3) (3 3 3 3 4 3 3 3) (3 3 3 3 3 3 3 3))


(list-plot (flatten (gen-acc/rit '(1 7 4 2 11 9 5 3) 15)) :join-points t :style :fill)

=> ((2 8 5 3 12 10 6 4) (3 9 6 4 13 11 7 5) (4 10 7 5 14 12 8 6) (5 11 8 6 15 13 9 7) (6 12 9 7 15 14 10 8) (7 13 10 8 15 15 11 9) (8 14 11 9 15 15 12 10) (9 15 12 10 15 15 13 11) (10 15 13 11 15 15 14 12) (11 15 14 12 15 15 15 13) (12 15 15 13 15 15 15 14) (13 15 15 14 15 15 15 15) (14 15 15 15 15 15 15 15) (15 15 15 15 15 15 15 15))


(list-plot (flatten (gen-acc/rit '(1 2 3 1 5 7 11 3 13 ) 6)) :join-points t :style :fill)

=> (((4 6 2 6 2 12 3 4 10) (5 6 3 6 3 11 4 5 9) (6 6 4 6 4 10 5 6 8) (6 6 5 6 5 9 6 6 7) (6 6 6 6 6 8 6 6 6) (6 6 6 6 6 7 6 6 6) (6 6 6 6 6 6 6 6 6))

plot.png

  • 2 weeks later...
  • Author

A small further development – separate sequences for note values and rests (positive and negative integers).

;; subfunction to test the end of the loop
(defun pos-neg (lst +val -val)
  (let ((pos 0)
        (neg 0))
    (dolist (x lst (list (* +val pos) (* -val neg)))
      (cond ((> x 0) (incf pos))
            ((< x 0) (incf neg))))))

;; main function
(defun gen-acc/rit* (alist length rest)
  (loop while (not (equal (sum (abs! alist)) (sum (abs! (pos-neg alist length rest)))))
        collect (setf alist (loop for i in alist
                                    when (or (= i length) (= i rest))
                                      collect i
                                      else collect (if (> i 0)
                                                  (if (> i length)
                                                      (- i 1)
                                                    (+ i 1))
                                                
                                                (if (< i rest)
                                                    (+ i 1)
                                                  (- i 1)))))))

;; example
(length-list-plot
 (gen-length
  (gen-acc/rit* '(3 -11 2 -13 23 5 -5 17 -2) 7 -3) ;; list with pos and neg integers + endval pos + endval neg
  '1/12)
 :join-points t
 :point-radius 0
 :style :fill)

pic.png

  • Author

Well, I don’t need this specifically, but here’s a quick sketched example: you have a pattern, and if you set it a bit cleverly (the initial and end values), then it mutates into pulses and then into another pattern. Very simple.

(length-list-plot
 (make-omn
  :length (length-staccato
           (gen-length
            (flatten 
             (list (gen-repeat 3 '(11 2 17 9 13)) (gen-acc/rit  '(11 2 17 9 13) 2)
                   (reverse (gen-acc/rit  '(8 5 10 10 5) 2)) (gen-repeat 5 '(8 5 10 10 5) )))
           '1/64))
  :pitch '(c4))
 :point-radius 0
 :join-points nil :style :fill)

pic1.png

or...

(length-list-plot
 (make-omn
  :length (gen-length
            (flatten 
             (list (gen-repeat 3 '(11 7 5 3)) (gen-acc/rit  '(11 7 5 3) 2)
                   (reverse (gen-acc/rit  '(5 7 11 17 23) 2)) (gen-repeat 5 '(5 7 11 17 23) )))
           '1/64)
  :pitch '(c4))
 :point-radius 0
 :join-points nil :style :fill)

pic2.png

as a starting TOCCATA 😂 .. and if you like... map it on/to your favorite scale

(pitch-list-plot 
(make-omn
 :pitch (integer-to-pitch (reverse (flatten (gen-acc/rit '(1 2 3 1 5 7 11 3 13 3 17 23 7 11 7 5) 9))))
 :length '(t)
 :span :pitch)

:join-points t :style :fill)

pic3.png

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.