RST Posted July 17, 2024 Posted July 17, 2024 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? Quote
jesele Posted July 18, 2024 Posted July 18, 2024 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 RST 1 Quote
opmo Posted July 18, 2024 Posted July 18, 2024 remove-bar select-measure retain-bar search the system for bar Quote
RST Posted July 18, 2024 Author Posted July 18, 2024 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! Quote
jesele Posted July 19, 2024 Posted July 19, 2024 Couldn't you use (omn-to-measure material 4/4) remove the bars, then (flatten-omn material) Jesper Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.