AM Posted July 2, 2018 Posted July 2, 2018 you can filter all events by length (>= min). all other events will be replaced by rests... (defun filter-events-by-length (omnlist &key min) (let ((omnlist (single-events omnlist)) (min (car (omn :length (list min))))) (flatten (length-rest-merge (loop for i in omnlist when (>= (car (omn :length i)) min) collect i else collect (neg! (car (omn :length i)))))))) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'e) => (e c4 mf e d4 mf e e4 mf e e5 mf q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'q) => (-h q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'h) => (-wq h c4 mf h d4 mf h e4 mf) opmo 1 Quote
AM Posted July 3, 2018 Author Posted July 3, 2018 @janusz: you could expand it with conditionals like >, <, =, span .... and implement it.... and... if you would write this function with conditionals for pitches (sequences of pitches) you could filter by vector-envelope... opmo 1 Quote
AM Posted July 3, 2018 Author Posted July 3, 2018 for pitch-seq or length-seq + vector-envelope you will need SPAN 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.