Jump to content

AM

Members
  • Posts

    772
  • Joined

  • Last visited

Everything posted by AM

  1. i coded a new/alternative version of LENGTH-INVERT. i used it for a so called BINARY-FILTER (for events) - have a look to the example and you see the reason. in some cases you will have a much better DISPLAY/SCORE, is there an OPMO version for that? greetings andré ;;; -------------------------------------------------------- ;;; VERSION WITH OPMO length-invert ;;; -------------------------------------------------------- (defun binary-filter-old (alist bin-list) (let ((event-list (cond ((omn-formp alist) (single-events alist)) (t alist)))) (flatten (loop for i in event-list for j in bin-list when (= j 1) collect i else append (list (length-invert (car i))))))) ;;; -------------------------------------------------------- ;;; VERSION WITH OWN length-invert ;;; -------------------------------------------------------- (defun binary-filter* (alist bin-list) (let ((event-list (cond ((omn-formp alist) (single-events alist)) (t alist)))) (flatten (loop for i in event-list for j in bin-list when (= j 1) collect i else append (list (length-invert** (car i))))))) (defun length-invert** (length-val) (append (compress (list '- length-val)))) EXAMPLE WITH THE ORIGINAL VERSION: ;;; EXAMPLE => complex rhythms (setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t) :pitch '(a4))) ;;; when you use my BINARY-FILTER_OLD which has the OPMO length-invert you will get a strange display-result (looks bad) ;; have a look with cmd3 (binary-filter-old omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1)) => (-1/32 s a4 mf -1/32 3q a4 mf -13/96 t a4 mf -1/10 5h a4 mf -3/35 7q a4 mf -1/28 7q a4 mf -1/28 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf) EXAMPLE WITH USING THE ALTERNATIVE VERSION: ;;; EXAMPLE => complex rhythms (setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t) :pitch '(a4))) ;;; when you use the new BINARY-FILTER with the new length-invert** ;; have a look with cmd3 (binary-filter* omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1)) => (-t s a4 mf -t 3q a4 mf -3e_s. t a4 mf -5h 5h a4 mf -5q_7q 7q a4 mf -7q 7q a4 mf -7q 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf) ;;; you see the FORMAT (-3e_s.) didn't changed in the rests (not -13/96), so it will be displayed well
  2. ;;; FUNCTION: for some coding-cases i needed THIS function, to keep the OMN-notation ;;; and not to change to RATIO (otherwise i got strange results in NOTATION because the "ties are gone") (defun length-invert** (length-val) (append (compress (list '- length-val)))) ;;; EXAMPLES ;;; new => keeps OMN (length-invert** (car '(q e4 mp))) => -q ; in this case i wanted to keep the format with tie (length-invert** (car '(3q_q e4 mp))) => -3q_q ;;; original => changes to ratio (length-invert (car '(q e4 mp))) => -1/4 ; no tie here! i was in trouble :-) (length-invert (car '(3q_q e4 mp))) => -1/3
  3. i get an error... when i evaluate this (setf with-ch1 (omn-articulation-processor map (pitch-ornament (make-chord-if-length flow1 :interval-list '((-7 -19 3 9)(-4 -16 3 7) (-5 -17 4 12)(-3 -15 7)) :cycle nil :relative t :seed 729358 )))) > Error: OMN Parse Error: fail > While executing: omn-to-ast, in process Listener-2(13). > Type cmd-. to abort, cmd-\ for a list of available restarts. > Type :? for other options. ... problem seems to be: "omn-articulation-processor"
  4. okay... i think CT is also working on this problem?!
  5. OVERWRITE FUNCTION: first time i'm working with this function (i coded it a year ago)... to overwrite the output/score => INSERTS.... - and it's very useful, perhaps JANUSZ could code an official OPMO-version of this which works perfect? greetings andré ;;; OVERWRITE!! ---------------------------------------------- (defun memberp (n liste) (not (equal 'nil (member n liste)))) (defun get-resolution2 (be) (cond ((memberp (cadr be) '(3 6 12 24 48)) 1/24) ((memberp (cadr be) '(1 2 4 8 16 32)) 1/16) ((memberp (cadr be) '(5 10 20 40)) 1/20) ((memberp (cadr be) '(7 14 28 56 1)) 1/28))) (defun overwrite (seq &key insert bar/beat) (car (last (let ((bar) (beat) (resolution) (distance)) (progn (setf bar (loop for i in bar/beat collect (car i)) beat (loop for j in bar/beat collect (cadr j))) (loop for ba in bar for be in beat for ins in insert with time-sign = (get-time-signature seq) with ord-time-sign = (get-time-signature seq) do (setf resolution (get-resolution2 be) time-sign (if (listp (car time-sign)) (loop for i in time-sign when (> (caddr i) 1) append (loop repeat (caddr i) collect (list (car i) (cadr i))) else collect (list (car i) (cadr i))) (append time-sign)) distance (if (listp (car time-sign)) (+ (sum (loop repeat (- ba 1) for i in time-sign collect (/ (/ (car i) (cadr i)) (get-resolution2 be)))) (/ (/ (1- (car be)) (cadr be)) (get-resolution2 be))) (+ (/ (* (1- ba) (/ (car time-sign) (cadr time-sign))) (get-resolution2 be)) (/ (/ (1- (car be)) (cadr be)) (get-resolution2 be))))) do (setf seq (omn-to-time-signature (length-rest-merge (omn-merge-ties (flatten (loop repeat (length (omn-to-time-signature seq (list (numerator resolution) (denominator resolution)))) for cnt = 0 then (incf cnt) with new-seq = (omn-to-time-signature seq (list (numerator resolution) (denominator resolution))) with ins-rounded = (append ins (rest (length-rational-quantize (list (apply '+ (omn :length ins))) :round resolution))) when (= cnt distance) collect ins-rounded and do (setf cnt (+ (/ (get-span (flatten ins-rounded)) resolution) cnt -1)) else collect (nth cnt new-seq))))) ord-time-sign)) do (setf time-sign ord-time-sign) collect seq)))))) TWO EXAMPLES: ;;; in a 3/4 (setf seq1 '((e c6 a5 h b5 tie) (q b5 b5 a5 tie) (h a5 q a5) (h. g5))) (overwrite seq1 :insert '((3q c5 b4 bb4 a4) (3q c4 b3 bb3 a3)) :bar/beat '((2 (2 12)) (3 (7 12)))) ;;; with changing time-signatures (setf seq2 '((e c6 a5 h b5 q tie) (q b5 b5 a5 tie) (q a5 q a5) (h. g5))) (overwrite seq2 :insert '((3q c5 b4 bb4 a4) (3q c4 b3 bb3 a3)) :bar/beat '((1 (2 12)) (3 (1 12))))
  6. short information about this from CT: "Currently, only the VST plugin does the pitch bend correctly, there was some reason why I did not fix the problem with the Max version, but I'll take it now. In the short term, you can also solve it by sending the pitchbend value immediately after each noteon. Pitchbend + - tritone." https://www.contimbre.com/en/ but how to how to send "the pitchbend value immediately after each noteon. Pitchbend + - tritone." ...i have no idea, i will wait for the UPDATE
  7. another EXAMPLE, with mapped pitches/cents ;;; ----------------------------------------------------------------------------------------- ;;; MAPPED CENTS/PITCHES ;;; ----------------------------------------------------------------------------------------- ;(setf pitches (rnd-repeat 100 '(d1 c2 g3 c4 d4 e4 f4 g4 gs4 bb4 c5 d5 e5 f5 g5 gs5 bb5))) (setf pitches (rnd-repeat 100 '(e4 f4 g4 gs4 bb4 c5 d5 e5 f5 g5 gs5 bb5))) (setf centlist (replace-map '(((bb4 bb5) -31ct) ((c4 c5 c2) 0ct) ((d1 d4 d5) 2ct) ((e4 e5) -14ct) ((f4 f5) 50ct) ((g3 g4 g5) 5ct) ((gs4 gs5) 41ct)) pitches :otherwise '0ct)) (setf omn-seq (make-omn :length (quantize (gen-white-noise 50) '(2 3 5) :scale 0.8 :tolerance 0.02) :pitch (filter-repeat 1 pitches) :span :pitch :velocity (vector-to-velocity 0.1 0.99 (gen-white-noise 50)) :articulation centlist)) ;;; generating SCORE/MIDI (def-score microtonal (:title "microtonal" :key-signature 'atonal :time-signature '(4 4) :tempo 160) (instr :omn omn-seq :channel 1 :tuning (get-tuning-from-omn* omn-seq centlist) :sound 'gm :program 'acoustic-grand-piano))
  8. EXAMPLE, very easy to use... ;;; EXAMPLE HOW TO USE <get-tuning-from-omn*> (setf centlist (add-cents-tuning-to-text-atrributes :type :float)) ;;; generating a omn-seq with mictronoes (by using articulation-SLOT (setf omn-seq (make-omn :length (quantize (gen-white-noise 50) '(2 3 5) :scale 1.4 :tolerance 0.02) :pitch (filter-repeat 1 (vector-to-pitch '(c2 b6) (gen-white-noise 50))) :span :pitch :velocity (vector-to-velocity 0.1 0.99 (gen-white-noise 50)) :articulation (rnd-repeat 50 '(0ct 7ct -5ct 16ct -31ct -14ct 50ct -50ct)))) ;;; generating SCORE/MIDI (def-score microtonal (:title "microtonal" :key-signature 'atonal :time-signature '(4 4) :tempo 120) (instr :omn omn-seq :channel 1 :tuning (get-tuning-from-omn* omn-seq centlist) :sound 'gm :program 'acoustic-grand-piano))
  9. 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
  10. piano-layout + merge-voices (no idea about the stems, use notation software for layouting?)
  11. with these functions you could write your CENTS for tuning directly into OMN-attributes, and extract it afterwards 1. generate by add-cents-tuning-to-text-atrributes the cent values into text-attributes (only one time), you could decide if it will be shown in the score "as CENTS or as FLOAT" 2. now you could write your CENTS for tuning into OMN-attributes like 50ct, -34ct ...also in combination with other text-attributes legno+50ct, pizz+-65ct, -45ct+batt 3. you could EXTRACT afterwards your LIST for TUNING directly from OMN by get-tuning-from-omn*.if an EVENT has no cent-attribute it will be unchangend (= 0 cents) ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- ;;; this function adds CENTS or FLOATS to text-attributes, in this way you can notate ;;; - have a look how it's written in the score -> all combinations of attributes possible ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- (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 0 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) ;;; you can combine all kinds of attributes ;;; ------------------------------------------------------------------------------------------------------------------- ;;; ------------------------------------------------------------------------------------------------------------------- (defun memberp (n liste) (not (equal 'nil (member n liste)))) (defun find-duplicates (lst) (cond ((null lst) '()) ((member (car lst) (cdr lst)) (cons (car lst) (find-duplicates (cdr lst)))) (t (find-duplicates (cdr lst))))) (defun get-tuning-from-omn* (omnlist centlist) (loop for i in (single-events (length-rest-remove omnlist)) with n = 0 when (not (null (find-duplicates (append (disjoin-attributes (car (last i))) centlist)))) do (setf n (float (/ (append (compress (remove-if-not #'numberp (explode (car (find-duplicates (append (disjoin-attributes (car (last i))) centlist))))))) 100))) and collect (if (equal (car (explode (car (find-duplicates (append (disjoin-attributes (car (last i))) centlist))))) '-) (* -1 n) n) else collect 0)) ;;; EXAMPLES (setf centlist (add-cents-tuning-to-text-atrributes :type :float)) ;;; evaluate this and you will get the tuning-list with all combinations of attributes (get-tuning-from-omn* '(-q -q e c4 fff q c4 mf legno+50ct+num1 e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist) => (0 0.5 0.5 -0.34) (get-tuning-from-omn* '(-q -q e c4 fff -34ct+pizz q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist) => (-0.34 0.5 -0.5 -0.34) (get-tuning-from-omn* '(-q -q e c4 fff -34ct+pizz+num11 q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist) => (-0.34 0.5 -0.5 -0.34) ;;; cmd3 for LAYOUT/SCORE (-q -q e c4 fff -34ct+pizz+num11 q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) (-q -q e c4 fff q c4 mf legno+50ct+num1 e c4 mf -50ct+legno+batt+num2 e c5 ff pizz+legno+-34ct)
  12. 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)
  13. this is the simple solution... (defun add-numbers-to-text-attributes (a b) (loop for i from a to b append (add-text-attributes (list (compress (list 'nr i)) (write-to-string i))))) (add-numbers-to-text-attributes 12 23) => (nr12 nr13 nr14 nr15 nr16 nr17 nr18 nr19 nr20 nr21 nr22 nr23)
  14. let me try (and fail perhaps), but thanx for the hint!
  15. that would be brilliant! p.s. In about a year, I will control (and generate the DATAS to) the polytempo network (screens + conducting) as well as the e-player and the music score (parts) directly from OPUSMODUS
  16. 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..
  17. I do not work / almost never with DAW's. OPMO (before pwgl) and sibelius. i think the conTimbre library is much better - not all samples are quite perfect, but the selection of playing techniques eg. in the strings or in the drums is just very good. my last piece was for ensemble, virtual conductor and e-player (a piece whitch generates its form in quasi-realtime (completely new every time) - by sochastic/markov-procedures) - it was possible to play the add-SCORE from the library directly at the concert (midi-files read out with flexible tempo and played on CT) without any problems - mix extremely well with the live instruments. I do not think the library is very user-friendly, but I do not produce music (i compose, which - in my view - is a different kind of thinking), so that's not so important for me. but it contains many extra features and (or information about sound analysis (and apparently a direct access to LISP to make algorithmic orchestrations) as I said, not quite smart designed, but the possibilities (compared to the IRCAM library) I feel as much bigger. CT can now also play well from SIBELIUS / FINALE over VST. so I would be much happier if CT ran so well (with microtonal stuff) on OPUSMODUS.
  18. 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é
  19. thank you torsten - this MIDI-thing is too complicated for me (i don't know how to send, nothing happens). TUNING works properly with UVIworkstation (ircam solo-instrments). so it stays a BLACKBOX-thing why conTimbre doesn't work
  20. the only answer i got was that it works with "midi pitch bend" and with MAX. ConTimbre: "With Max you can just send floating point pitches, and with MIDI you can either send pitch bend values, but that always affects the whole voice. But you can also detune every key and, for example, use several Voices with the same timbre, but they have mutually detuned keyboards to get more than 128 pitches. " this will probably not solve the problem. maybe it would be best if OPMO's and ConTimbre's guys communicate directly? that would be in the interest of both companies...(?)
  21. i have written them (CT) a mail now to get some more information
  22. program-changes are no problem but how to make pitch-bend via opusmodus....? here is the MANUAL: ePlayer_Manual_Mac_english.pdf i know, but i will need microtonal-NOTATION
×
×
  • Create New...