Jump to content

AM

Members
  • Content count

    433
  • Joined

  • Last visited

  • Days Won

    94

Reputation Activity

  1. Like
    AM reacted to Stephane Boussuge in omn-voice-generator 1 (svoice1)   
    Hi, 
    here are the two functions i use daily in my workflow.
     
    The first gen-pitch-line can be used as this but is also required for the second function svoice1.
     
    svoice1 is a generic omn generator i find useful for my work.
     
    ;;; ------------------------------------------------------------------------------ ;;; GEN-PITCH-LINE ;;; Fonction de génération de hauteurs basées sur une conversion de vecteur de bruit ;;; avec un grand choix de type de bruit, taux de compression du vecteur, filtrage des répétitions et ambitus. (defun gen-pitch-line (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat (type :white)) (setf seed (rnd-seed seed)) (let (pitches) (do-verbose ("gen-pitch-line :seed ~s" seed) (labels ((white-or-pink (nb-pitch seed type) (if (eq type ':pink) (gen-pink-noise nb-pitch :seed seed) (gen-white-noise nb-pitch :seed seed :type (if (eq type ':white) :normal type)))) (process (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat type) (setf pitches (vector-to-pitch ambitus (vector-smooth compress (white-or-pink nb-pitch seed type)))) (when filter-repeat (setf pitches (gen-trim nb-pitch (filter-repeat filter-repeat pitches)))) pitches) ) (process nb-pitch :compress compress :ambitus ambitus :filter-repeat filter-repeat :seed (seed) :type type))))) #| USAGE (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :pink :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :extreme :filter-repeat 1) (gen-eval 8 '(make-omn :pitch (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) :length (euclidean-rhythm 16 1 16 's :type 2) ) :seed 33) |# ;;; ------------------------------------------------------------------------------ ;;; SVOICE1 ;;; VERSION 0.1 (defun svoice1 (nb-pitch &key (level 16) (low 1) (high 16) (ratio 1/16) (e-type 2)(e-rotate nil)(e-variant nil) (compress 1)(filter-repeat nil)(pline-type :white) (p-divide nil)(articulation nil) (length nil)(pitch nil)(velocity nil) (seed nil)(articulation-map nil) (add-interval-if-length nil) (i-length '1/16) (i-list '(-4 -5 -3 -7)) ) (setf seed (rnd-seed seed)) (do-verbose ("svoice1 :seed ~s" seed) (let* (( pitch (if pitch pitch (if p-divide (gen-divide p-divide (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type)) (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type)))) (len (if length length (euclidean-rhythm level low high ratio :type e-type :rotate e-rotate :variant e-variant :seed (seed)))) (art (if articulation articulation (if articulation-map (length-map articulation-map len :otherwise '(default)) ))) (velo (if velocity velocity '(mf))) ) (if add-interval-if-length (add-interval-if-length (make-omn :pitch pitch :length len :velocity velo :articulation art ) :length-val i-length :interval-list i-list ) (make-omn :pitch pitch :length len :velocity velo :articulation art ))))) #| USAGE (svoice1 32) (svoice1 32 :seed 1234) (svoice1 32 :pitch '(c4 d4 e4) :articulation '(marc)) (svoice1 32 :length '((h h)(q q e e e e))) (svoice1 32 :pitch '(c4 g4) :length '((h h)(q q e e e e)) :velocity '((f)(pp))) (svoice1 32 :i-list '(-7 -4 -5 -3) :low 1 :high 4) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 8 :high 8 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 8 :high 8 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)) :add-interval-if-length t) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 2 :high 16 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (tonality-map '(((0 2 4 6 8 10) :root d4)) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 2 :high 16 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) ) |# S.
  2. Thanks
    AM reacted to torstenanders in Updated library of many custom Opusmodus functions   
    Dear all,

    I updated my library tot (https://github.com/tanders/tot) in various ways. In particular, there are many new functions available.

    You can now read the documentation online at https://tanders.github.io/tot/. However, remember that you can directly evaluate the many examples in the documentation when (after installing the library) you drag the library folder into your Opusmodus project navigator and open the documentation within Opusmodus.
     
    If you are interested in the details of how the library developed, you can see a changelog at https://github.com/tanders/tot/commits/master .

    NOTE: When you install/upgrade this library, make sure you also install/upgrade all its dependencies, as described in the detailed installation instructions at https://github.com/tanders/tot. 
     
    Best,
    Torsten
     
    PS: This is not an official release. As I am primarily developing this library for my own purposes, I keep it rather informal and extend it on a continuous basis for my own composition projects. Anyway, I thought at least some of you might be interested to learn that there have been many developments 🙂
  3. Like
    AM reacted to torstenanders in Notating and auditioning irregular time signature   
    For sound synthesis purposes (e.g., for an expressive performance), we may want to use note lengths beyond the restricted set of quantised note durations. However, Opusmodus currently prevents various irregular note duration sequences to be auditioned and throws an error instead. What is really interesting, though, is that the notation for such irregular durations still seem to work. It might make sense the other way round (i.e. refusing to notate certain rhythms -- though I am definitely not voting for introducing that :), but I don't see any real reason why arbitrary rhythms may not be auditioned. 
     
    As an example, below is a short example of some arbitrary non-regular rhythm. Opusmodus can notate this rhythm, but when trying to play it back it throws an error.
     
    '((1/10 1/11 1/12 1/13))
     
    Thanks! 
     
    Best,
    Torsten 
  4. Like
    AM got a reaction from JulioHerrlein in HELP on ALL Interval 12-tone Rows and 12-tone control   
    ... a keyword/text search within the feature descriptions would be very useful.... so if i search "all-interval" i could find AIR etc....
  5. Like
    AM got a reaction from JulioHerrlein in HELP on ALL Interval 12-tone Rows and 12-tone control   
    ... a keyword/text search within the feature descriptions would be very useful.... so if i search "all-interval" i could find AIR etc....
  6. Like
    AM got a reaction from JulioHerrlein in HELP on ALL Interval 12-tone Rows and 12-tone control   
    ... a keyword/text search within the feature descriptions would be very useful.... so if i search "all-interval" i could find AIR etc....
  7. Like
    AM reacted to torstenanders in Re-auditioning selected shown scores/snippets   
    It is handy that Opusmodus can display multiple score snippets and full scores alongside each other.
     
    Is there perhaps also a way to re-play some snippet still shown? Either with some GUI element that I may have missed or programmatically (they all have a unique name shown, like "UNTITLED 101 (Snippet)").? There is a function audition-musicxml-last-score, is there perhaps a function to again audition a score that is specified by its name? 
     
    Thanks! 
     
    Best,
    Torsten
  8. Like
    AM got a reaction from JulioHerrlein in copy-omn-seq   
    could be an interesting idea for OPMO? (or already existing?)
    greetings
    andré
     
    ;;; a function (a sketch - i needed it for my momentary work) which filters ;;; an OMN-sequence in a specific bar, from a specific beat, with a specific ;;; span. (in such a basic version all in quarters (bars/...)) (defun copy-omn-seq (omnseq bar/beat-list &key (measure '(4/4)) (span nil)) (loop for i in bar/beat-list collect (loop repeat (if (null span) (- (/ (car measure) 1/4) (1- (cadr i))) span) for x = (1- (cadr i)) then (incf x) append (nth x (omn-to-measure (nth (1- (car i)) (omn-to-measure omnseq measure)) '(1/4)))))) (setf mat '((e c4 cs4 d4 ds4 e4 f4 fs4 g4) (e c3 cs3 d3 ds3 e3 f3 fs3 g3) (e c6 cs6 d6 ds6 e6 f6 fs6 g6))) (copy-omn-seq mat '((2 3))) ;; bar 2 from beat 3 until end of bar => ((e e3 f3 e fs3 g3)) (copy-omn-seq mat '((1 1)) :span 2) ;; bar 1 from beat 1 for 2 quarters => ((e c4 cs4 e d4 ds4)) (copy-omn-seq mat '((1 2) (2 3) (3 4))) ;; same thing with more then ONE filterings => ((e d4 ds4 e e4 f4 e fs4 g4) (e e3 f3 e fs3 g3) (e fs6 g6)) (copy-omn-seq mat '((1 2) (2 3) (3 4)) :span 1) ;; same - every filtering with span 1 => ((e d4 ds4) (e e3 f3) (e fs6 g6))  
  9. Thanks
    AM got a reaction from loopyc in change-time-structures   
    ;;; CHANGE-TIME-STRUCTURES ;;; works okay, but not exactly precise because of rhy-to-integer, which is not very easy in some cases ;;; this function changes basic-rhy-structures (if it's all the time perhaps in x/32) ;;; to other/changing sections. the lengths/rests will be rounded like in LENGTH-RATIONAL-QUANTIZE ;;; rhy+span => '((32 2) (44 7)) => means in 32 three values, in 44 seven values (defun change-time-structure (omnseq rhy+span &key (basic-rhy 32) (round 1/4)) (let* ((intseq (loop for i in (omn :length (flatten omnseq)) collect (* i basic-rhy))) (rhyseq (mapcar #'car rhy+span)) (spanseq (mapcar #'cadr rhy+span)) (divided-intseq (gen-divide spanseq intseq))) (length-rational-quantize (flatten (gen-length divided-intseq rhyseq)) :round round))) (change-time-structure '(2/44 -2/44 3/44 5/44 6/44) '((32 2) (20 2) (28 3)) :basic-rhy 44) => (1/16 -1/16 -1/8 3/20 1/4 -1/10 3/14 -1/28) (change-time-structure '(2/32 -2/32 3/32 5/32 6/32) '((20 2) (44 2) (28 3)) :basic-rhy 32) => (1/10 -1/10 -1/20 3/44 5/44 -3/44 3/14 -1/28)  
    could be done better -> go for it 🙂
    greetings
    andré
  10. Like
    AM got a reaction from Stephane Boussuge in omn-sieve-filter   
    (defun memberp (n liste) (not (equal 'nil (member n liste)))) ;;; MAIN (defun omn-sieve-filter (omn-list filter-list) (flatten (loop for i in (single-events omn-list) for j from 1 to (length omn-list) when (memberp j filter-list) collect i else collect (length-invert (car i))))) (omn-sieve-filter (make-omn :pitch (rnd-sample 10 '(c4 d4 e4 fs4 gs4) :seed 89) :length '(e) :span :pitch) '(1 2 3 5 8 9 10)) => (e c4 mf e gs4 mf e fs4 mf -1/8 e e4 mf -1/8 -1/8 e c4 mf e gs4 mf e fs4 mf)  
  11. Thanks
    AM got a reaction from JulioHerrlein in Help needed Binary Length values   
    something like that?
     
    (defun length-to-binary (lengthlist n) (let ((newlist (loop for i in (omn :length lengthlist) collect (/ i n)))) (loop for x in newlist when (> x 0) append (append (list 1) (gen-repeat (1- x) '0)) else append (gen-repeat (abs x) '0)))) (length-to-binary '(-q q e) 1/16) => (0 0 0 0 1 0 0 0 1 0) (length-to-binary '(-q s s q e) 1/16) => (0 0 0 0 1 1 1 0 0 0 1 0)  
  12. Thanks
    AM reacted to JulioHerrlein in FORTE NUMBERS as Rhythms   
    Dear Friends
     
    In my Doctoral Dissertation, I converted every FORTE number in a modulo 12 Rhythm via time-point-system.
    There is a complete catalog included (see the link below). It's in portuguese.
     
    After Janusz adjusted the Forte numbers to have the inversion, using "a" and "b" to differentiate the
     prime forms from the inversions, it was easy to convert using codes like this:
    (setf ch0 (time-point-system (pcs '5-11b :pitch)'s :start 0)) (setf ch1 (time-point-system (pcs '6-33 :pitch)'s :start 1)) (setf ch2 (time-point-system (pcs '7-11b :pitch)'s :start 2)) (setf ch3 (time-point-system (pcs '3-11b :pitch)'s :start 3)) (setf ch4 (time-point-system (pcs '3-11b :pitch)'s :start 0))  
    The dissertation (in portuguese) can be downloaded HERE:
    Das alturas ao ritmo : teoria dos conjuntos rítmicos como ferramenta composicional
    From pitches to rhythm: rhythmic set theory as a compositional tool.
    http://hdl.handle.net/10183/179457
    Abstract
    This doctoral dissertation is divided into two parts: the first deals a rhythmic set theory, and the second contains the portfolio of compositions developed during this period of studies. This dissertation presents a system of rhythmic organization parallel to the musical set theory pitch class organization FORTE (1973), as well as an adaptation of the time-point-system (BABBITT, 1962). From the standpoint of the traditional set theory, and also from the diatonic set theory, this unified approach allows to estabilish a connecting tissue of basic aspects: from the harmony and chords symbols to the rhythmic organization. At one time, in a complete catalog, the families of pitch class sets and chord symbols are related to their respective rhythmic counterparts. The musical motivation for this research came from my interest in the swinging and groovy repetitive rhythms called timelines (TOUSSAINT, 2013), commonly used in popular music. These dancing timelines have properties similar to those of the diatonic sets, and for this reason, this dissertation presents some properties of the diatonic pitch class sets, drawing a parallel with their rhythmic counterparts. These relationships also appear in the portfolio of compositions, characterizing some procedures used. The portfolio of compositions, which includes a composition for symphony orchestra, is presented form the standpoint of a duality between transparency and opacity. This duality address the essential differences in the audibility of the results from various composition techniques. This study of Rhythmic Set Theory will serve as an analytical approach of my compositional output in popular music, with a systematic way to understant and to extrapolate some aspects already used in my practice as composer and improviser.     Here is an analysis of a Wayne Krantz improvisation, using the rhythmic set theory system.   Hope you enjoy !!   Best, Julio  
  13. Thanks
    AM reacted to JulioHerrlein in Turing Piano (Julio Herrlein)   
    Dear Friends,
     
    I'd like to share a composition all made in Opusmodus.
    The composition is part of the Portfolio of my Doctoral Dissertation.
    I'd like to thank you so much, Opusmodus and the support of you
     here in this forum was amazing !!
    Love you all !!
     
    TURING PIANO (Julio Herrlein)
     
     
    Here is the commented code for the First Section:
     

    ;;;PART A
    ;PITCHES – The pitch structure are based on "chevron-like" patterns. This can be related to some
     Xenakis ideas: the arborescences, the music as a plot idea.
     
    (setf patpit (integer-to-pitch (gen-integer-step 0 68 '(1 -2 3 -4 5 -6 7 -8 9 -10 11)))) (setf patpit2 (integer-to-pitch (gen-integer-step 0 68 '(11 -10 9 -8 7 -6 5 -4 3 -2 1))))  
    ;;; This interval pattern leads to an infinite ascending movement, like the picture below:
     

    ;;; After that, I decided to restrict the ambitus of the pattern, otherwise it goes ascending forever. I did the restriction
     thinking  in the hands of the pianist, in a way to not collide or crossing the hands.
     


    ;;;After the ambitus restriction, the next step was find some partitions to make some chords for the piece, so
    each hand have a diferent partition of the chevron-like pattern, like below

     
    (setf pitpartition (ambitus '(g3 c6)(chordize-list (gen-divide '(1 1 1 3 1 1 1 2) patpit)))) (setf pitpartition2 (ambitus '(g1 g3)(chordize-list (gen-divide '(2 1 1 1 1 2 1 1 1 1 1 1 1 1) patpit2))))
    ;;; Next, i decided on the Rhythms to use. The rhythms are complementary, i.e., each hand plays on the
    silence of the other, using the following pattern:
     

     
    DIGRESSION: The FORTE NUMBERS are part of my dissertation that makes the conversion of the entire
     Forte sets onto Rhythms modulo 12.
    The dissertation (in portuguese) can be downloaded HERE:
    Das alturas ao ritmo : teoria dos conjuntos rítmicos como ferramenta composicional
    From pitches to rhythm: rhythmic set theory as a compositional tool.
    http://hdl.handle.net/10183/179457
    Abstract
    This doctoral dissertation is divided into two parts: the first deals a rhythmic set theory, and the second contains the portfolio of compositions developed during this period of studies. This dissertation presents a system of rhythmic organization parallel to the musical set theory pitch class organization FORTE (1973), as well as an adaptation of the time-point-system (BABBITT, 1962). From the standpoint of the traditional set theory, and also from the diatonic set theory, this unified approach allows to estabilish a connecting tissue of basic aspects: from the harmony and chords symbols to the rhythmic organization. At one time, in a complete catalog, the families of pitch class sets and chord symbols are related to their respective rhythmic counterparts. The musical motivation for this research came from my interest in the swinging and groovy repetitive rhythms called timelines (TOUSSAINT, 2013), commonly used in popular music. These dancing timelines have properties similar to those of the diatonic sets, and for this reason, this dissertation presents some properties of the diatonic pitch class sets, drawing a parallel with their rhythmic counterparts. These relationships also appear in the portfolio of compositions, characterizing some procedures used. The portfolio of compositions, which includes a composition for symphony orchestra, is presented form the standpoint of a duality between transparency and opacity. This duality address the essential differences in the audibility of the results from various composition techniques. This study of Rhythmic Set Theory will serve as an analytical approach of my compositional output in popular music, with a systematic way to understant and to extrapolate some aspects already used in my practice as composer and improviser.  
    Here is the rhythm used in Turing Piano (with Forte numbers and rotations)
     
     
     
    (setf ritmo1 (gen-repeat 10 '(s s -s s s -s -s -s s -s -s s -s s -s -s s -s s -s -s -s s -s))) (setf ritmo1b (length-invert ritmo1 :omn t))
    ; DINAMICS: Following the parametric stuff, I decided to set the dynamics, according to the harmonic density, i.e.
    the more notes, the more louder.
     

     
    (setf din1 (span pitpartition '(p p p ff p mf pp ff))) (setf din2 (span pitpartition2 '(f p p p p ff p p ff pp pp f mf mf)))
    ;ASSEMBLING of the materials

     
    (setf lhmat1 (make-omn :length ritmo1 :pitch (pitch-transpose 4 pitpartition) :velocity din1)) (setf rhmat1 (make-omn :length ritmo1b :pitch (pitch-transpose 4 pitpartition2) :velocity din2)) ;MONTAGE of music blocks (assemblage)
     
    (setf pianoassemblerh (assemble-seq lhmat1)) (setf pianoassemblelh (assemble-seq rhmat1))
    ;;;SCORE- Layout

     
    (def-score Miniatura-pno1 (:key-signature 'atonal :time-signature '(3 4) :tempo 85 :octave-shift '(c2 c6) :layout (grand-layout 'pno :all-accidentals 'all)) (pno :omn (merge-voices lhmat1 rhmat1) :channel 1 :sound 'gm :program 0) )  
    COMPLETE VIDEO
     
     
     
     
  14. Like
    AM got a reaction from JulioHerrlein in Beginner: Slonimsky 648 as a function   
    in lisp -> create OMN with (midi-to-pitch)... 
     
    (setq half-row (loop repeat 13
                     with interval
                     with stack = 60
                     with cnt = 0
                     when (oddp cnt) do (setq interval 13)  
                     when (evenp cnt) do (setq interval -11) 
                     when (= cnt 0) collect stack
                     else collect (setq stack (+ stack interval))
                     do (incf cnt)))
     
    (midi-to-pitch (append half-row (reverse (butlast half-row))))
  15. Thanks
    AM reacted to loopyc in vector-to-length (with pitch-figurate) - audition tape   
    Not much, but happy to share.
     
    Somedays, I just set up a live audio host and some interesting instruments and samples, and then 'browse' the Opusmodus documentation. In these sessions, I am combining a playful way to add to my knowledge while generating audio materials via audition and MIDI Export for my library to be used as later combinatory/compound materials. As the title suggests, these are just live experimentations with 'vector-to-length',  along with variations on a theme to the value of 'vector-smooth' (from min to max value over session period).
     
     
    ;; (setf vector (gen-white-noise 10000)) (setf v2l-1 (vector-to-length '1/128 -3 13 vector)) (setf v2l-s-1 (vector-to-length '1/128 -3 13 (vector-smooth 0.1 vector))) (setf chromatic-12 '(c2 cs2 d2 ds2 e2 f2 fs2 g2 gs2 a2 as2 b2)) (setf chromatic-16 '(c2 cs2 d2 ds2 e2 f2 fs2 g2 gs2 a2 as2 b2 c3 cs3 d3 ds3)) ;;----------------------------- (setf voice-1 (make-omn :length (length-weight v2l-s-1 :weight '(34 1)) :pitch (span v2l-s-1 chromatic-16) :velocity (messiaen-permutation '(ff f mf mp p)))) ;;-----------------------------  
    ...and with pitch-figurate and additional permutation:
     
    (setf voice-1 (make-omn :length (length-weight v2l-s-1 :weight '(67 1)) :pitch (span v2l-s-1 (pitch-figurate 6 chromatic-12 :interval (messiaen-permutation '(1 -1 2 -2 3 -3 4 -4 5 -5)))) :velocity (messiaen-permutation (messiaen-permutation '(ff f mf mp p)))))  
     The pitch list is for the sequential triggering 'sample slices' via New Sonic Arts 'Vice',  each slice corresponding to a specific pitch (thus the pitch-figurate serves to add controllable variation of slice triggering). The exercise is focused on rhythm, but in the context of untraditional/non-percussion materials ;-) hth
     
     
    ...
  16. Thanks
    AM reacted to loopyc in vector-to-length (with pitch-figurate) - audition tape   
    Wow, thank you...that means a lot coming from you :)
     
    Even at my extremely novice level with Opusmodus, the possibilities of what I can accomplish towards my own goals (experimental electronics) are seemingly endless :)
     
    The combination of the online documentation and the continuing insights/inspiration derived from this forum and it's generous and talented contributors....is making this first leg of my learning Opusmodus an extremely exciting and rewarding period of education...and as I am able generate and collect these audio materials into a personal library, no doubt Opusmodus will allow me to develop unique approaches to electronic musiking which is my primary driving force ;-)
     
     
     
     
  17. Thanks
    AM got a reaction from loopyc in filter-omn-by-intervals   
    a sieve/filter-function - filters specific INTERVALS and replacing the others by rests.
    (don't work perfect, but as a sketch....)
     
     
    ;;; (defun equal/or (n alist) (car (loop for i in alist when (equal i n) collect 't))) ;;; FUNCTION (defun filter-omn-by-intervals (omn-seq intervals) (setf omn-seq (loop with omn-events = (single-events omn-seq) with i = 0 while (not (null (nth i omn-events))) when (equal/or (car (pitch-to-interval (append (omn :pitch (nth i omn-events)) (omn :pitch (nth (1+ i) omn-events))))) intervals) collect (list (nth i omn-events) (nth (1+ i) omn-events)) and do (incf i 2) else collect (neg! (car (omn :length (nth i omn-events)))) and do (incf i)))) ;;; EXAMPLE (setf basic-omn-seq (make-omn :pitch (vector-to-pitch '(c4 c6) (gen-white-noise 100 :type :logistic)) :length '(t) :span :pitch)) ;;; check out all these filter-tests (setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 2 3))) ;(setf omn-seq (filter-omn-by-intervals basic-omn-seq '(3 -3))) ;(setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 -1 5 -5 7 -7))) (def-score example (:title "example" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instrument1 :omn (flatten omn-seq) :channel 1 :sound 'gm-piano) (instrument2 :omn (flatten basic-omn-seq) :velocity 20 :channel 3 :sound 'gm-piano))  
     
    here is a more complex example
     
    (defvar library) (defvar abfolge) (defvar omn-seq) (defvar rhy) (defvar field) ;;;library + rhy -------------------------------------------------------------------------------- (setf rhy 44) ;;; LIBRARY MIRT RHY-PAAREN! (setf library (list '(eb5 5 p mute) '(e4 5 mf mute) '(gs4 3 f mute) '(g5 3 ppp mute) '(f6 2 p mute) '(cs4 1 f mute) '(d5 1 fff mute) '(b3 4 pppp mute) '(bb5 4 mp mute) '(a4 3 pp mute) '(fs3 (2 7) ppp mute) '(c6 (1 11) mp mute))) (setf library (loop for i in library collect (append (list (car i)) (if (listp (cadr i)) (gen-length (list (rnd-pick (cadr i))) rhy) (gen-length (list (cadr i)) rhy)) (filter-last 2 i)))) ;;; gen seq from library/abfolge--------------------------------------------------------------- (setf field '(eb5 e4 gs4 g5 f6 cs4 d5 b3 bb5 a4 fs3 c6)) (setf abfolge (pick-norepeat 500 field)) (setf omn-seq (loop for x in abfolge with y do (setf y (assoc x library)) append (append (reverse (filter-first 2 y)) (filter-last 2 y)))) (setf basic-omn-seq omn-seq) (setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 -1 11 -11 13 -13 4 -4 8 -8 16 -16 20 -20 28 -28 32 -32 7 -7 19 -19))) ;;;--------------------------------------------------------------------------------------------- (def-score example2 (:title "example2" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instrument :omn (flatten omn-seq) :channel 1 :sound 'gm-piano) (hidden-structure :omn (flatten basic-omn-seq) :channel 1 :velocity 0 :sound 'gm-piano)) ;;;--------------------------------------------------------------------------------------------- (omn-list-plot (flatten omn-seq) :join-points t)  
  18. Like
    AM reacted to loopyc in vector-to-length (with pitch-figurate) - audition tape   
    Audition format (excerpts) of various personal application studies for Opusmodus.
     
    ..
     
    .
  19. Thanks
    AM got a reaction from loopyc in rest-diminution/augmentation   
    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)  
     
     
  20. Like
    AM reacted to opmo in filter-events-by-length   
    I like that. Will do shortly.
  21. Like
    AM got a reaction from opmo in filter-events-by-length   
    @janusz: you could expand it with conditionals like >, <, =, span .... and implement it....
    and... if you would write this function with conditionals for pitches (sequences of pitches) you could filter by vector-envelope...
  22. Like
    AM got a reaction from opmo in filter-events-by-length   
    you can filter all events by length (>= min).
    all other events will be replaced by rests...
     
    (defun filter-events-by-length (omnlist &key min) (let ((omnlist (single-events omnlist)) (min (car (omn :length (list min))))) (flatten (length-rest-merge (loop for i in omnlist when (>= (car (omn :length i)) min) collect i else collect (neg! (car (omn :length i)))))))) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'e) => (e c4 mf e d4 mf e e4 mf e e5 mf q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'q) => (-h q c4 mf q d4 mf q e4 mf h c4 mf h d4 mf h e4 mf) (filter-events-by-length '(e c4 d4 e4 e5 q c4 d4 e4 h c4 d4 e4) :min 'h) => (-wq h c4 mf h d4 mf h e4 mf)  
     
  23. Like
    AM reacted to opmo in binary-filter   
    Predefined functions can't be changed otherwise you would break the system.
    I will make a doc for the binary-invert function soon.
  24. Like
    AM reacted to opmo in binary-filter   
    (defun binary-filter (alist bin-list &key (omn t)) (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 (maybe-omn-decode omn (cond ((omn-formp i) (list (length-invert (car i)))) ((lengthp i) (neg! (omn :length (list i)))))))))) (binary-filter '(q c4 mf d4 e4 e f4 ppp g4 a4 b4) '(1 0 1 1 0 1 1)) => (q c4 mf -q q e4 mf e f4 ppp -e e a4 ppp e b4 ppp)  
    Only one type of parameters can be decoded at a time.
  25. Like
    AM reacted to o_e in binary-filter   
    Hi André
    Just investigating your function..
    Then I've tried a little cosmetic hack to make it more readable, but it did not work out and I don't understand why. What did I overlook?
    Thanks!
     
    ole
    ;;; the orginal function (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 (cond ((omn-formp i) (list (length-invert (car i)))) ((lengthp i) (neg! (omn :length (list i))))))))) (binary-filter '(q c4 mf d4 e4 e f4 ppp g4 a4 b4) '(1 0 1 1 0 1 1)) => (q c4 mf -1/4 q e4 mf e f4 ppp -1/8 e a4 ppp e b4 ppp) ;;;Why is it not working?? (defun foo-rep (n sequence &key omn) (maybe-omn-decode omn (binary-filter n sequence))) (foo-rep '(q c4 mf d4 e4 e f4 ppp g4 a4 b4) '(1 0 1 1 0 1 1) :omn t) -->(q c4 mf -1/4 q e4 mf e f4 ppp -1/8 e a4 ppp e b4 ppp);??  
×