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.

Function for removing a bar or bars from an OMN sequence

Featured Replies

Greetings all:

 

Is there such a function for removing a bar, or a contiguous number of bars from an OMN sequence?

I have been working with "dictum" but I have not been successful in achieving my goal.

 

In this case I have a piece with 24 measures and I would like to remove bars 16 and 17 and rewrite the sequence with these omitted.

 

Thanks for any tips on this.

 

I found this way to do it:

(setf piano-omn-d-e (compile-score

                                    '((piano :start 1 :end 15)
                                      (piano :start 18 :end 24))))

 

But, I wonder if this is the only, or "best" approach.

 

Is there any function that will work to "edit" at the beat level within a bar of OMN?

This might work.

 

(defun remove-bars (omn-seq bars)
  (loop for barnum from 0 and bar in omn-seq
        unless (member barnum bars) collect bar)
  )

(setf res (remove-bars material '(17 18)))
 

;; remember that the first bar is bar 0 so you might have to write '(16 17)

 

Jesper

  • Author

Remove bar seems to work on a "sequence of bars" but it did not work for me on a formatted OMN stream of data.

Is there a formatting or use suggestion for doing that?

The documentation shows the argument as sequence and there is only one example of use in the documentation.

 

With thanks,

 

17 hours ago, jesele said:

This might work.

 

(defun remove-bars (omn-seq bars)
  (loop for barnum from 0 and bar in omn-seq
        unless (member barnum bars) collect bar)
  )

(setf res (remove-bars material '(17 18)))
 

;; remember that the first bar is bar 0 so you might have to write '(16 17)

 

Jesper

 

It seems that creating a function will be the best way forward.  I will try this and see what I can do.

Any thoughts for doing this on the level of the beat (meter) of the bar?

Comment and help is greatly appreciated!

Couldn't you use 

(omn-to-measure material 4/4)

remove the bars, then 

(flatten-omn material) 
 

Jesper

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.