erka Posted December 12, 2024 Posted December 12, 2024 I would like to change with dictum the first event in the first bar ( or whatever) to a rest of the same length. I tried several things but could not do it. (setf omn2 '((5q fs4 p - bb3 f3 e4 -3q g4 c5 s eb5 mf a5 cs6 gs6) (5q gs6 f cs6 a5 eb5 - -s c5 g4 e4))) (dictum '( :do -5q :bar 1 :event 1 ) omn2) ;does not work. The length and not the rest is set. ;=>((5q fs4 p - bb3 f3 e4 -3q g4 c5 s eb5 mf a5 cs6 gs6) (5q gs6 f cs6 a5 eb5 - -s c5 g4 e4)) (dictum '( :do -q :bar 1 :event 1 ) omn2) ;same here ;=> ((q fs4 p -5q bb3 f3 e4 -3q g4 c5 s eb5 mf a5 cs6 gs6) (5q gs6 f cs6 a5 eb5 - -s c5 g4 e4)) A function to change a length to the same rest I did not find. Anyone any idea how to do that. Maybe a dictum option like :do :rest would be possible (or something like this) Probably there is an easy way and I didn't find it. Quote
jesele Posted December 12, 2024 Posted December 12, 2024 No dictum expert but try this. (dictum '((:bar 1 :event 1 :do (gen-pause x))) omn2) Jesper opmo and erka 2 Quote
erka Posted December 13, 2024 Author Posted December 13, 2024 Thank you. Works. I was searching in the assistant for a function with "rest" in it. Didn't think about searching for "pause". But: (dictum '( :do -q :bar 1 :event 1 ) omn2) should either throw an error if rests are not supported or change the event to a rest and not to a length. And an option to maybe ":do - :bar 1 :event 1" (or something like it) would be nice if you want to change for the same rest-length . Rolf Quote
jesele Posted December 13, 2024 Posted December 13, 2024 Found a few other ways. Jesper (setf r1 (dictum '((:bar 1 :event 1 :do (gen-pause x))) omn2)) (setf r2 (dictum '((:bar 1 :event 1 :do (- (omn-encode (car x))))) omn2)) (setf r3 (dictum '((:bar 1 :event 1 :do (length-to-rest (car x) x))) omn2)) (setf r4 (dictum '((:bar 1 :event 1 :do (length-invert x))) omn2)) JulioHerrlein, Stephane Boussuge and erka 1 2 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.