Jump to content

Function for removing a bar or bars from an OMN sequence


Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy