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.

rnd-symm-expand

Featured Replies

bad code but nice results... :-)

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; rnd-symm-expand => generates rnd-symm transpositions
;;;; in different sequences (intervals, OMN-form,rhythms...
;;;; :chance => 0.0 - 1.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun rnd-symm-expand (seq &key (possible-intervals '(12 -12)) (chance 1))
  (let ((row)
        (firstpart)
        (rev-secondpart)
        (out))
    (setq row (if (pitchp (first seq))
                (pitch-to-midi seq)
                (append seq)))
    (setq firstpart (loop repeat (if (evenp (length row))
                                   (/ (length row) 2)
                                   (/ (1- (length row)) 2))
                      for cnt = 0 then (incf cnt)
                      collect (nth cnt row)))
    (setq rev-secondpart (loop repeat (if (evenp (length row) )
                                        (/ (length row) 2)
                                        (/ (1- (length row)) 2))
                           
                           for cnt = (- (length row) 1) then (decf cnt)
                           collect (nth cnt row)))
    
    (loop 
      for i in firstpart
      for j in rev-secondpart
      with int = 0 
      do (if (prob? chance)
           (setq int (rnd-pick possible-intervals))
           (setq int 0))
      collect (+ i int) into bag1
      collect (+ j (* -1 int)) into bag2
      when (= (length bag2) (if (evenp (length row))
                              (/ (length row) 2)
                              (/ (1- (length row)) 2)))
      do (if (evenp (length row))
           (setq out (append bag1 (reverse bag2)))
           (setq out (append bag1 (list (nth (length firstpart) row)) (reverse bag2)))))
    (if (pitchp (first seq))
      (midi-to-pitch out)
      (append out))))
    
;;;examples

(rnd-symm-expand '(0 0 0 0 0 0 0 0 0 0) :possible-intervals '(4 12 7) :chance 0.5)
(rnd-symm-expand '(1/4 1/4 1/4 1/4 1/4) :possible-intervals '(-1/32 1/32) :chance 0.5)
(rnd-symm-expand '(c1 c2 c3 c4 c5 c6) :possible-intervals '(1 -1) :chance 0.5)

 

Final name and functionality:

(gen-transform '(0 0 0 0 0 0 0 0 0 0) :interval '(4 12 7) :prob 0.5)
(gen-transform '(1/4 1/4 1/4 1/4 1/4) :interval '(-1/32 1/32) :prob 0.5)
(gen-transform '(c1 c2 c3 c4 c5 c6) :interval '(1 -1) :prob 0.7)
(gen-transform '((c1 c2 c3) (c4 c5 c6)) :interval '(1 -1) :prob 0.7)
(gen-transform '((c1 c2 c3) (c4 c5 c6)) :interval '((1 -1) (-13 11)) :prob '(0.7 0.8))

 

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.