Jump to content

Stephane Boussuge

Moderators
  • Posts

    1,072
  • Joined

  • Last visited

Posts posted by Stephane Boussuge

  1. Hi,

     

    I've made this long time ago, if it could help...

     

    (in-package :Opusmodus)
    
    ;;; Kontakt sonuscore - The Orchestra - generic
    ;;; keyswitches events
    
    (def-sound-set to-generic
                   :programs
      (:group articulations
              staccato (:key c1)
              sustain (:key cs1)
              marcato (:key d1)
              legato (:key ds1)
    
    
    :group omn
              stacc (:key c1)
              spicc (:key c1)
              ord (:key cs1)
              norm (:key cs1)
              def (:key cs1)
              marc (:key d1)
              leg (:key ds1)
              trem (:key e1)
              pizz (:key f1)
              
    )
     :controllers
      (:group Default-Settings
              
              Volume              7
              Expression         11
              
                        
      ))

    SB.

  2. (filter-tie '(e c4 c4 e. c4 q c4 s c4 e eb4 e. eb4 h eb4 e. eb4 q eb4))
    => (h. c4 mf wq eb4)

     

     

    also this could be useful as well but Janusz probably can program it much better:

     

    (defun filter-change (omn-lst)
      (make-omn
       :pitch (omn :pitch omn-lst)
       :length (binary-map (gen-binary-change (omn :pitch omn-lst)) (omn :length omn-lst))
       :velocity (omn :velocity omn-lst)
       :articulation (omn :articulation omn-lst)
       :swallow t
       ))
    
    (filter-change '(e c4 c4 e. c4 q c4 s c4 e eb4 e. eb4 h eb4 e. eb4 q eb4))
    => (e c4 - -e. -q -s e eb4 -e. -h -e. -q)

     

  3. It is also possible to map on pitch fields that way:

     

    ;;; Mapping on pitch-field
    
    (pitch-list-plot
     (tonality-map
      (append (chordize (make-scale 'c2 24 :alt '(2 1 6 5 4))) '(:map 'step ))
      (pitch-trajectory 128 '(0 23) '(0.1 1 0.1) 
                       :filter-repeat 1
                       :variance 0.8
                       
                       )))

     

    You can use different fields that way:

     

    (setf pfields (list
                   (chordize (make-scale 'c2 24 :alt '(2 1 6 5 4)))
                   (chordize (make-scale 'c2 24 :alt '(3 1 2 4)))
                   (chordize (make-scale 'c2 24 :alt '(2 2 2 1)))
                   ))
    
    (setf path (tonality-series pfields :map '(step)))
    
    (pitch-list-plot
     (tonality-map
      path
      (gen-eval 
       3
       '(pitch-trajectory 128 '(0 23) '(0.1 1 0.1) 
                         :filter-repeat 1
                         :variance 0.2
                         
                         ))
      ))

     

    And also use the :time parameter from tonality-map system if you use OMN expression:

     

    ;;; Example with omn without :time parameter
    (pitch-list-plot
     (tonality-map
      path
      (gen-filter-euclidean
       12 16 11 16
       (pitch-trajectory 128 '(0 23) '(0.1 1 0.1) 
                         :filter-repeat 1
                         :variance 0.2
                         ) 
       's)
      ))
    
    ;;; Same with :time parameter
    
    (pitch-list-plot
     (tonality-map
      path
      (gen-filter-euclidean
       12 16 11 16
       (pitch-trajectory 128 '(0 23) '(0.1 1 0.1) 
                         :filter-repeat 1
                         :variance 0.2
                         ) 
       's)
      :time '(h w)))

    S.

  4. Hi Tom,

    hope this help...

     

    (setf pitches '(fs3 e3 gs3 b2 a3 fs4 d4 b5 e4 gs4 fs4 gs4 cs4 fs4 b3 e4 fs4))
     
    (setf basspitches '(fs2 cs3 a2 e3 fs3 d3 b3 gs3 cs4 e3 cs3 fs3 d3 b3 gs2 fs2))
    
    ;; generate some length for basspitches
    (setf basslen (rnd-sample (length basspitches) '(1/2 1/4)))
    
    ;; get the span of basslen
    (setf basspan (get-span basslen))
    
    ;; generate some length for pitches 
    (setf pitcheslen (rnd-sample (length pitches) '(1/2 1/4)))
    
    ;; apply the span of basslength to pitchlen using the length-span function
    
    (setf pitcheslen-spanned (length-span basspan pitcheslen))
    
    ;; Assemble the material into 2 OMN phrases
    
    (setf ph1 (make-omn
               :pitch pitches
               :length pitcheslen-spanned
               ))
    
    (setf ph2 (make-omn
               :pitch basspitches
               :length basslen
               ))
    
    ;; Output the 2 phrases
    (ps 'gm :afl (list ph1) :bn (list ph2))

     

    S.

  5. Hi,

     

    some small corrections :

     

    (progn
      ;; Global SEED
      (init-seed 15342)
      
    (setf melody1a (length-augmentation 2'((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q) (-h. q e4) (q f4 g4 a4 b4) (h. g4 -q))))
    (setf melody1b (length-augmentation 3 '((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q))))
    
    ;; Patterns
    (setf scale '(c4 eb4 f4 g4 ab4))
     (setf
       p1 (tonality-map '(scale :map octave :closest up) melody1a)
       p2 (tonality-map '(scale :map octave :closest up) melody1b)
       )
      
      (setf patterns (list p1 p1 p2))
      
      (setf dictum-a '(((1 2 3) :methods ((dl1) (dl1 t-12 pr1) (dl1 t-24)))))
       
       
      
      ;; Sections
      (setf sec-a
            (counterpoint
             patterns dictum-a
            ))
      
      ;; Assemble Voices 
      (assemble-voices 'voice sec-a)
      
      ;; Preview Score
    (ps 'gm 
        :hn (list voice1)
        :tbn (list voice2)
        :tbn (list voice3)
        :time-signature '(4 4)
        )
      
      ;; Global SEED back to NIL
      (init-seed nil)
      )

    S.

  6. Hi,

     

    here's a function I've made for my personal usage.

    May be it could be useful for some users...

    Best

     

    Stéphane

     

    ;;;===================================
    ;;; PITCH-TRAJECTORY
    ;;;===================================
    ;;; SB 1.11.21
    ;;;===================================
    (defun pitch-trajectory (nbpitch range tendency 
                                     &key 
                                     (variance 0.5) 
                                     (type :around) 
                                     (quantize 1/2) 
                                     (smooth 1)
                                     filter-repeat
                                     seed
                                     )
      (setf seed (rnd-seed seed))
      (do-verbose ("pitch-trajectory :seed ~s" seed)
      (let* ((values (gen-tendency nbpitch tendency :variance variance :type type 
                               :seed (seed)))
             (smoothedval (vector-smooth smooth values))
             (out (vector-to-pitch range smoothedval :quantize quantize))
             )
        (if filter-repeat 
          (filter-repeat filter-repeat out)
          out))))
    
    
    #|
    ;;; Tests divers
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234)
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1)
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :variance 1
                      )
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :variance 0.1
                      )
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :smooth 0.1
                      )
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :quantize 1/4
                      )
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :quantize 1/8
                      )
    (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 
                      :filter-repeat 1
                      :variance 1
                      :quantize 1/8
                      )
    
    
    
    (gen-filter-change 
     (pitch-trajectory 
      32 '(c4 g5) '(0.1 1 0.1) :seed 1234)
     's)
    
    
    |#
    
    

     

  7. you may try to not open a workspace but directly an .opmo document and evaluate. 

    actually, I don't have M1 or Monterey so I don't know if it could work but if yes, it could be a temporary solution.

     

    Stéphane

     

     

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy