Jump to content
  1. Stephane Boussuge

    Stephane Boussuge

  • Similar Topics

    • By AM
      hi all
       
      i'm trying to code a PM-function with an OVERWRITE, so that the global-lengths stays correct... i'm working this evening with some ideas for that and this is only a first sketch of a basic idea, don't know if it will work later...
       
      i have one little ordinary problem: to find/insert/overwrite i have to split the original sequence into small parts... that's the RESOLUTION, so i have a list with OMN-events in the span of the resolution. and a lot of TIEs -> at the end i would like to remove the tied-lengths by ordinary lengths? how? filter-tie works not with all insert-examples.... what can i do...?
       
      thanx
      andré
       
      ;;; -------------------------------------------------------------------------------------------- ;;; OVERWRITE -> überschreibt eine sequenz bei PM -> resolution einstellbar ;;; -------------------------------------------------------------------------------------------- ;;; ausgangs-sequenz (setf seq '(q c4 d4 e. e4 s f4 h g4)) ;;; inserts => test different INSERTS (setf insert '(t gs5 g5 fs5 f5 e5)) ;(setf insert '(q gs5 -e e gs5)) ;(setf insert '(1/24 gs5 1/24 1/24)) ;;; pattern => if such a pattern matched => now INSERT starting at PITCH f4 (setf pattern '(? f4)) ;;; resolution of SCANNING/INSERTING (setf resolution 1/16) ;;; -------------------------------------------------------------------------------------------- (setf omn-old seq) (setf omn-new (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 insert-rounded = (append insert (rest (length-rational-quantize (list (apply '+ (omn :length insert))) :round resolution))) when (pattern-matchp (nth cnt new-seq) pattern) collect insert-rounded and do (incf cnt (/ (apply '+ (abs! (omn :length insert-rounded))) resolution)) collect (nth cnt new-seq))) (setf omn-new (flatten omn-new)) ;;; -------------------------------------------------------------------------------------------- (def-score test (:title "test" :key-signature 'atonal :time-signature '(4 4) :tempo 90 :layout (bracket-group (treble-layout 'new) (treble-layout 'old))) (new :omn omn-new :channel 1 :port 1 :sound 'gm :program 'acoustic-grand-piano) (old :omn omn-old :channel 1 :port 1 :sound 'gm :program 'acoustic-grand-piano))  
      added 4 minutes later some other ideas to the main problems or some great solutions are very welcome :-)
    • By AM
      dear all
      i'll try to code a function that overwrites the SEQ with an insert after a pattern-match... not so simple, because to calculate all the length-values in the SEQ so that there ist no "shifting" ist very....
       
      here an easy sketch... but with a simple, so that i haven't got to calculate (beacuse all is mapped on quaternotes)...
      i hope anyone could CODE that... would be an interesting FUNCTION!!! using things as a NET!!
       
      compare -> seq with the function output... the you see the idea
       
       
      (setf seq '(e c4 -e -q q d4 -q s c4 -e. -h. q)) (setf insert '(3q c4 d4 e4 c4 d4 e4 c4 d4 -3q)) (setf insert-span (loop for i in (omn :length insert) sum (abs i))) (progn (setf new-list (loop for i in (single-events seq) with match = 0 when (pattern-matchp i '(q d4 ?)) do (setf match 1) when (= match 1) collect (abs (car (omn :length i))) into bag when (and (= match 1) (<= (sum bag) insert-span)) collect (* -1 (abs (car (omn :length i)))) else collect i )) (flatten (loop for x in new-list with match = 0 when (and (atom x) (= match 0)) collect insert and do (setf match 1) when (listp x) collect x)))  
×
×
  • Create New...