Jump to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.