Jump to content

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)

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy