Work-in-progress repo for ambisonics extensions for OM-SoX
Marlon Schumacher
5 days ago 942def65489b6b323c75dfa5ed977583a514432c
1
2
3
4
5
6
; OM File Header - Saved 2013/11/09 15:42:04
; (6.070005 :patc (om-make-point 35 34) (om-make-point 201 120) (om-make-point 815 629) "" 183 0 nil "2013/11/09 15:27:59")
; End File Header
; External resources 
; (list (list (quote :picture) "#P\"../../../resources/pict/omsox\""))
(in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "1-batch-processing" (quote ((om-load-boxcall (quote genfun) "IN-FILES" (quote in-files) (quote ((om-load-inputkeyword (quote input-keyword) "" "type" (quote :type) nil nil))) (om-make-point 215 364) nil nil "x" nil 1) (om-load-boxcall (quote genfun) "OUT-DIRECTORY 2" (quote out-directory) (quote nil) (om-make-point 444 359) nil nil "x" nil 1) (om-load-boxcall (quote genfun) "SOX-DITHER" (quote sox-dither) (quote ((om-load-inputfunmenu1 (quote input-funmenu) "Select a noise-shaping filter from the menu. Note that most filter types are available only with 44100Hz sample rate." "NOISESHAPE" "shibata" (list (list "triangular" "triangular") (list "sloped-triangular" "sloped-triangular") (list "lipshitz" "lipshitz") (list "f-weighted" "f-weighted") (list "modified-e-weighted" "modified-e-weighted") (list "improved-e-weighted" "improved-e-weighted") (list "gesemann" "gesemann") (list "shibata" "shibata") (list "low-shibata" "low-shibata") (list "high-shibata" "high-shibata"))))) (om-make-point 576 151) nil nil nil nil 1) (om-load-editor-box1 "" (quote sound) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "a track index for multichannel mixing" "tracknum" 0) (om-load-inputfun (quote input-funbox) "a list of markers (s)" "markers" nil))) (om-make-point 298 550) (om-make-point 80 50) (let ((newobj nil)) (load-port-info newobj (quote nil)) (init-mus-color newobj (quote nil)) (set-extra-pairs newobj (quote nil)) (set-patch-pairs newobj (quote nil)) (set-name newobj "") (set-tonalite newobj nil) newobj) nil nil (pairlis (quote (approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list 2 24 (quote g) (let ((newobj (make-instance (quote edition-values)))) (setf (paper-size newobj) (om-make-point 600 800)) (setf (top-margin newobj) 2) (setf (left-margin newobj) 1) (setf (right-margin newobj) 1) (setf (bottom-margin newobj) 1) (setf (orientation newobj) nil) (setf (scale newobj) nil) (setf (system-space newobj) (quote (1))) (setf (system-color newobj) (quote nil)) (setf (line-space newobj) 1) (setf (title newobj) nil) (setf (show-title? newobj) nil) (setf (show-page? newobj) nil) (setf (sheet-id newobj) nil) (setf (page-mode newobj) nil) newobj) (om-make-point 0 0) nil 0 (quote :soxplayer) 1 nil 1000 0 (om-make-point 822 329) (om-make-point 476 131) 0 1 (quote t) nil 0)) t nil nil nil) (om-load-boxcall (quote bastype) "list 2" (quote list) (quote nil) (om-make-point 385 388) (om-make-point 27 30) 8 "8" nil) (om-load-boxcall (quote bastype) "list" (quote list) (quote nil) (om-make-point 318 382) (om-make-point 55 30) 16000 "16000" nil) (om-load-boxcomment "comment" (om-make-point 36 24) (quote "OR:") "" (om-make-point 618 407) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 235 90) (quote "1) downmix to mono$2) trim silence off beginning and end$3) add dithering noise$4) convert samplerate and bitdepth$5) auto-rename and save to disk") "" (om-make-point 28 148) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 228 45) (quote "this patch will apply the following $batch process to a list of soundfiles:") "" (om-make-point 30 97) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))) (om-load-boxcall (quote bastype) "aux 6" (quote t) (quote nil) (om-make-point 198 314) (om-make-point 44 30) "aif" "\"aif\"" nil) (om-load-boxcomment "comment" (om-make-point 237 24) (quote "-> specify a directory to write the files into") "" (om-make-point 524 373) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 201 48) (quote "-> you can devise a visual program $(patch in lambda mode) $to algorithmically specify filepaths.") "" (om-make-point 526 437) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 125 60) (quote "\"in-files\" will return $a list of paths of .aif $files contained in a $folder on the disk") "" (om-make-point 99 359) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 306 34) (quote "Example of a batch-process with OM-SoX") "" (om-make-point 126 19) nil (om-make-color 0.0 0.0 0.0) (om-make-font "Verdana" 14.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote abstraction) "rename" (om-load-patch-abs1 "rename" (quote ((om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 196 167) (om-make-point 87 30) "converted" "\"converted\"" nil) (om-load-boxcall (quote genfun) "X-APPEND" (quote x-append) (quote ((om-load-inputfun (quote input-funbox) "first element" "L1?" nil) (om-load-inputfun (quote input-funbox) "second element" "L2?" nil))) (om-make-point 158 197) nil nil nil nil 1) (om-load-boxcall (quote lispfun) "PATHNAME-TYPE" (quote pathname-type) (quote ((om-load-inputfun (quote input-funbox) "P" "P" nil))) (om-make-point 410 116) nil nil nil nil 1) (om-load-boxout "output" 0 (om-make-point 285 332) (quote ((om-load-inputfun (quote input-funbox) "" "out" nil))) nil nil) (om-load-boxcall (quote lispfun) "OM-MAKE-PATHNAME" (quote om-make-pathname) (quote ((om-load-inputkeyword (quote input-keyword) "" "directory" (quote :directory) nil nil) (om-load-inputkeyword (quote input-keyword) "" "name" (quote :name) nil nil) (om-load-inputkeyword (quote input-keyword) "" "type" (quote :type) nil nil))) (om-make-point 247 273) nil nil nil nil 1) (om-load-boxcall (quote lispfun) "PATHNAME-NAME" (quote pathname-name) (quote ((om-load-inputfun (quote input-funbox) "P" "P" nil))) (om-make-point 260 116) nil nil nil nil 1) (om-load-boxcall (quote lispfun) "PATHNAME-DIRECTORY" (quote pathname-directory) (quote ((om-load-inputfun (quote input-funbox) "P" "P" nil))) (om-make-point 121 116) nil nil nil nil 1) (om-load-boxin "input" 0 (om-make-point 295 35) "" nil nil nil))) (quote ((6 0 1 0 nil 0) (0 0 1 1 nil 0) (7 0 2 0 nil 0) (4 0 3 0 nil 0) (1 0 4 0 nil 0) (5 0 4 1 nil 0) (2 0 4 2 nil 0) (7 0 5 0 nil 0) (7 0 6 0 nil 0))) 6.070005 nil "" (om-make-point 200 200) (om-make-point 675 430)) (quote ((om-load-inputfun (quote input-funbox) "" "input" nil))) (om-make-point 458 427) nil nil "l" "rename") (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "" "INPUT" nil) (om-load-inputfun (quote input-funbox) "" "COMMANDS" "") (om-load-inputkeyword (quote input-keyword) "" "samplerate" (quote :samplerate) "16k" (list (list "16k" "16k") (list "20k" "20k") (list "30k" "30k") (list "44.1k" "44.1k") (list "48k" "48k") (list "88.2k" "88.2k") (list "96k" "96k"))) (om-load-inputkeyword (quote input-keyword) "Bitdepth of produced audio [number]" "bitdepth" (quote :bitdepth) 8 (list (list "8" 8) (list "16" 16) (list "24" 24) (list "32" 32) (list "64" 64))) (om-load-inputkeyword (quote input-keyword) "" "output" (quote :output) "realtime" (list (list "realtime" "realtime") (list "new file" nil) (list "replace file" "replace file") (list "pipe" "pipe"))))) (om-make-point 282 439) nil nil nil nil 1) (om-load-boxcall (quote genfun) "SOX-DOWNMIX" (quote sox-downmix) (quote ((om-load-inputkeyword (quote input-keyword) "Append sox-effects/statistics to the processing chain." "sox-append" (quote :sox-append) nil nil))) (om-make-point 268 305) nil nil nil nil 1) (om-load-boxcall (quote genfun) "SOX-TRIMSILENCE" (quote sox-trimsilence) (quote ((om-load-inputfun (quote input-funbox) "how many periods of non-silence should be retained" "ABOVE-PERIODS" 1) (om-load-inputfun (quote input-funbox) "indicates the amount of time that non-silence must be detected before it stops trimming audio" "DURATION" 2) (om-load-inputfun (quote input-funbox) "Silence-threshold (in dB)" "THRESHOLD" -60) (om-load-inputkeyword (quote input-keyword) "how many periods of silence should be retained before cutting off the audio" "below-periods" (quote :below-periods) nil nil) (om-load-inputkeyword (quote input-keyword) "connect other commands to add to the processing chain" "below-duration" (quote :below-duration) nil nil) (om-load-inputkeyword (quote input-keyword) "" "below-threshold" (quote :below-threshold) nil nil) (om-load-inputkeyword (quote input-keyword) "Append sox-effects/statistics to the processing chain." "sox-append" (quote :sox-append) nil nil))) (om-make-point 389 230) nil nil nil nil 1) (om-load-boxcall (quote bastype) "aux 5" (quote t) (quote nil) (om-make-point 341 187) (om-make-point 39 30) 0.01 "0.01" nil) (om-load-boxcall (quote bastype) "aux 4" (quote t) (quote nil) (om-make-point 429 172) (om-make-point 21 30) 1 "1" nil) (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 461 177) (om-make-point 32 30) 0.2 "0.2" nil) (om-load-boxcall (quote bastype) "aux 2" (quote t) (quote nil) (om-make-point 504 187) (om-make-point 33 30) -80 "-80" nil) (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 387 176) (om-make-point 33 30) -60 "-60" nil))) (quote ((9 0 0 0 nil 0) (15 0 3 0 nil 0) (0 0 15 0 nil 0) (16 0 15 1 nil 0) (5 0 15 2 nil 0) (4 0 15 3 nil 0) (14 0 15 4 nil 0) (17 0 16 0 nil 0) (18 0 17 1 nil 0) (22 0 17 2 nil 0) (19 0 17 3 nil 0) (20 0 17 4 nil 0) (21 0 17 5 nil 0) (2 0 17 6 nil 0))) (list (let ((newpict (make-instance (quote patch-picture) :name "omsox" :source (quote user) :pict-pathname (restore-pict-path (restore-path nil)) :thepict (om-get-picture "omsox" (quote user)) :storemode :external :draw-params (quote (p 0 0 100 100)) :extraobjs nil))) (setf (pict-pos newpict) (om-make-point 57 8)) (setf (pict-size newpict) (om-make-point 63 49)) newpict)) 6.070005))