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

two functions i needed for working with POLYTEMPO-NETWORK

 

http://philippekocher.ch/#109

http://polytempo.zhdk.ch

 

greetings

andré

 

(defun length-to-decimal (alist &key (sum nil))
  (let ((list (loop for i in (omn :length alist)
                collect (float (* i 4)))))
      (if (equal sum t)
      (sum list)
      list)))

;;; result: q = 1 / h. = 3 ...etc...
(length-to-decimal '(h. h. 3q 5e 3h))
=> (3.0 3.0 0.33333334 0.1 0.6666667)

(length-to-decimal '(h. h. 3q 5e 3h) :sum t)
=> 7.1

(defun length-to-sec (alist tempo &key (sum nil))
  (let ((list (loop for i in (omn :length alist)
                collect (* (/ 60 tempo) (float (* i 4))))))
    (if (equal sum t)
      (sum list)
      list)))

(length-to-sec '(h. h. 3q 5e 3h) 60)
=> (3.0 3.0 0.33333334 0.1 0.6666667)

(length-to-sec '(h. h. 3q 5e 3h) 51)
=> (3.5294118 3.5294118 0.3921569 0.11764707 0.7843138)

(length-to-sec '(h. h. 3q 5e 3h) 51 :sum t)
=> 8.3529415

 

I used this function for conversion of 4 instrument each with in its own tempo to one 'global' tempo.

 

Examples:

(length-tempo-map 72 36 '1/4)
=> 1/2

(length-tempo-map 72 36 'w)
=> 2

(length-tempo-map 72 88 '(1/8 1/4 -1/4))
=> (9/88 9/44 -9/44)

(length-tempo-map 72 '(120 36)
                  '((1/8 1/4 -1/4) (1/16 1/8 -1/4 1/1)))
=> ((3/40 3/20 -3/20) (1/8 1/4 -1/2 2))

(length-tempo-map 72 '(36 96 72)
                  '((1/20 1/20 1/20 1/20 1/20) 
                    (1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16)
                    (1/8 1/8 1/8 1/8)
                    (1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4))
                  :meter '(1 1 1))
=> ((1/10 1/10 1/10 1/10 1/10)
    (1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8) 
    (1/4 1/4 3/32 3/32)
    (3/16 3/16 3/16 1/4 1/4 1/4 1/4 1/2))

(length-tempo-map 72 36 '((e c4 e4 g4 h_e c5)
                          (q c4 = = - - =)
                          (q cs5 = - - = =)))
=> ((q c4 e4 g4 w_q c5)
    (h c4 = = - - =)
    (h cs5 = - - = =))

(length-tempo-map 72 '(36 96 72)
                  '((e c4 e4 g4 h_e c5)
                    (q c4 = = - - =)
                    (q cs5 = - - = =))
                  :meter '(1 1 1))
=> ((q c4 e4 g4 w_q c5)
    (e. c4 = = - -q =)
    (q cs5 = -h - = =))
  • 7 months later...

Janusz, where is this above function 'length-tempo-map'?

 

It doesn't appear to be part of system and system/forum searches only come up with this one reference?

 

Thanks in advance.

  • Author

function name changed to length-to-tempo.

Thank you for the info and replies ;-)

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.