Jump to content

Klangfarbenmelodie


Recommended Posts

As you likely already know, what you can do in a single voice/part is specifying various articulations, which can result in different timbres of your playback, including user-defined specifications with the function def-sound-set. Beyond that, you could split your part into multiple parts, in the score, where each is performed by its own MIDI channel (basically reproducing how a Klangfarbenmelodie would be realised in an orchestra setting). The advantage of expressing different timbres of different instruments with multiple parts is that it allows for dove-tailing, where the last note of one instrument and the first note of the next are shared by both for a better connecting. 

 

Anyway, if you want to generate only a single part with timbre specifications, why not defining a function that allows to split it into multiple parts for the orchestra later. I proposed such a function for your convenience at 

 

 

Best,

Torsten

 
Link to comment
Share on other sites

Thanks both of you, that's what I call an answer ! it's a bit heavy for me to follow, but it gives me a direction, and I will probably learn a lot by using your programs.

 

I spent years using max/msp and it's a totally different paradigm, with different solutions to the same problem.

 

Or maybe the simplest thing to do for me is  splitting the melody from OM inside Logic with boolean stuff... It's so hard for me to think the way Lisp does, and very often I just use several apps to reach my goal.

 

 

Link to comment
Share on other sites

Alain, could you give me an example (input, output) of what you are trying to do.

Why would you like to use separate channel for each of the articulations.

What samples (virtual instrument) you are using.


 

Link to comment
Share on other sites

Ok. I try to be clear.

 

I would like to generate a melody like

 

(input) 

melo1 '( a3 b3 c4 d4 e4)

 

and use a function like this:

 

(make-klangfarbenmelodie melo1)

 

with results like that :

 

(output)

a3 --) midi channel 1 (strings)

b3 --) midi channel 2 (woodwind)

c4 --) midi channel 3 (brass)

d4 --) midi channel 4 (piano)

e4 --) midi channel 5 (percussions)

 

I don't want a separate channel for each articulation (with CC or keyswitches, I can do it quite simply inside the same channel), but a way to share a melody between several midi channels, exactly the way our good-old Vienna composers did a long time ago.

 

 

At the moment, I mainly use Symphobia (first volume) and Chris Hein violin, for my orchestral needs.

 

I used to do it with Max with a specific object, but Opusmodus looks so elegant and its score's so practical (especially how the tuplets look, I've never seen another software managing tuplets like this, it's a composer's dream !), and I can't imagine we can't find a way to do it.

 

Thanks for your help and time.

 

Alain

Link to comment
Share on other sites

Hi,

 

maybe this little example could help a bit:

 

(setf pitch (gen-trim 128 '(c4 d4 e4 f4 g4 a4 b4 c5 d5 e5 f5 g5)))

(setf len1 (gen-length (rnd-sample 32 '(2 4 6 8)) '16))
(setf len2 (gen-length (rnd-sample 32 '(2 4 6 8)) '16))
(setf len3 (gen-length (rnd-sample 32 '(2 4 6 8)) '16))
(setf len4 (gen-length (rnd-sample 32 '(2 4 6 8)) '16))

(setf align (distribute-seq pitch len1 len2 len3 len4))

(setf p1 (make-omn
          :pitch (1~ align)
          :length len1
          ))

(setf p2 (make-omn
          :pitch (2~ align)
          :length len2
          ))

(setf p3 (make-omn
          :pitch (3~ align)
          :length len3
          ))

(setf p4 (make-omn
          :pitch (4~ align)
          :length len4
          ))

(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Stéphane Boussuge"
            :copyright "Copyright © 2017 s.boussuge"
            :tempo 120
            )
(inst1
 :omn p1
 :channel 1
 :sound 'gm
 :program 'acoustic-grand-piano
 )

(inst2
 :omn p2
 :channel 2
 :sound 'gm
 :program 'acoustic-grand-piano
 )

(inst3
 :omn p3
 :channel 3
 :sound 'gm
 :program 'acoustic-grand-piano
 )

(inst4
 :omn p4
 :channel 4
 :sound 'gm
 :program 'acoustic-grand-piano
 )
)

SB

Link to comment
Share on other sites

Well done, Stephane, it's quite close from what I was thinking of... I couldn't imagine going through length to do that, but it works, the theme goes from one stave to another one...

 

Here comes my own version(from yours), and it's promising (but i'm still interested by other people's vision...).

(setf pitch (rnd-octaves '(c3 c6)(rnd-order (gen-repeat 16 '(c4 e4 a4 c4 e4 a4 c4 e4 a4 c4 e4 a4)))))
(setf len1 (gen-repeat 16 '(1/16 1/16 -1/8 -1/8 -1/8 )))
(setf len2 (gen-repeat 16 '(-1/8 1/8 -1/8 -1/8 )))
(setf len3 (gen-repeat 16 '(-1/8 -1/8 1/32 1/32 1/32 1/32 -1/8 )))
(setf len4 (gen-repeat 16 '(-1/8 -1/8 -1/8 1/32 1/32 1/32 1/32 )))
(setf align (distribute-seq pitch len1 len2 len3 len4))
(setf p1 (make-omn
          :pitch (1~ align)
          :length len1
          ))
(setf p2 (make-omn
          :pitch (2~ align)
          :length len2
          ))
(setf p3 (make-omn
          :pitch (3~ align)
          :length len3
          ))
(setf p4 (make-omn
          :pitch (4~ align)
          :length len4
          ))

(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Stéphane Boussuge"
            :copyright "Copyright © 2017 s.boussuge"
            :tempo 120
            )
(piano
 :omn p1
 :channel 1
 :sound 'gm
 :program 'acoustic-grand-piano
 )
(violon
 :omn p2
 :channel 2
 :sound 'gm
 :program 'violin
 )
(marimba
 :omn p3
 :channel 3
 :sound 'gm
 :program 'marimba
 )
(flute
 :omn p4
 :channel 4
 :sound 'gm
 :program 'acoustic-grand-piano
 )
)

 

Link to comment
Share on other sites

violà, i think something like this -> an example you simply could evaluate!!! :-)

;;; ---------------------------------------------------------------------------------------------
;;; ---------------------------------------------------------------------------------------------
;;; KLANGFARBEN-MELODIE: A FUNCTION THAT SPLITS PITCHES/LENGTHS IN THE WAY OF THE INSTRUMENTATION
;;; SEQUENCE -> SO YOU COULD SPLIT/COMPBINE THE PAARMETERS PITCH + LENGTH + VELOCITY + ARTICULATION  
;;; + C O L O R (= INSTRUMENTATION)!!!! -> SO YOU CAN CREATE KLANGFARBENMELODIEN!!
;;; ---------------------------------------------------------------------------------------------
;;; ---------------------------------------------------------------------------------------------
 

(defun generate-events (durations pitches &key (velocity '(mf)) (articulation '(-)) (optional_data 'nil))
  ;; generates an EVENT-STREAM from parameter-lists -> important is the "optional_data",
  ;; that's the place where the instrument's name is written in!
  (loop repeat (length durations)
    with cnt-d = 0
    with cnt-rest = 0
    when (> (nth cnt-d durations) 0)
    collect (list (nth cnt-d durations) 
                  (nth cnt-rest pitches) 
                  (nth cnt-rest velocity)
                  (nth cnt-rest articulation) 
                  (nth cnt-rest optional_data))
    and do (incf cnt-rest)
    and do (incf cnt-d)
    else collect (list (nth cnt-d durations) 
                  'nil 
                  'nil
                  'nil 
                  'nil)
    and do (incf cnt-d)))



(defun filtering-color (selected-color event-stream)
  ;; filtering the the EVENT-STREAM by instrument
  (let ((velocity) (articulation))
    (loop for i in event-stream
      with match = 0
      append (loop for x in (fifth i)             
               when (equal (first x) selected-color)
               do (setq articulation (second x)
                        velocity (third x))
               and do (setq match 1))
      when (and (= match 1)  (> (first i) 0))
      append (list (first i) (second i) velocity articulation)
      else collect (* -1 (abs (first i)))
      do (setq match 0))))

 
(defun gen-hoquetus (filtered-instrument &key pitch length  instrument-list)
  (let ((events (generate-events length pitch :optional_data instrument-list)))
    (filtering-color filtered-instrument events)))

;;; ---------------------------------------------------------------------------------------------
;;; OMN_EXAMPLE:
;;; ---------------------------------------------------------------------------------------------


(setq pitches '(c4 cs4 d4 ds4 e4 f4 fs4 g4 gs4 a4 bb4 b4)) ; only an example

(setq lengths (gen-length '(1 2 3 -4 5 6 5 -4 3 -2 1 1 1 -8 3 2) 1/16)) ; only an example

;; instrumentation -> every LIST/LINE is the instrumentation/technique for one single pitch/length
(setq instrumentation '(((pno ord ppp)) ; only an example
                        ((vn pizz p)) 
                        ((trp ord ff))
                        ((vn pizz f) (va ponte f))
                        ((pno ord ff))
                        ((pno ord fff))
                        ((vn tasto mf) (pno ord ff) (vc tasto mf) (trp ord pp))
                        ((trp mute pp) (vn ponte mf))
                        ((trp mute pp))
                        ((trp mute pp))
                        ((trp ord f) (pno ord ff))
                        ((trp ord f) (vc tasto mf))))

 
;;; ---------------------------------------------------------------------------------------------
;;; SCORE:  YOU CAN MAP THE INSTRUMENTS ON THE CHANNEL/PORT YOU NEED FOR YOUR SOFTWARE-INSTR
;;; HAVE A LOOK TO THE SCORE AND INSTRUMENTATION-LIST 
;;; ---------------------------------------------------------------------------------------------

(def-score klangfarben-melodie
           (:key-signature '(c maj)
                           :time-signature '(4 4)
                           :tempo '(120)
                           :layout (bracket-group
                                    (trumpet-layout 'trumpet)
                                    (piano-grand-layout 'piano)
                                    (violin-layout 'violin)
                                    (viola-layout 'viola)
                                    (violoncello-layout 'violoncello)))
  
  (trumpet :omn (gen-hoquetus 'trp ;; filters all trp-pitches/lengths/...
                              :pitch pitches
                              :length lengths
                              :instrument-list instrumentation)
           :channel 1)
  
  (piano :omn (gen-hoquetus 'pno ;; filters all pno-pitches/lengths/...
                            :pitch pitches
                            :length lengths
                            :instrument-list instrumentation)
         :channel 2)
  
  (violin :omn (gen-hoquetus  'vn
                              :pitch pitches
                              :length lengths
                              :instrument-list instrumentation)
          :channel 3)
  
  (viola :omn (gen-hoquetus 'va
                            :pitch pitches
                            :length lengths
                            :instrument-list instrumentation)
         :channel 4)
  
  (violoncello :omn (gen-hoquetus 'vc
                                  :pitch pitches
                                  :length lengths
                                  :instrument-list instrumentation)
               :channel 5))

 

Link to comment
Share on other sites

could you give me an example (input, output) of what you are trying to do.

Why would you like to use separate channel for each of the articulations.

What samples (virtual instrument) you are using.

 

I would like to use multiple orchestral sound libraries that support different articulations in parallel for "preview mock-ups". For example, one library with standard articulations (e.g., EWQLSO) and one for extended techniques that I am considering to buy (e.g., IRCAM Solo Instruments, https://s3.amazonaws.com/uvi/SCP01-Ircam+Solo+Instruments/ISI_manual.pdf, or Xsample Acoustic Instruments Library, http://www.xsample.de/index_htm_files/Xsample_Library_en.pdf). So far, I used custom Kontakt instruments of extended techniques for the latter. Gilreath (2010) also recommends to combine libraries for adding variety etc.

 

My above-mentioned function would be a workaround to realise such playback, but at the cost of additional explicit staffs in the notation output, so some built-in support for multiple libraries in def-sound-set or a support for specifying multiple libraries for a single instrument in def-score output to different MIDI channels/ports would be welcome! 

 

Best,

Torsten

 

Gilreath, P. (2010) The Guide to MIDI Orchestration. 4th revised edition. Focal Press.
Link to comment
Share on other sites

To briefly follow up: support of multiple sound libraries for a single instrument by def-score would be preferable over an extended definitions with def-sound-set, because then individual def-sound-set definitions are independent and clean (even sharable, as Stephane did for EWQLSO), and details like the MIDI channel and port remain in the def-score definition. 

 

Thanks!

 

Best,

Torsten 

added 2 minutes later

BTW: the Xsample library requires so many key-switches, that they layered them in multiple velocity zones. Would that be something def-sound-set should support?

 

Best,

Torsten 

Link to comment
Share on other sites

Wow, and it works, AM ! :-) Thanks so much ! Just listened to the score, another solution really really interesting.

 

And thanks for the comments ! :-) As we say in France "I understand quickly, but you must explain for a long time! :-)

 

Alain

Link to comment
Share on other sites

Found a very minimalist way to do it ! And there's a little Zappa flavour, courtesy of marimbas...

(init-seed 434)
(setf theme1 (make-omn
          :pitch (rnd-octaves '(c1 c7)(rnd-order'(a3 b3 c4 d4 a3 b3 c4 d4)))
          :length (gen-repeat 4'(1/8 -1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8))
          ))
(setf theme2 (make-omn
          :pitch (rnd-order'(a3 b3 c4 d4 a3 b3 c4 d4))
          :length (gen-repeat 4'(-1/8 1/16 1/16 -1/8 -1/8 -1/8 1/8 -1/8 -1/8))
          ))
(setf theme3 (make-omn
          :pitch (rnd-order'(a3 b3 c4 d4 a3 b3 c4 d4))
          :length (gen-repeat 4'(-1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/8 -1/8))
          ))
(setf theme4 (make-omn
          :pitch (rnd-order'(a3 b3 c4 d4 a3 b3 c4 d4))
          :length (gen-repeat 4'(-1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/24 1/24 1/24))
          ))
(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Alain Jamot"
            :copyright "Copyright © 2017 alain jamot"
            :tempo 120
            )
            

(piano
:omn theme1
:velocity '(85)
:channel 1
:sound 'gm
:program 'acoustic-grand-piano
)
(flute
:omn theme2
:velocity '(85)
:channel 2
:sound 'gm
:program 'flute
)
(violin
:omn theme3
:velocity '(85)
:channel 3
:sound 'gm
:program 'violin
)
(marimba
:omn theme4
:velocity '(55)
:channel 4
:sound 'gm
:program 'marimba
)
)

 

Link to comment
Share on other sites

if you want to control the global-pitch-progress, and not making/writing all length-list by hand you have to work/think (imo) with EVENTS (in opmo (single-events)), otherwise you will have all the time "random-stuff" or have incorrect synchronisations... but perhaps this is what you are looking for...

all the best

andré

Link to comment
Share on other sites

Note: It Is better to add the velocity with MAKE-OMN.

You can hide the the velocity symbols with :ignore-velocity t

As you are using repeat (length) you can :span the lengths to :pitch (count).

 

I made the example a bit longer using GEN-EVAL function :-)

(init-seed 434)
(setf pitch '(a3 b3 c4 d4 a3 b3 c4 d4))
(setf theme1 (make-omn
          :pitch (gen-eval 12 '(rnd-octaves '(c1 c7) (rnd-order pitch)))
          :length '(1/8 -1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme2 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-1/8 1/16 1/16 -1/8 -1/8 -1/8 1/8 -1/8 -1/8)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme3 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/8 -1/8)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme4 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/24 1/24 1/24)
          :velocity '(ff)
          :span :pitch
          ))
(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Alain Jamot"
            :copyright "Copyright © 2017 alain jamot"
            :tempo 120
            :flexible-clef t
            :ignore-velocity t
            )
  (piano
   :omn theme1
   :channel 1
   :sound 'gm
   :program 'acoustic-grand-piano
   )
  (flute
   :omn theme2
   :channel 2
   :sound 'gm
   :program 'flute
   )
  (violin
   :omn theme3
   :channel 3
   :sound 'gm
   :program 'violin
   )
  (marimba
   :omn theme4
   :channel 4
   :sound 'gm
   :program 'marimba
   )
  )

 

Link to comment
Share on other sites

Using length symbols is even better :-)

 

(init-seed 434)
(setf pitch '(a3 b3 c4 d4 a3 b3 c4 d4))
(setf theme1 (make-omn
          :pitch (gen-eval 12 '(rnd-octaves '(c1 c7) (rnd-order pitch)))
          :length '(e - - - = - - -)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme2 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-e s = -e - - = - -)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme3 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-e - = - - - = -)
          :velocity '(ff)
          :span :pitch
          ))
(setf theme4 (make-omn
          :pitch (gen-eval 12 '(rnd-order pitch))
          :length '(-e - - = - - - 3e = =)
          :velocity '(ff)
          :span :pitch
          ))
(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Alain Jamot"
            :copyright "Copyright © 2017 alain jamot"
            :tempo 120
            :flexible-clef t
            :ignore-velocity t
            )
  (piano
   :omn theme1
   :channel 1
   :sound 'gm
   :program 'acoustic-grand-piano
   )
  (flute
   :omn theme2
   :channel 2
   :sound 'gm
   :program 'flute
   )
  (violin
   :omn theme3
   :channel 3
   :sound 'gm
   :program 'violin
   )
  (marimba
   :omn theme4
   :channel 4
   :sound 'gm
   :program 'marimba
   )
  )

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy