AM Posted October 18, 2018 Share Posted October 18, 2018 dear janusz  is there an OPMO-solution to put the FLOAT for tuning in every event (with pitch) . some times ago i coded such an "add-data-to-event"-function for my own, but a OPMO-one would be more professional  greetings andré torstenanders 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted October 18, 2018 Share Posted October 18, 2018 Check the GET-RUNNING function. This will explain as well how to use floats in tuning. Quote Link to comment Share on other sites More sharing options...
AM Posted October 18, 2018 Author Share Posted October 18, 2018 i need something like this ((t b4 mp nr0 0.3) (-he.) (-whe..) (s. eb4 ppp nr3 0.5) (s g4 pp nr4 0) (t fs3 fff mute 0.3) (s. gs4 ppp nr6 0) (-e..)) so it's possible keep the overview which PITCH is TUNED and which is not... this way i can make precise assignments. for example: i code a score with no microtonal structures, but afterwards i want to INSERT/OVERWRITE some pitches/liitle sections with microtonal... so the EVENT-thing seems better for me to keep the overview/control, then to have ALWAYS a seperate list. so i will write TUNING-float into EVENTS, and a function GENERATES afterwards the correct LIST for tuning.  i will post the FUNCTIONS later..  Quote Link to comment Share on other sites More sharing options...
opmo Posted October 18, 2018 Share Posted October 18, 2018 No, you can't do that. The float is reserved for velocity. Quote Link to comment Share on other sites More sharing options...
AM Posted October 18, 2018 Author Share Posted October 18, 2018 let me try (and fail perhaps), but thanx for the hint! Quote Link to comment Share on other sites More sharing options...
AM Posted October 19, 2018 Author Share Posted October 19, 2018 here is a solution - on attributes-level. next step will be to do/code it with "JOINED-attributes"... thanxs for tests and hints!  ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- ;;; this function adds CENTS or FLOATS to text-attributes, in this way you can notate ;;; - have a look how ii's written in the score ;;; (defun add-cents-tuning-to-text-atrributes (&key (centlist nil) (type nil)) (loop for i in (loop for x in (if (null centlist) (append (loop for i from 1 upto 99 collect i) (loop for i from 1 upto 99 collect (neg! i))) centlist) collect (compress (list x 'ct))) append (add-text-attributes (list i (write-to-string (if (equal type :float) (float (/ (append (compress (if (equal (car (explode i)) '-) (if (= (length (explode i)) 5) (filter-first 3 (explode i)) (filter-first 2 (explode i))) (if (= (length (explode i)) 4) (filter-first 2 (explode i)) (filter-first 1 (explode i))) ))) 100)) i)))))) ;;; EXAMPLES (add-cents-tuning-to-text-atrributes :type :float) ;; have a look to notation: cmd3 (-q -q e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff) (add-cents-tuning-to-text-atrributes :type :cents) ;; cents are written ;; have a look to notation: cmd3 (-q -q e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff) ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- ;;; this function get out all notated microtones for TUNING ;;; if there is nothing written it will be 0 cents (0) (defun memberp (n liste) (not (equal 'nil (member n liste)))) (defun get-tuning-from-events (omnlist centlist) (loop for i in (single-events (length-rest-remove omnlist)) when (memberp (car (last i)) centlist) do (setf n (float (/ (append (compress (remove-if-not #'numberp (explode (car (last i)))))) 100))) and collect (if (equal (car (explode (car (last i)))) '-) (* -1 n) n) else collect 0)) (setf centlist (add-cents-tuning-to-text-atrributes :type :float)) ;;; evaluate this and you will get the tuning-list (get-tuning-from-events '(-q -q e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff) centlist) => (0 0.5 -0.4 0)  Quote Link to comment Share on other sites More sharing options...
torstenanders Posted October 20, 2018 Share Posted October 20, 2018 > Check the GET-RUNNING function. This will explain as well how to use floats in tuning.  Is that a new function? It is not available in my image.  Best, Torsten  -------------------------- Unfortunately, evaluating add-cents-tuning-to-text-atrributes results in an error for me.  > Error: ((= (length (explode i)) 5) (filter-first 3 (explode i))  (filter-first 2 (explode i))) can't be destructured against the lambda list (ccl::test true &optional false), because it contains 4 elements, and at most 3 are expected. > While executing: (:internal ccl::nx1-compile-lambda), in process Listener-2(9). Quote Link to comment Share on other sites More sharing options...
AM Posted October 20, 2018 Author Share Posted October 20, 2018 dear torsten, i get no ERROR!? but here would be the newer/complete version.. Â Â p.s. i think it should be GET-TUNING and not GET-RUNING Â Quote Link to comment Share on other sites More sharing options...
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.