Jump to content

loopyc

Members
  • Posts

    54
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    loopyc 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 🙂
  2. Thanks
    loopyc reacted to JulioHerrlein in Andre Meier's Lenght-Staccato   
    Sometime ago, I was searching for a function that would be the exact opposite function of length-legato.
     
    Lenght-legato turns this:
     

     
    onto this:
     

     
    I wanted exactly the reverse:
    Changing this:

    to this:

     
    In the ocasion, Andre Meier came with this code below:
     
    Janusz, do you think a good idea to include a function like this in the library ?
    Or there is also something similar that I dont know ?
    I still need it in a easy way...
     
    Best,
     
    Julio
     
    (defun length-staccato (n alist) (let ((newlengths) (new-omn (omn-merge-ties (flatten alist))) (time-sign (get-time-signature alist))) (progn (setf newlengths (loop for i in (omn :length new-omn) when (> i 0) append (if (= n i) (list i) (list n (* -1 (abs (- i n))))) else collect i)) (if (omn-formp alist) (omn-to-time-signature (make-omn :length newlengths :pitch (omn :pitch new-omn) :velocity (omn :velocity new-omn) :articulation (omn :articulation new-omn)) time-sign) newlengths)))) (length-staccato 1/16 '(q -q q q)) (length-staccato 1/16 '(q e4 mp q tasto q -q q q)) (length-staccato 1/16 '((e. c4 eb4 fs4 a4 tie) (s a4 e. cs4 e4 g4 e bb4 tie) (e bb4 e. d4 f4 gs4 s b4)))
  3. Thanks
    loopyc reacted to JulioHerrlein in [SOLVED] Idea for a Rhythmic Set Theory Function   
    The crop function is SOLVED
     
    (binary-map (butlast (row-rotation 1 (gen-binary-row 12 (pcs '3-11b)))7)1/16) It's the number 7 as a parameter for the butlast lisp function, after the three parentheses.
     
    HERE for the complementary set of the Rhythm (binary-invert)
     
    (binary-map (butlast (binary-invert (row-rotation 1 (gen-binary-row 12 (pcs '3-11b))))4) 1/16)  
    Best,
    Julio
  4. Thanks
    loopyc reacted to AM 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é
  5. Thanks
    loopyc got a reaction from lviklund in Euclidean Rotations ('My Opus In The Modus Of Ghosts")   
    Eno/Byrne-esque 'Beat-Betas' as audition tape (i.e. 60 second continuous excerpts).
     
    Opusmodus generated MIDI...Mixed as "prototypes" in Logic 9.1.8,'auditioned' in iTunes 'live' to "Audio Hijack Pro".
  6. Like
    loopyc got a reaction from JulioHerrlein in FORTE NUMBERS as Rhythms   
    Eight hours later! Spent all day reviewing related Opusumodus functions/documentation and researching your concepts and references...a very satisfying time in furtherance of my ongoing Opusmodus education ;-)
     
    Thanks again Julio for the inspiration, and Janusz for ALREADY including/implementing so many useful tools related to these subjects :)
  7. Like
    loopyc got a reaction from JulioHerrlein in FORTE NUMBERS as Rhythms   
    Thank you very much for taking the time to share ;-) Please feel free to continue to do so as I am most interested in this subject of Timepoint/Rhythm, especially as you apply your research to Opusmodus coding applications/implementations :)
  8. Thanks
    loopyc 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  
  9. Like
    loopyc got a reaction from JulioHerrlein in Turing Piano (Julio Herrlein)   
    Fantastic,very insightful....thanks for sharing! Visual patterns as compositional approach are one of my interests, as is the idea of organizing rhythm into 'scales' ;-)
     
    Please inform if an English translation of main dissertation becomes available (though the excellent illustrations and footnotes in English in current version provide plenty of food for thought as it is, especially as many of your references are on already on my bookshelf ;-))
  10. Like
    loopyc 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
     
     
     
     
  11. Thanks
    loopyc got a reaction from opmo in Euclidean Rotations ('My Opus In The Modus Of Ghosts")   
    ;;; SET Variables (setf pitch-1 '(c2 cs2 d2 ds2 e2 f2 fs2 g2 gs2 a2 as2 b2 c3 cs3 d3 ds3 e3 f3 fs3 g3 gs3 a3 as3 b3)) (setf pitch-2 '(c2 cs2 d2 ds2 e2 f2 fs2 g2 gs2 a2 as2 b2 c3 cs3 d3 ds3 e3 f3 fs3 g3 gs3 a3 as3 b3 c4)) (setf reverse-p (nreverse pitch-2)) (setf rotation-p-1 (gen-rotate :left pitch-1 :type :seq)) (setf rotation-p-2 (gen-rotate :right reverse-p :type :seq)) (setf rotation-p-3 (gen-rotate :right pitch-1 :type :seq)) (setf rotation-p-4 (gen-rotate :left reverse-p :type :seq)) (setf rotation-combo-A (gen-repeat 17 (append rotation-p-1 rotation-p-3))) (setf rotation-combo-B (gen-repeat 16 (append rotation-p-2 rotation-p-4))) (setf bin-map-1 (binary-map (gen-binary-euclidean 1 8 5 7) 's)) (setf bin-map-2 (binary-map (gen-binary-euclidean 1 8 5 8) 's)) ;;----------------- (setf drum-rotation-1 (make-omn :pitch rotation-combo-A :length (span rotation-combo-A bin-map-1) :velocity '(ff mp = = = = = =))) (setf drum-rotation-2 (make-omn :pitch rotation-combo-B :length (span rotation-combo-B bin-map-2) :velocity '(ff mp = = = = = =))) ;;; SET Voices (setf Voice1 drum-rotation-1) (setf Voice2 drum-rotation-2) ;;;-------------------------- (def-score Euclidean-Rotations ( :key-signature 'chromatic :time-signature '(4 4) :composer "Loopy C" :copyright "Copyleft © 2017 Chris R Gibson" :tempo 106 :flexible-clef t :ignore-velocity t ) (inst1 :omn Voice1 :port 0 :channel 1 :sound 'Logic :program '1 :volume 90) (inst2 :omn Voice2 :port 0 :channel 2 :sound 'Logic :program '1 :volume 90) )  
    Really, REALLY basic code...but indulges my interests in shifting rhythm patterns.
     
    Pitch-lists are designed for the triggering of Spectrasonics 'Stylus RMX', the mixes then taking three stereo pairs and applying separate fx processing for final bounce in Logic 9.1.8.
     
    As I said, pure indulgence of a personal compulsion...shared here simply as example of the variety of Opusmodus application as applied to beat creation.
     
     
    ...
  12. Thanks
    loopyc reacted to AM 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)  
  13. Like
    loopyc got a reaction from Stephane Boussuge in Euclidean Rotations ('My Opus In The Modus Of Ghosts")   
    Eno/Byrne-esque 'Beat-Betas' as audition tape (i.e. 60 second continuous excerpts).
     
    Opusmodus generated MIDI...Mixed as "prototypes" in Logic 9.1.8,'auditioned' in iTunes 'live' to "Audio Hijack Pro".
  14. Like
    loopyc got a reaction from opmo in Euclidean Rotations ('My Opus In The Modus Of Ghosts")   
    Eno/Byrne-esque 'Beat-Betas' as audition tape (i.e. 60 second continuous excerpts).
     
    Opusmodus generated MIDI...Mixed as "prototypes" in Logic 9.1.8,'auditioned' in iTunes 'live' to "Audio Hijack Pro".
  15. Thanks
    loopyc reacted to AM 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)  
     
     
  16. Like
    loopyc reacted to torstenanders in Composing various polyphonic textures concisely   
    I am interested in controlling musical textures, i.e., relations between polyphonic parts. I defined a bunch of functions that use the simple polyphonic music representation used also by my function preview-score that I presented shortly (see https://opusmodus.com/forums/topic/902-polyphonic-preview/#comment-2686). Apologies that this post is a bit longer. 
     
    Here is a particularly flexible function: map-parts transforms a polyphonic score. It is a variant of the standard Lisp function mapcar, where a function is applied to every part in a score, but each instrument/part can be given its own function arguments for the transformation. One argument is the respective part of the score. This argument is marked by an underscore (_) in the argument lists.
     
    In the following example, the function pitch-transpose is applied to a score with two very simple parts consisting of only a single note each. This function has two required arguments, a transposition interval (measured in semitones), and the pitch sequence or OMN to transpose. The transposition interval for the first part is 4 (major third upwards), and the underscore marks the position of the violin part to transpose, etc.
     
    Note that you can always see and hear the resulting score by wrapping preview-score around each example. Hopefully these examples sufficiently demonstrate my need to have some shortcut for preview-score :)
    (map-parts '(:vln ((h e4)) :vlc ((h c3))) #'pitch-transpose '(:vln (4 _) :vlc (12 _))) => (:vln ((h gs4)) :vlc ((h c4)))  
    Here are a few more relatively simple application examples. I am first defining some musical material to reduce the length of the remaining definitions. 
    (setf material '((-3h fs4 pp eb4 <) (q e4 < fs4 <) (3h gs4 mp> a4 > bb4 >) (q a4 pp -) (-5h - g4 pp leg eb4 < leg d4 < leg) (q bb4 < e4 <) (5h g4 mp> leg b4 > leg a4 > leg bb4 > leg d4 > leg) (q gs4 pp -)))  
    Now, the next example creates a strict canon formed with the given material -- but without following any counterpoint rules :)  For different parts the material is metrically shifted and transposed.
    This example also shows that map-parts calls can be nested (naturally). The function metric-shift appends some rest before some musical material, but preserves its rhythmical structure, i.e. metrically shifts the material.   
    (map-parts (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'metric-shift '(:vl1 :skip ;; :skip means to leave part unchanged :vl2 (-q _) :vla (-h _) :vlc (-h. _))) #'pitch-transpose '(:vl1 (6 _) :vl2 (4 _) :vla (2 _) :vlc :skip))  
    The next examples shows some simple homorhythmic texture created by randomised transpositions. Each part shares a similar overall pitch profile. Note also that calls can be more concise with a (lambda) function that nests calls to transformation functions -- instead of nesting map-parts as shown above.
    (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'(lambda (transpose seq) ;; static transposition for moving parts into different registers (pitch-transpose transpose ;; randomised transposition of notes in parts (pitch-transpose-n (rnd 10 :low -2 :high 2) seq))) '(:vl1 (7 _) :vl2 (0 _) :vla (-10 _) :vlc (-20 _)))  
    Finally, here is a homophonic texture created by random pitch variants (retrograde, inversion etc.). The global pitch profiles of parts differ here, in contrast to the previous example.
    (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'pitch-variant `(:vl1 (_ :transpose 7 :seed 10) :vl2 (_ :transpose 0 :seed 20) :vla (_ :transpose -10 :seed 30) :vlc (_ :transpose -20 :seed 40)) :shared-args '(:variant ?))  
    All these examples demonstrate very conventional textures, as such textures are more easy to explain.  
     
    For completeness, below is the definition of MAP-PARTS. There are various dependencies that I tried all to add as well. Please let me know if I missed any definition, and apologies in advance.
     
    Best,
    Torsten
    (defun map-parts (score fn part-args &key (parameter nil) (shared-args nil)) "Create or transform a polyphonic score. The original purpose is for creating/transforming musical textures, i.e., relations between polyphonic parts. Applies function `fn' to parts in `score': this function is a variant of the standard Lisp function `mapcar', but specialised for scores. A score is represented in the format discussed in the documentation of the function `preview-score'. Additional arguments for `fn' can be specified in `part-args', and these argument lists can be different for each part. However, one argument is the part of the score. This argument is marked by an underscore (_) in the argument lists. In the following example, the function `pitch-transpose' is applied to a score with two parts. This function has two required arguments, a transposition interval (measured in semitones), and the pitch sequence or OMN to transpose. The transposition interval for the first part is 4 (major third upwards), and the underscore marks the position of the violin part to transpose, etc. ;;; (map-parts '(:vln ((h e4)) ;;; :vlc ((h c3))) ;;; #'pitch-transpose ;;; '(:vln (4 _) ;;; :vlc (12 _))) Args: - score (headerless score): See {defun preview-score} for format description. - fn: A function that expects and returns an OMN sequence or a sequence of parameter values (e.g., lengths, or pitches) as specified in the argument `parameter'. - part-args (plist): Alternating instrument keywords (same as in `score') followed by arguments list for `fn' for that instrument/part. If arguments is :skip, then that part is returned unchanged. - parameter (omn parameter, e.g., :length or :pitch, default nil means processing full OMN expression): If `fn' expects only single parameter to process, then it can be set here. - shared-args (list): For all instruments/parts, these arguments are appended at end end of its part-specific arguments. They are useful, e.g., for keyword arguments. " ;; catching hard-to-find user error... (let* ((instruments (get-instruments score)) (missing-instruments (remove-if #'(lambda (arg-instr) (member arg-instr instruments)) (get-instruments part-args)))) (assert (not missing-instruments) (part-args) "map-parts: Some instruments in `part-args' don't have a matching instrument in `score'. ~A.~%" missing-instruments)) (let ((parts (make-hash-table :test #'equal))) ;; fill hash table, using leading keywords as keys (loop for part in (tu:plist->pairs score) do (setf (gethash (first part) parts) part)) (tu:pairs->plist (loop for instrument-arg-pair in (tu:plist->pairs part-args) for instrument = (first instrument-arg-pair) for part = (gethash instrument parts) for part-omn = (second part) for fn-args = (second instrument-arg-pair) collect (if (equal fn-args :skip) part ; no processing (cons instrument (let ((result (apply fn (append (substitute (if parameter (omn parameter part-omn) part-omn) '_ fn-args) shared-args)))) (list (if parameter (omn-replace parameter result part-omn) result))))) )))) (defun metric-shift (l lengths) "Appends `l' (a length or omn) before `lengths' (a list of lengths or omn), but maintains the metric structure, i.e., the function shifts `lengths' metrically 'to the right' by `l'. Returns an OMN form if lengths is an OMN form, otherwise a length form. Related: assemble-seq (but that does not shift across bars)" (let* ((time-sigs (get-time-signature lengths)) (result (omn-to-time-signature (cons l (flatten lengths)) time-sigs))) (if (omn-formp lengths) result (omn :length result)))) ; (metric-shift '-h '((q q q q) (q q q q))) ; (metric-shift '(h g4) '((q c4 q d4 q e4 q f4) (q c4 q d4 q e4 q f4))) (defun get-instruments (score) "Returns all instruments of `score', a headerless score (see {defun preview-score} for its format)." (at-even-position score)) (defun at-even-position (in-list) (at-position in-list 2 0)) (defun at-position (in-list factor offset) "Returns a list containing every factor-th elements of in-list starting at offset" (mapcar #'(lambda (i) (nth i in-list)) (arithmeric-series factor offset (ceiling (/ (length in-list) factor))))) (defun arithmeric-series (factor offset length) (let (result) (reverse (dotimes (i length result) (push (+ (* i factor) offset) result))))) (defun plist->pairs (plist) (loop :for (key val) :on plist :by #'cddr :collect (list key val))) (defun pairs->plist (pairs) (one-level-flat pairs)) (defun one-level-flat (list) "flatens one level of the given form. Example: (one-level-flat '(((note) (note)) ((pause) (pause)) ((note)))) -> ( (note) (note) (pause) (pause) (note))" (apply #'append list))  
  17. Thanks
    loopyc reacted to AM 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)  
  18. Thanks
    loopyc reacted to AM in binary-filter   
    something i've coded...
     
    (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 -q -q q) '(0 1 0 1)) => (-1/4 -q -1/4 q) (binary-filter '(q q q q -q) '(0 1 0 1 1)) => (-1/4 q -1/4 q -q) (binary-filter '(c4 d4 e4 f4) '(1 1 0 1)) => (c4 d4 f4) (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)  
  19. Thanks
    loopyc reacted to AM in neg-sieve   
    ...how ti filter all "unused/complementary" pitches inside a sieve (if you like to extend the function... could be interesting if it works also with chords)
     
    (defun neg-sieve (pitchlist) (let ((pitchlist (pitch-to-midi pitchlist))) (midi-to-pitch (loop for i from (car pitchlist) to (car (last pitchlist)) when (null (member i pitchlist)) collect i)))) (setf sieve '(fs3 g3 as3 b3 c4 cs4 ds4 e4 f4 gs4 a4 d5 eb5 fs5 g5 gs5 bb5 b5 c6 cs6 e6 f6)) (neg-sieve sieve) => (gs3 a3 d4 fs4 g4 bb4 b4 c5 cs5 e5 f5 a5 d6 eb6) (neg-sieve '(c4 d4 e4 fs4 gs4 as4 c5)) => (cs4 eb4 f4 g4 a4 b4)  
     
     
  20. Like
    loopyc reacted to AM in vector-range-drift   
    INPUT-curves could be like that: (in that way you could imitate some early "xenakis-curves" when you map it to pitches :-))
     
    (setf curve1 '(-5.1 -2.3 -1.1 -0.8 -0.3 -2.5)) (setf curve2 '(1.0 1.2 1.5 2.1 4.6 10.6))  
    (vector-range-drift curve1 curve2 (gen-white-noise 250))  
    as result:
     

     
     
     
    "imitated" by my old/simple function:
     
    (list-plot (append (vector-range-drift '(-5.1 1) '(-2.3 1.2) (gen-white-noise 50)) (vector-range-drift '(-2.3 1.2) '(-1.1 1.5) (gen-white-noise 50)) (vector-range-drift '(-1.1 1.5) '(-0.8 2.1) (gen-white-noise 50)) (vector-range-drift '(-0.8 2.1) '(-0.3 4.6) (gen-white-noise 50)) (vector-range-drift '(-0.3 4.6) '(-2.5 10.6) (gen-white-noise 50))))  
     
  21. Thanks
    loopyc reacted to opmo in how to code a NAND gate?   
    Few more function which could be useful for you (part of the system):
     
    (contain-itemp 'inv '(c 7b9s11 inv 1 chord)) => t (contain-itemp '= '(e f d s)) => nil (contain-itemsp '(9 8) '(0 1 11 8 10 9)) => t (contain-sequencep '(11 8) '(0 1 11 8 10 9)) => t JP
  22. Thanks
    loopyc reacted to AM in logikgatter / logic gates (completed)   
    complementation to OR/AND/NOT! i hope everything is correct...
    https://de.wikipedia.org/wiki/Logikgatter
     
    (defun nand (&rest rest) (flet ((every-truep (x) (equal x t))) (not (every #'every-truep rest)))) (nand nil nil nil) => t (nand t t t t t t) => nil (nand nil t t t nil t) => t ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun nor (&rest rest) (contain-itemp 'nil rest)) (nor t t t t) => nil (nor nil t nil) => t (nor t nil nil nil) => t ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun xor (&rest rest) (oddp (car (count-item t rest)))) (xor t nil t t nil nil nil) => t (xor t t nil) => nil (xor nil t) => t ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun xnor (&rest rest) (evenp (car (count-item t rest)))) (xnor t nil t t nil nil nil) => nil (xnor t t nil) => t (xnor nil t) => nil (xnor t nil t t nil nil t nil) => t ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  
  23. Thanks
    loopyc reacted to AM in vector-range-drift   
    (defun vector-range-drift (start end input &key (spread 8)) (let ((values (gen-divide (rnd-sum (length input) (primes spread)) input)) (n-values) (a-step) (b-step)) (progn (setf n-values (1- (length values))) (setf a-step (/ (car (difference (list (car start) (car end)))) n-values)) (setf b-step (/ (car (difference (list (cadr start) (cadr end)))) n-values)) (loop for i in values for a = (car start) then (incf a a-step) for b = (cadr start) then (incf b b-step) append (vector-range a b i))))) ;;;;; EXAMPLES -> MODULATE/DRIFT white-noise - with different spreads (list-plot (vector-range-drift '(-7.1 1) '(-0.1 10) (gen-white-noise 187) :spread 10)) (list-plot (vector-range-drift '(-7.1 1) '(-0.1 10) (gen-white-noise 187) :spread 6)) (list-plot (vector-range-drift '(-7.1 1) '(-0.1 5.6) (gen-white-noise 517))) (list-plot (vector-range-drift '(-1.1 1) '(-3.1 5.6) (gen-white-noise 317)))  
  24. Like
    loopyc got a reaction from opmo in Opusmodus Vs. Symbolic Composer   
    oneder, I wrote Peter Stone around that time, and he stated that he was very busy on a project(s) and would update at some time in future but DID take the time to assist me.
     
    He has been at this a long time (my original copy of SCOM I have been upgrading from was purchased for an Atari in the early 90's!), and he has always replied to my emails over that long period...but I imagine SCOM is not necessarily 'in demand' such to be a priority from a marketing standpoint i.e the website.
     
    If you need support, write him directly... he has always presented himself to me as a professional and a gentleman, and has maintained SCOM for decades now... just appears to have other areas of his life he is fully committed to right now ;-)
  25. Like
    loopyc reacted to AM in bubble-sort   
    for a musical research project where i work with the sorting processes of different sorting algorithms (bubble-sort, heap-sort ...), i have to program such algorithms myself. the ide is that not only the end result of the algorithm is visible but also the constant changes (the mechansim). here the first: bubble-sort.
    very simple and inelegant programmed - but the thing i need to have  :-)
     
    bubble-sort:
    https://en.wikipedia.org/wiki/Bubble_sort
     
    have a look to different sorting algorithms:
     
     
    greetings
    andré
     
    ;;; bubble-sort -> with all GEN's to see the process of sorting ;;; end-test "until (equal (sort-asc alist) list)" very uncommon (and strange), ;;; but most simple-stupid test to check the end, only okay for this kind of idea ("watching the process not the endresult") (defun bubble-sort (seq) (let ((alist)) (progn (setf alist (cond ((pitchp (car seq)) (pitch-to-midi seq)) ((lengthp (car seq)) (omn :length seq)) (t seq))) (setf alist (loop until (equal (sort-asc alist) list) with list = alist append (loop for i from 0 to (- (length list) 2) for j from 1 to (- (length list) 1) when (> (nth i list) (nth j list)) collect (setf list (position-swap (list j i) list)) else do (setf list list)))) (cond ((pitchp (car seq)) (midi-to-pitch alist)) (t alist))))) (bubble-sort (rnd-order '(c5 e4 g3 b7))) (bubble-sort (rnd-order '(t s e q h w))) (bubble-sort '(1 6 334 2 6 4 111))  
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy