opmo Posted February 17, 2021 Share Posted February 17, 2021 – New Function: BAR-TO-SEC - converts bar span to seconds values. – Revision: OMN-DICTUM - changed to dictum grammar, additional functionality – Fixed: OMN-REPLACE - ignored tie attribute when edition articulations. OMN-DICTUM (revision) (:all <value>) replaces all values of its type with a new value. (<value><value>) replaces a value with a new one if found. ((:values <values>) <value>) replaces values with a new one if found. (:remove <value>) removes a value from the sequence if found. (:remove :velocity) removes velocities from the sequence. (:remove :attribute) removes attributes from the sequence. (:remove :event) converts an event into a pause. (:first <value><bar-num>) replaces a value in the first event in a given bar. (:last <value><bar-num>) replaces a value in the last event in a given bar. ((:range <low><high>) <value>) replaces a value when in range. (<value><value><bar-num>) replaces a value in a given bar. (<value><value><bar-num><event-num>) replaces a value in event number in a given bar. The function OMN-DICTUM allows you to edit an omn-form sequence on an event element basis (l p v a). The elements and its values can be changed, removed or added by applying dictum arguments to one or all events within a sequence. The dictum arguments can be seen as maps, rules or handwritten corrections to a final score. Dictum arguments are applied in consecutive order to all or selected events. Examples: Examples with a single list: (setf omn '(q c4 p leg d4 mf e4 leg f4 e g4 f a4 b4 c5)) Add a stacc attribute to a 1/8 length note: (omn-dictum '(e stacc) omn) Replace velocities with a f velocity value: (omn-dictum '(:all f) omn) Remove a leg attribute first, then replace velocities with a f velocity value: (omn-dictum '((:remove leg) (:all f)) omn) Replace a leg attribute with a tr1 attribute first, then replace velocities with a f velocity value: (omn-dictum '((leg tr1) (:all f)) omn) Add a ten attribute to a 1/4 length note, replace velocities with a p velocity value, add a stacc attribute to a 1/8 length note and finally replace any event with a f velocity value to a 1/8 length note: (omn-dictum '((q ten) (:all p) (e stacc) (e f)) omn) (omn-dictum '((q ten) (:remove mf) (e leg)) omn) (omn-dictum '(((q c4) gliss) ((q d4) arco) (:remove mf) (e leg+tasto)) omn) Examples with sublists: (setf omn2 '((q c4 p leg d4 mf e4 leg f4 e g4 f a4 b4 c5) (q c4 mf d4 e4 f4 e g4 mp a4 3q b4 c5 d5))) Remove velocities and attributes from the sequence: (omn-dictum '((:remove :attribute) (:remove :velocity)) omn2) (omn-dictum '(e stacc) omn2) The third argument defines the bar number to which the dictum is applied: (omn-dictum '((e stacc 1) (e leg 2) (3q leg 2)) omn2) (omn-dictum '((:remove mf 1) (leg leg+marc) (a4 leg 2)) omn2) (omn-dictum '((mf pp) (pp ped 1)) omn2) (omn-dictum '((mf pp) (q ponte 2) (e ord 2)) omn2) The fourth argument in a dictum is the event number. In the third dictum (:remove leg 1 8 ) the leg attribute is removed from the 8th event in the first bar: (omn-dictum '((f leg) (f4 tr1 1) (:remove leg 1 8 ) (:remove :event 1 2) (:first ord 2) (:remove :event 2 4) (e tasto 2)) omn2) (omn-dictum '((:remove :velocity) (:all < 1) (:first p 1) (:last f 1) (:all > 2) (:last p 2)) omn2) The dictum ((:range c4 e4) stacc) means stacc attribute will be added to every pitch between c4 and e4: (omn-dictum '(((:range c4 e4) stacc) ((:values f mf) p)) omn2) The dictum ((:values f mf) e) means every event with velocity values f and mf will change any length to 1/8 length note: (omn-dictum '((:remove :attribute) ((:values f mf) e)) omn2) (omn-dictum '((:remove leg) (q tr1 :all 1) (g4 marc) ((:values f mf) e)) omn2) Link to comment Share on other sites More sharing options...
Recommended Posts