Jump to content
Sign in to follow this  
opmo

Opusmodus with sound synthesis package (CLM)

Recommended Posts

Since some time we are working on implementing Bill's Schottstaedt 'Synthesis package CLM' into Opusmodus.

As expected we make the CLM working with OMN form sequence or with single parameters - example below.

 

The score is using partials from The Bells of the Campanile: La Marangona.

Below you will find an audio file of the score which is rendered each time you make evaluation.

 

Best wishes to all,

Janusz

;; ---------------------------------------------------------
;; MARANGONA
;; ---------------------------------------------------------
;; Parameters

(defparameter count 50)

(setf partials1 (library 'marangona-partials 'partials nil :random 50))
(setf partials2 (library 'marangona-partials 'partials nil :random 50))
(setf partials3 (library 'marangona-partials 'partials nil :random 50))
(setf partials4 (library 'marangona-partials 'partials nil :random 50))

(setf par1 (rnd-sample count (partial :freq (flatten partials1))))
(setf par2 (rnd-sample count (partial :freq (flatten partials2))))
(setf par3 (rnd-sample count (partial :freq (flatten partials3))))
(setf par4 (rnd-sample count (partial :freq (flatten partials4))))

(defparameter freq1 (gen-divide (rnd-sample count '(2 3 4 5)) par1))
(defparameter freq2 (gen-divide (rnd-sample count '(1 2 3 4 5)) par2))
(defparameter freq3 (gen-divide (rnd-sample count '(1 2 3 1 4 5)) par3))
(defparameter freq4 (gen-divide (rnd-sample count '(1 2 3 1 4 5)) par3))

(defparameter len1 (list (length-span 42 (rnd-sample count '(w h q w)))))
(defparameter len2 (list (length-span 42 (rnd-sample count '(d h h)))))
(defparameter len3 (list (length-span 42 (rnd-sample count '(h. w q)))))
(defparameter len4 (list (length-span 42 (rnd-sample count '(d d h)))))

(do-timeline
 '( 
   len1 (---xxx-xx- ---xxx---- --x--xx--- ---x------ x-)
   len2 (---xxx-xx- ---xx-x--- --x--xx--- ---x------ x-)
   len3 (---xxx-xx- ---xx--x-- --x--xx--- ---x------ --)
   len4 (---xxx-xx- ---xx---x- --x--xx--- ---x------ --)
   )
 '(gen-pause x) :time '(w))

(defparameter dur1 (omn :length (flatten len1)))
(defparameter dur2 (omn :length (flatten len2)))
(defparameter dur3 (omn :length (flatten len3)))
(defparameter dur4 (omn :length (flatten len4)))

(defparameter amp1 (rnd-number count 0.05 0.43))
(defparameter amp2 (rnd-number count 0.05 0.43))
(defparameter amp3 (rnd-number count 0.05 0.43))
(defparameter amp4 (rnd-number count 0.05 0.43))

(defparameter env '((0 0 40 .1000 60 .2000 75 .4000 82 1 90 1 100 0)
                    (0 0 60 .1000 80 .2000 90 .4000 95 1 100 0)
                    (0 0 10 1 16 0 32 .1000 50 1 56 0 60 0 90 .3000 100 0)
                    (0 0 30 1 56 0 60 0 90 .3000 100 0)
                    (0 0 50 1 80 .3000 100 0)
                    (0 0 40 .1000 60 .2000 75 .4000 82 1 90 1 100 0)
                    (0 0 10 1 32 .1000 50 1 90 .3000 100 0)
                    (0 0 60 .1000 80 .3000 95 1 100 0)
                    (0 0 80 .1000 90 1 100 0)))

;; ---------------------------------------------------------
;; Score

(with-sound (:play nil :reverb jc-reverb
                   :scaled-to .7 :statistics t
                   :channels 2 :output "marangona-series")
  
  (fm-violin-synth dur1 freq1 amp1
                  :degree (rnd-number count 45 85)
                  :fm-index (rnd-number count 0.10 1.0)
                  :reverb-amount 0.30
                  :noise-amount (rnd-number count 0.00 0.004)
                  :amp-env (rnd-sample count env)
                  :fm1-rat (rnd-number count 0.00 6.718)
                  :fm2-rat (rnd-number count 0.00 4.414)
                  :fm3-rat (rnd-number count 0.00 1.141)  
                  :glissando-amount (rnd-number count 0.00 0.8)
                  )
  
  (fm-violin-synth dur2 freq2 amp2
                  :degree (rnd-number count 45 85)
                  :fm-index (rnd-number count 0.10 1.0)
                  :reverb-amount 0.30
                  :noise-amount (rnd-number count 0.00 0.004)
                  :amp-env (rnd-sample count env)
                  :fm1-rat (rnd-number count 0.00 4.718)
                  :fm2-rat (rnd-number count 0.00 6.414)
                  :fm3-rat (rnd-number count 0.00 1.141)
                  :glissando-amount (rnd-number count 0.00 0.8)
                  )
  
  (fm-violin-synth dur3 freq3 amp3
                  :degree (rnd-number count 45 85)
                  :fm-index (rnd-number count 0.10 1.0)
                  :reverb-amount 0.30
                  :noise-amount (rnd-number count 0.00 0.004)
                  :amp-env (rnd-sample count env)
                  :fm1-rat (rnd-number count 0.00 1.718)
                  :fm2-rat (rnd-number count 0.00 4.414)
                  :fm3-rat (rnd-number count 0.00 6.141)
                  :glissando-amount (rnd-number count 0.00 0.8)
                  )
  
  (fm-violin-synth dur4 freq4 amp4
                  :degree (rnd-number count 45 85)
                  :fm-index (rnd-number count 0.10 1.0)
                  :reverb-amount 0.30
                  :noise-amount (rnd-number count 0.00 0.004)
                  :amp-env (rnd-sample count env)
                  :fm1-rat (rnd-number count 0.00 4.718)
                  :fm2-rat (rnd-number count 0.00 6.414)
                  :fm3-rat (rnd-number count 0.00 1.141)
                  :glissando-amount (rnd-number count 0.00 0.8)
                  )
  )

 

Score with omn-form sequence:

(with-sound (:play nil :channels 2 :reverb jc-reverb
             :scaled-to .6 :statistics t :output "quartet")

  (fm-violin-omn vn1 :reverb-amount 0.20 :bpm 44)
  (fm-violin-omn vn2 :reverb-amount 0.20 :bpm 44)
  (fm-violin-omn va :reverb-amount 0.20 :bpm 44)
  (fm-violin-omn vc :reverb-amount 0.20 :bpm 44)
  )

 

 

Share this post


Link to post
Share on other sites

This opens up windows to Spectral work withing Opusmodus !

Congrats !

I'm so curious about the timeline stuff...

All the best !

Share this post


Link to post
Share on other sites

I'am strongly interested in a C-Sound-like environment in OM!

The example above is not working yet, right?

Is it possible to load the CLM package myself into OM (to follow the tutorial on the CLM Page)? If yes, how, can you give a brief instruction?

 

Thanks!

Share this post


Link to post
Share on other sites

There are too many errors especially with .dynlib path and there are lines of code that are unsafe in CCL.

We now have solved all of this. CLM will be part of version 1.3

Share this post


Link to post
Share on other sites

Thanks for the answer! I'am not asking for a release date, practising paitience in the mean time :–)

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Topics

    • By opmo
      – Additions:
      ADD-TEXT-ATTRIBUTS – Optional attribute type: :sticky and :non-sticky

      – Fixed:
      Typo error in 'GM Instrument Set.lisp' file.
       
      Best wishes,
      Janusz
    • By opmo
      Free update for Opusmodus 1.3. users.
      It includes a support for a second screen and multi voice snippets.
      The new UNFOLD system opens up a whole new set of possibilities for the composer using OPUSMODUS.
      Additional library directory: 'Def-Instrument-Sets'. 
       
      New functions:
      DEF-INSTRUMENT-SETS
      Use this function to define the instrument-sets with a given name. With named instrument-sets a composer can customise OPUSMODUS to reflect MIDI synthesisers or samplers which a studio system (inboard or outboard) might contain. The DEF-INSTRUMENT-SETS function is an essential companion to the PS function (PS stands for ‘Preview Score’ or, ‘Preview Snippet’). To create instrument-sets is fairly easy to do as it resembles the instrument setup from the DEF-SCORE instance.
       
      The instrument-set template:
      <instrument-name> (:layout <layout>   :port <port>   :channel <channel>   :sound <sound-set>   :program <program>   :controllers <controllers>   :pan <panning>   :volume <volume>)  
      To explain how it all works we will define new instrument-sets with two instruments. In our example we will use :oboe and :bassoon as our instrument names with a library name: my-inst. The next step we need to do is to select the corresponding instrument layout. The predefined layouts you will find in the ‘Instrument Layout Presets’ document in the System/Layout library:
       

       
      Examples:
      (def-instrument-sets my-inst                      :instruments   (:group group           :oboe           (:layout oboe-layout                    :port nil                    :channel 1                    :sound 'gm                    :program '(oboe)                    :controllers nil                    :pan (pan 0)                    :volume 92)           :bassoon           (:layout bassoon-layout                    :port nil                    :channel 2                    :sound 'gm                    :program '(bassoon)                    :controllers nil                    :pan (pan -10)                    :volume 92)           ))  
      Here is how an instrument from a defined instrument-sets name might be entered into PS:
      (ps 'my-inst     :oboe (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                   (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                   (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                   (s fs4 leg d4 leg e4 leg cs4 leg e d4)))     :bassoon (list '((e fs3 d3 e3)                      (e fs3 d3 e3)                      (e fs3 g3 a3)                      (e d3 a2 d2)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112)  
      You can define as many instrument-sets instances as needed.
       
       
      PS
      Use this function if you are looking for a quick preview of your score or when a snippet (especially for education) needs a full representation of the intended notation. The PS function name stands for ‘Preview Score’ or ‘Preview Snippet’. In the following examples we use the default instrument-sets library, defined in the ‘GM Instrument Sets.lisp’ file, which you will find in the Library panel. How to create your own instrument-sets library, you will find in the DEF-INSTRUMENT-SETS document.
       
      Instrument treble:
      (ps 'gm :treble (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                 (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                 (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                 (s fs4 leg d4 leg e4 leg cs4 leg e d4)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112)
       
      Instrument piano:
      (ps 'gm :p (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                (s fs4 leg d4 leg e4 leg cs4 leg e d4))              '((e fs3 d3 e3)                (e fs3 d3 e3)                (e fs3 g3 a3)                (e d3 a2 d2)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112     :title "G. Ph. Telemann, 12 Fantasie per clavicembalo TWV 33-n.1, 1732")  

       
      Examples:
      The examples below demonstrate how quickly you can preview your progress at any stage of your work ie. voices, instrumentation etc…
       
      (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e       3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4) p2 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc       t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg       eb5 3q bb5 > a4 > bb5 > e a4 pp stacc -e) p3 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc       e. cs4 marc s gs4 leg q gs4 -q) p4 '(-q. e d4 pp q. eb5 mf e g4 q bb4 trem a4 trem) p5 '(q. fs3 pp 3e c3 < leg b4 < leg f4 e d3 mf s eb3 leg       g3 leg bb3 leg a3 e fs3 leg fs3 3e gs4 > stacc       c5 > stacc b5 > stacc t f5 pp e.. e5) p6 '(q cs3 pp -q t gs3 marc e.. fs3 mf leg e c3 -e       t b3 leg f3 q.. e4 pp) )  
      Please note how the list function is used to enclose the instrument voices. The number of voices in an instrument should not exceed the layout of a particular instrument. For example a piano uses a two staff notation therefore the input should be a two lists in a list (list (list right-hand) (list left-hand)).
       
      (ps 'gm :p (list (list p1) (list p6)))  

       
       
      Instrument oboe, clarinet and bassoon:
      (ps 'gm :ob (list p1)     :cl (list p3)     :bn (list p6))  

       
      Brass Quintet:
      (ps 'gm :b5 (list p1 p2 p3 p4 p5))  
       

       
       
       
      DEF-UNFOLD
      UNFOLD
       
      The DEF-UNFOLD and UNFOLD function opens up a whole new set of possibilities for the composer using OPUSMODUS. It can prove a very powerful tool in defining methods (functions) from the outset, for a specific work or as a global index of your most used functions. To be able to store methods, processes and solutions and call them at anytime becomes a valuable resource for a composers workflow. This function is a companion to the UNFOLD function.
      (def-unfold m1   var (:pitch (pitch-variant x :variant '?))   dyn (:velocity (velocity-to-dynamic x))   )  
      (setf omn '(s bb4 p a4 h. db4 t gs4 mf fs4 c5 b4 q f5 e5))  
      To run the defined methods in a given omn-form sequence use the UNFOLD function:
      (unfold 'm1 '(var dyn) omn)  
      Examples:
      (def-unfold m2   7   (:pitch (pitch-transpose 7 x))   -12 (:pitch (pitch-transpose -12 x))   ret (:all (gen-retrograde x :flatten t))   var (:pitch (pitch-variant x :variant '?))   gf  (nil (gen-fragment '(3) '(3) x))   lrq (:length (length-rational-quantize x))   dyn (:velocity (velocity-to-dynamic x))   ls  (nil (length-span '(6/4 6/4) x))   ob  (:pitch (ambitus 'oboe x))   bn  (:pitch (ambitus 'bassoon x))   hn  (:pitch (ambitus 'french-horn x))   )  
      Please note that the number of methods within an instance can be much bigger than in the example above.
       
      Two bars of omn - opusmodus notation
      (setf mat '((q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf              -e 3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)             (t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc              t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5              3q bb5 > a4 > bb5 > e a4 pp stacc -e)))  
      Applying methods:
      (setf t1 (unfold 'm2 7 mat) t2 (unfold 'm2 '(-12 var ob) mat) t3 (unfold 'm2 'var mat) t4 (unfold 'm2 '(-12 gf lrq ls dyn ret var hn) t3) t5 (unfold 'm2 '(gf lrq ls dyn bn) t2) )  
      The result with a Wind-Quintet layout:
      (ps 'gm :w5 (list t1 t2 t3 t4 t5))  

       
       
       
      BIND-TO-INTERVAL
       
      The function BIND-TO-INTERVAL will bind (connect) a series of lists (patterns) to each-other with the given interval. Each transposition value is the sum of the last pitch in the list plus the given interval. The result of the process is a start transposition value for the next list. If rotate and variant options are used, the rotate process is the first followed by variant and finally the start transposition.
       
      In the example below the last pitch in the first list is g4, with binding interval 1 (semitone), therefore the start transposition value of the next list is gs4:
      (bind-to-interval '(1) '((s c4 d4 e4 g4) (s c4 d4 g4 e4))) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5))  
      Examples:
      (setf pattern '((s c4 d4 e4 g4)                 (s c4 d4 g4 e4)                 (s g4 e4 c4 d4)                 (s c4 d4 f4 g4)                 (s c4 d4 g4 f4)                 (s g4 f4 c4 d4)                 (s c4 d4 g4 f4)                 (s g4 gb4 f4 g4)                 (s g4 gb4 f4 a4)                 (s d4 f4 g4 a4)                 (s a4 g4 f4 d4)                 (s d4 f4 g4 c5)))  
      In this example the binding intervals are 1 and 2 randomly selected:
      (bind-to-interval (rnd-sample (length pattern) '(1 2)) pattern) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5) (s d5 b4 g4 a4) (s b4 cs5 e5 fs5)     (s g5 a5 d6 c6) (s d6 c6 g5 a5) (s bb5 c6 f6 eb6) (s f6 e6 eb6 f6)     (s g6 fs6 f6 a6) (s bb6 cs7 eb7 f7) (s fs7 e7 d7 b6) (s cs7 e7 fs7 b7))  
      In the next example the binding intervals are 13 and -13 with random variant:
      (bind-to-interval (rnd-sample (length pattern) '(13 -13)) pattern :variant '?) => ((s c4 d4 e4 g4) (s fs3 a3 e3 d3) (s eb4 fs4 bb4 gs4) (s g3 f3 d3 c3)     (s b1 a1 e1 fs1) (s g2 f2 bb2 c3) (s b1 a1 d2 e2) (s eb1 eb1 d1 cs1)     (s d2 cs2 c2 e2) (s f3 d3 c3 bb2) (s b3 d4 e4 fs4) (s g5 bb5 c6 f6))  
      Here the binding intervals are 1, -1, 2 -2:
      (bind-to-interval '(1 -1 2 -1 2 -1 2) pattern) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5) (s b4 gs4 e4 fs4) (s gs4 bb4 cs5 eb5)     (s d5 e5 a5 g5) (s a5 g5 d5 e5) (s eb5 f5 bb5 gs5) (s bb5 a5 gs5 bb5)     (s b5 bb5 a5 cs6) (s c6 eb6 f6 g6) (s a6 g6 f6 d6) (s cs6 e6 fs6 b6)) (bind-to-interval '(1 -1 2 -1 2 -1 2) pattern :variant '?) => ((s c4 d4 e4 g4) (s gs4 f4 bb4 c5) (s b4 gs4 e4 fs4) (s gs4 bb4 cs5 eb5)     (s d5 c5 a4 g4) (s a4 g4 e4 d4) (s cs4 eb4 gs4 fs4) (s gs4 a4 bb4 gs4)     (s a4 bb4 b4 g4) (s fs4 a4 b4 cs5) (s eb5 c5 bb4 gs4) (s g4 e4 d4 a3))  
      Example with rotation:
      (bind-to-interval (rnd-sample (length pattern) '(1 2)) pattern                   :rotate '(1 2 1 2 1)) => ((s c4 d4 e4 g4) (s a4 f4 g4 c5) (s d5 e5 a5 fs5) (s gs5 cs5 eb5 fs5)     (s gs5 fs5 cs5 eb5) (s e5 a5 g5 d5) (s e5 b4 cs5 fs5) (s g5 a5 a5 gs5)     (s bb5 gs5 g5 fs5) (s g5 a5 d5 f5) (s g5 d6 c6 bb5) (s c6 d5 f5 g5))  
       
      PAN
       
      This function converts mixer panning values in the range from -100(L) to 100(R) into MIDI pan values. The centre position value in the PAN function is 0.
       
      Examples:
      (pan 0) => 64 (pan '(-12 0 12)) => (56 64 72) (pan '(-30 -10 10 30)) => (45 58 70 83)  
      PAN in DEF-SCORE instrument instants definition:
      (def-score SQ            (:title "String Quartet - VSL Show"             :key-signature 'chromatic             :time-signature (get-time-signature vln1)             :tempo tempo             :layout (string-quartet-layout                      'violin1 'violin2 'viola 'cello))      (violin1    :omn vln1    :port 0    :channel 1 :sound 'vsl-violin-solo    :program 0 :pan (pan -30))      (violin2    :omn vln2    :channel 2 :sound 'vsl-violin-solo    :program 0 :pan (pan -10))      (viola    :omn vla    :channel 3 :sound 'vsl-viola-solo    :program 0 :pan (pan 10))      (cello    :omn vlc    :channel 4 :sound 'vsl-cello-solo    :program patches-vc :pan (pan 30))   )  
      PAN in DEF-INSTRUMENT-SETS instance:
      :string-quartet   (:layout string-quartet-layout            :port nil            :channel '(1 2 3 4)            :sound 'gm            :program '(violin violin viola cello)            :controllers nil            :pan (pan '(-30 -10 10 30))            :volume 92)  
       
      Multi Voice Snippet
       
      Select or place the mouse cursor at the end of the expression and press ⌘2.
      This snippet is very useful in sketching and testing the progress of your work ie. instrumentation, voice density etc…
      (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e            3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)       p2 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc            t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg            eb5 3q bb5 > a4 > bb5 > e a4 pp stacc -e)       p3 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc            e. cs4 marc s gs4 leg q gs4 -q)       p4 '(q. fs3 pp 3e c3 < leg b4 < leg f4 e d3 mf s eb3 leg            g3 leg bb3 leg a3 e fs3 leg fs3 3e gs4 > stacc            c5 > stacc b5 > stacc t f5 pp e.. e5)       p5 '(-q. e d4 pp q. eb5 mf e g4 q bb4 trem a4 trem)       p6 '(q cs4 pp -q t gs4 marc e.. fs4 mf leg e c4 -e            t b4 leg f4 q.. e4 pp)       p7 '(-q e d4 leg eb4 h g4 mf leg q. g4 > -e)       p8 '(s bb3 pp leg a3 h. db3 t gs4 mp fs3 < c5 < b3 q f4 marc e4)       ) (list p1 p2 p3 p4)  

       
       
       
       
      New window display:
      (display-midi *last-score* :display :window) (display-musicxml 'score :display :window)  
      Changes to ‘Evaluate Score’ and ‘Last Score’ shortcut keys.
       
      Best wishes,
      Janusz
    • By opmo
      The upcoming release will allow you to open display-midi, display-musicxml, graphs and snippets in a separate window. For any of you using second monitor this will be great addition to your work flow.
       
      Examples:
      (display-midi 'score :display :window) (display-musicxml 'score :display :window)  
      Best,
      Janusz
×
×
  • Create New...