Jump to content
Sign in to follow this  
AM

rest-diminution/augmentation

Recommended Posts

i needed functions which shorten/enlarge only the RESTS of my complex/tupled-mixed texture - not precisely - so i coded it with diminution/augmentation+round (otherwise i would be in trouble by the crazy rests)...

violà... use it or code it smarter for OMPO! greetings andré

 

3 functions:

rest-diminution

rest-augmentation

only-length-augmentation

 

 

;;;

(defun rest-diminution (omnlist &key (factor 1) (round 1/4))
  (length-rest-merge 
   (flatten (loop for i in (single-events (length-rest-merge omnlist))
              when (< (car (omn :length i)) 0)
              collect (length-rational-quantize (length-diminution factor i) :round round)
              else collect i))))

(rest-diminution '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/4)
=> (-q e4 mp -h e e4 ff)

(rest-diminution '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/8)
=> (-e q e4 mp -q. e e4 ff)

;;;

(defun rest-augmentation (omnlist &key (factor 1) (round 1/4))
  (length-rest-merge 
   (flatten (loop for i in (single-events (length-rest-merge omnlist))
              when (< (car (omn :length i)) 0)
              collect (length-rational-quantize (length-augmentation factor i) :round round)
              else collect i))))

(rest-augmentation '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/4)
=> (-q e4 mp -d. e e4 ff)

(rest-augmentation '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/8)
=> (-q e4 mp -d. e e4 ff)

;;;

(defun only-length-augmentation (omnlist &key (factor 1) (round 1/4))
  (length-rest-merge 
   (flatten (loop for i in (single-events (length-rest-merge omnlist))
              when (> (car (omn :length i)) 0)
              collect (length-rational-quantize (length-augmentation factor i) :round round)
              else collect i))))

(only-length-augmentation '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/8)
=> (-3q h. e4 mp -w q. e4 ff)

(only-length-augmentation '(-3q q e4 mp -w e e4 ff) :factor 3 :round 1/4)
=> (-3q h. e4 mp -w q. e4 ff -e)

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×