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.

Adjust overall duration of a nested OMN sequence

Featured Replies

Hi,

 

Is there perhaps a way to adjust the overall duration of a nested (barred) OMN sequence? In particular, is there a function to cut notes etc. at the beginning/end of a sequence, so that the result has a specified overall duration?

 

The first example just demonstrates what I would like to have.

(setf phrase '((1/2 c4 1/4 d4) (1/4 e4 1/2 c4)))

;; Edit phrase such that the result is exactly 5/4 long by preserving the nesting structure
(function-I-am-looking-for 5/4 phrase)
; => ((h c4 q d4) (q e4 c4)) 	; cut material at end
; => ((q c4 q d4) (q e4 h c4))  ; cut material at beginning

 

There already exist at least two functions that are close, but not quite what I need. 

;; Does not keep nesting structure
(length-span 5/4 phrase)
; => (h c4 q d4 e4 c4)
;; Adjusts individual sublists 
(length-adjust 5/4 phrase)
; => ((h c4 q d4 -h) (q e4 h c4 -))

Is there perhaps also a function that does what my example function-I-am-looking-for above does?

 

Thanks a lot!

 

Best,

Torsten

 

The function FIT-TO-SPAN reduces or expands the total length of the sequence to a given span. If the sequence length is lower than the span value, additional rest values will be added at the end of the sequence by default. With the extend keyword set too 's the rest values will be inserted at the beginning of the sequence.

(fit-to-span 5/4 phrase)
=> ((h c4 q d4) (q e4 c4))
  • Author

Brilliant, this is exactly the missing function I described 🙂  And such a lightening-fast response too!

 

Thank you very much indeed!

 

Torsten

I made small change to the function to preserve the bars if :extend 's (start).

The :extend 'e (end) works fine.

The fix will be part of the next release.

(setf phrase '((h c4 q d4) (q e4 h f4)))

(fit-to-span 5/4 phrase)
=> ((h c4 q d4) (q e4 f4))

(fit-to-span 5/4 phrase :extend 's)
=> ((q c4 d4) (q e4 h f4))

 

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

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.