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.

Why is type :duration, :leg :ped not supported in omn-replace

Featured Replies

(setf mat1 '(e g4 f leg gs4 fs4 mf ped a4
            s f4 p bb4 e4 b4 eb4 c5 d4 cs5))

(setf matz '(h^e g4 f leg gs4 fs4 mf ped a4
            q^s f4 p bb4 e4 b4 eb4 c5 d4 cs5))

(omn :duration mat1)
;=>(1/8 1/8 1/8 1/8 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16)

(disassemble-omn mat1)
;=>(:length (1/8 1/8 1/8 1/8 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16) :pitch (g4 gs4 fs4 a4 f4 bb4 e4 b4 eb4 c5 d4 cs5) :velocity (f f mf mf p p p p p p p p) :articulation (- - - - - - - - - - - -) :leg (1 -11) :ped (-2 1 -9))
; :duration missing


(omn :duration matz)
;=>(1/8 1/2 1/2 1/2 1/16 1/4 1/4 1/4 1/4 1/4 1/4 1/4)
(disassemble-omn matz) 
;=>(:length (1/2 1/2 1/2 1/2 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4) :pitch (g4 gs4 fs4 a4 f4 bb4 e4 b4 eb4 c5 d4 cs5) :velocity (f f mf mf p p p p p p p p) :duration (1/8 1/2 1/2 1/2 1/16 1/4 1/4 1/4 1/4 1/4 1/4 1/4) :articulation (- - - - - - - - - - - -) :leg (1 -11) :ped (-2 1 -9))


(omn-replace :duration '(1/8 1/8 1/8 1/8 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16) matz )  
;=> Error: There is no type named: :duration.
;Allowed TYPES: :length, :pitch, :velocity and :articulation

There is no need for :duration here but can be added.

For edit etc... we use the dictum function.

The omn-replace should be removed from the system. Possibily in the future the function will stop be documented.

  • Author

I wrote my own little rk_omn-replace to see what could be done with :duration etc.

Could you give an example how (rk_omn-replace :duration (rnd-sample 100 '(0.5 0.25 0.75 1.5 2)) (rnd-sample  100  mat)) could be done with dictum.

How is :duration addressed in dictum?

 

(defun rk_omn-replace ( type replacel omnl)
  (let* (    
       (len (omn :length omnl))
       (pit (omn :pitch omnl))
       (vel (omn :velocity omnl))
       (dur (omn :duration omnl))
       (arti (omn :articulation omnl))
       (vleg (omn :leg omnl))
       (vped (omn :ped omnl))
       (rlen (if (equal type :length)  replacel len)) 
       (rpit (if (equal type :pitch) replacel pit)) 
       (rvel (if (equal type :velocity) replacel vel)) 
       (rdur (if (equal type :duration) replacel (if (equal 0 (search len dur )) (span pit rlen) dur)))
       (rarti (if (equal type :articulation) replacel arti)) 
       (rleg (if (equal type :leg) replacel vleg)) 
       (rped (if (equal type :ped) replacel vped)) 
      )    
    (make-omn :length rlen :pitch rpit :velocity rvel :duration rdur :articulation rarti  :leg rleg :ped rped 
              :span (if (equal type :length) :pitch :length))
  )
)

(setf mat1 '(e g4 f leg gs4 fs4 mf ped a4 s f4 p bb4 e4 b4 eb4 c5 d4 cs5))
(setf mat2 '((e g4 f leg gs4 fs4 mf ped a4) (s f4 p bb4 e4 b4 eb4 c5 d4 cs5)))
(setf mat3 '(h^e g4 f leg gs4 fs4 mf ped a4 q^s f4 p bb4 e4 b4 eb4 c5 d4 cs5))

(setf mat mat1)

 

(rk_omn-replace :length '(1/16 1/2 1/4 1 1/32 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/64 1/64) mat)
(rk_omn-replace :length '(1/16 ) mat)
(rk_omn-replace :pitch '(c4 d4) mat)
(rk_omn-replace :duration '(0.5 0.25 0.75 2) mat)
(rk_omn-replace :duration (rnd-sample 100 '(0.5 0.25 0.75 1.5 2)) (rnd-sample  100  mat))
(rk_omn-replace :duration (gen-noise 100) (rnd-sample  100  mat))
(rk_omn-replace :articulation '(stacc pizz) mat)
(rk_omn-replace :leg '(-1 1 -3 1) mat)
(rk_omn-replace :ped '(1) mat)

 

 

 

 

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.