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.

Idea for a function "motive-subdivision" or "motif-subdivision"

Featured Replies

Dear All,

Here is a proto-function idea... If Janusz or someone are interested in transform it in a core function, I think it could be interesting...

Sometimes I like to take a motive or chorale texture and use it to make a kind of accompaniment or texture ala Reich.

I created my way to do it, but it could be perfected in a better function and integrated in the core system.

Here is the idea:

;; Motive

(setf mat '(h c4 q. d4 e e4 -q w c4 h d4 q e4 -q))

image.png

;; small value

(setf fig-value '(e))

The "proto-function". What I could not achieve was how to make it respect the rests in the motive, but it works for generating the texture, respecting the pitch and length boundaries of the motive.

(flatten (make-omn

:pitch (omn :pitch (omn-to-time-signature mat (get-time-signature (omn-to-measure (length-legato mat) (flatten (length-legato (omn :length mat)))))))

:length (omn-to-time-signature

(length-span (get-span mat)

(gen-repeat 200 fig-value))

(get-time-signature (omn-to-measure (length-legato mat) (flatten (length-legato (omn :length mat))))))

))

RESULT

(e c4 mf c4 c4 c4 e d4 mf d4 d4 e e4 mf e4 e4 e c4 mf c4 c4 c4 c4 c4 c4 c4 e d4 mf d4 d4 d4 e e4 mf e4 e4 e4)

image.png

It could be perfected to result this:

(e c4 mf c4 c4 c4 d4 d4 d4 e4 -q e c4 c4 c4 c4 c4 c4 e c4 c4 d4 mf d4 d4 d4 e4 e4 -q)

image.png

Same texture with the fig-value set do 16th note

(setf fig-value '(s))

image.png

Best wishes,

Julio

a (perhaps poor) attempt at a function.

Jesper

(defun motive-subdivision (omn-mat val &optional (time-sig '(4 4)))

(let* (tms v (time (if (atom (car omn-mat)) time-sig (get-time-signature omn-mat)))

(seq (single-events (omn-merge-ties (flatten-omn omn-mat))))

(vl (list! val))

(vlen (length vl)))

(omn-to-time-signature

(loop for x in seq and i from 0 do

(setf v (nth (mod i vlen) vl))

(setf tms (/ (omn-encode (car x)) v))

collect (if (and (integerp tms) (> tms 1))

(append (list v) (cdr x) (make-list (1- tms) :initial-element (cadr x)))

(progn (decf i) x)))

time)))

(setf mat '(h c4 q. d4 e e4 -q w c4 h d4 q e4 -q))

(motive-subdivision mat '(1/8))

(motive-subdivision mat '(1/16))

(motive-subdivision mat '(1/12 1/8 1/16))

(motive-subdivision (omn-to-measure mat '(5/8 3/4)) '(1/16))

(motive-subdivision mat '(1/12 1/8 1/16) '(5 4))

(setf mat2 '((w g4 tie) (q g4 e bb4 h eb5 e gs4 tie) (h.. gs4 -e) (q cs5 fs5 h a4 tie) (h. a4 e eb5 g4 tie) (q. g4 he bb4 tie) (q. bb4 -e q e5 a4) (w cs5 tie) (q cs5 e fs5 h bb4 e eb5 tie) (h.. eb5 -e) (q g4 c5 h e5 tie) (h. e5 e gs4 cs5 tie) (q. cs5 he fs5 tie) (q. fs5 -e q a4 d5) (w g4 tie) (q g4 e c5 h eb5 e gs4 tie) (h.. gs4 -e) (q cs5 e5 h a4 tie) (h. a4 e eb5 g4 tie) (q. g4 he c5 tie) (q. c5 -e q e5 a4) (w cs5 tie) (q cs5 e fs5 h bb4 e eb5 tie) (h.. eb5 -e) (q g4 c5 h e5 tie) (h. e5 e gs4 cs5 tie) (q. cs5 he fs5 tie) (q. fs5 -e q a4 d5) (w g4 tie) (q g4 e bb4 h eb5 e gs4 tie) (h.. gs4 -e) (q cs5 fs5)))

(ps 'gm

:p (list mat2 (pitch-transpose -7 (motive-subdivision mat2 '(1/4 1/20 1/16 1/8 1/32))))

:tempo 132

:time-signature '(4 4)

)

(setf mat3 '((w c3a3c4eb4e4g4 p tie+ten) (q c3a3c4eb4e4g4 p e d2d3g3bb3d4g4 mp marc+ten h d3cs4eb4g4gs4bb4 marc+ten e d3bb3eb4gs4bb4eb5 tie+marc+ten) (h.. d3bb3eb4gs4bb4eb5 mp -e) (q g3d4fs4gs4a4cs5 mp marc+ten g3cs4fs4a4cs5fs5 marc+ten h g3c4d4fs4g4a4 tie+marc+ten) (h. g3c4d4fs4g4a4 mp e c3e3a3cs4e4a4 p ten c4e4g4bb4c5eb5 tie+ten) (q. c4e4g4bb4c5eb5 p he d2d3g3bb3d4g4 mp marc+ten+tie) (q. d2d3g3bb3d4g4 mp -e q eb3c4eb4fs4g4bb4 p ten eb3c4e4a4c5e5 ten) (w g3d4fs4gs4a4cs5 mp tie+marc+ten) (q g3d4fs4gs4a4cs5 mp e c3a3cs4fs4a4cs5 p ten h c4g4bb4cs5eb5fs5 ten e c3fs3bb3eb4fs4bb4 tie+ten) (h.. c3fs3bb3eb4fs4bb4 p -e) (q eb3a3c4eb4e4g4 p ten eb3g3c4e4g4c5 ten h eb4fs4a4c5cs5e5 tie+ten) (h. eb4fs4a4c5cs5e5 p e gs3cs4e4a4cs5e5 mp marc+ten g2a3cs4eb4fs4gs4 tie+marc+ten) (q. g2a3cs4eb4fs4gs4 mp he c3a3cs4fs4a4cs5 p ten+tie) (q. c3a3cs4fs4a4cs5 p -e q fs3g4b4cs5d5fs5 mp marc+ten d2e3a3d4e4a4 marc+ten) (w eb3a3c4eb4e4g4 p tie+ten) (q eb3a3c4eb4e4g4 p e g2d3g3c4d4g4 mp marc+ten h g3cs4eb4g4gs4c5 marc+ten e g3c4eb4gs4c5eb5 tie+marc+ten)))

(ps 'gm

:p (list (pitch-transpose 12 (subseq mat2 0 16)) (motive-subdivision mat3 '(1/4 1/8)))

:tempo 132

:time-signature '(4 4)

)

  • Author

Dear Jesper,

Thanks a lot for your beautiful solution. It worked great ! Nice examples too !

Janusz, please put this in the core system in the next update if everybody agree !

Best,

Julio

  • Author

Already in my extensions folder !

Thanks a lot ! Very inspiring !

  • Author

Janusz, is there some general function to apply selectively any function to a list ?

It would be useful in conjunction to this.

For example, selectively applying the motive-subdivision in the first and third measure of a list while mantaining the rest of the list original.

A kind of general bypass to any kind of list.

Thanks in advance,

  • Author

Here is what I need !

(setf mat '((h c4 q. d4 e e4 -q w c4 h d4 q e4 -q)(h c4 q. d4 e e4 -q w c4 h d4 q e4 -q)(h c4 q. d4 e e4 -q w c4 h d4 q e4 -q)))

(do-section '(0 1 0) '(motive-subdivision x '(1/8)) mat)

Hi Julio,

One possibility is to use the MAYBE-SECTION function within your function.

However, Janusz has more powerful tricks to add :section and :exclude in functions. 😊
Additionally, I believe it would be beneficial to include a slot for possible intervals in this function, similar to the ones we have in the length-divide and length-subdivision functions.

Best

Stéphane

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.