2 files added
5 files modified
| | |
| | | # LispWorks files |
| | | *.*fasl |
| | | *.*~ |
| | | *.lisp# |
| | | |
| | | # OM Reference files |
| | | reference-pages/ |
| | | |
| | | # Visual Studio Code files |
| | | .vscode |
New file |
| | |
| | | ; OM File Header - Saved 2025/03/05 15:29:28 |
| | | ; (7.05 :patc (om-make-point 24 24) (om-make-point 449 132) (om-make-point 800 725) "" 183 0 "2025/03/04 17:29:33" "2025/03/05 15:28:40") |
| | | ; End File Header |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "distance-cues" (quote ((let ((box (om-load-boxcall (quote genfun) "OM-SCALE-EXP" (quote om-scale-exp) (quote ((om-load-inputfun (quote input-funbox) "number or list" "SELF" 1) (om-load-inputfun (quote input-funbox) "a number" "MINOUT" 10) (om-load-inputfun (quote input-funbox) "a number" "MAXOUT" -10) (om-load-inputfun (quote input-funbox) "an exponent" "EXPONENT" 1) (om-load-inputfun (quote input-funbox) "an exponent" "MININ" 30) (om-load-inputfun (quote input-funbox) "an exponent" "MAXIN" 2))) (om-make-point 477 119) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-REVERB 2" (quote sox-reverb) (quote ((om-load-inputfun (quote input-funbox) "Reverberance (%)" "REVERBERANCE" 50) (om-load-inputfun (quote input-funbox) "HF-damping (%)" "HF-DAMPING" 50) (om-load-inputfun (quote input-funbox) "Room-scale (%)" "ROOM-SCALE" 100) (om-load-inputfun (quote input-funbox) "Stereo-depth (%)" "STEREO-DEPTH" 100) (om-load-inputfun (quote input-funbox) "Pre-delay (ms)" "PRE-DELAY" 0) (om-load-inputfun (quote input-funbox) "Wet-gain (dB)" "WET-GAIN" 0))) (om-make-point 513 325) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (let ((box (om-load-boxcall (quote genfun) "LIST-ELEMENTS" (quote list-elements) (quote ((om-load-inputfun (quote input-funbox) "a list" "LIST" nil))) (om-make-point 650 204) nil nil nil nil 5))) (setf (numouts box) 5) box))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "OM-CLIP 2" (quote om-clip) (quote ((om-load-inputfun (quote input-funbox) "number or list" "SELF" nil) (om-load-inputfun (quote input-funbox) "minimum value or list of values" "MIN" -10) (om-load-inputfun (quote input-funbox) "maximum value or list of values" "MAX" 10))) (om-make-point 551 228) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "rev-params" 5 (om-make-point 656 131) "" "rev-params" (list 50 50 100 100 0) nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "FLOAT 2" (quote float) (quote ((om-load-inputfun (quote input-funbox) "N" "N" nil))) (om-make-point 501 184) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "padding" 4 (om-make-point 472 417) "" "padding" 2.0 nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "sound-duration" 3 (om-make-point 557 417) "" "sound-duration" nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "OM-CLIP" (quote om-clip) (quote ((om-load-inputfun (quote input-funbox) "number or list" "SELF" nil) (om-load-inputfun (quote input-funbox) "minimum value or list of values" "MIN" 0) (om-load-inputfun (quote input-funbox) "maximum value or list of values" "MAX" 20000))) (om-make-point 117 421) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote abstraction) "gain-factor" (om-load-lisp-abspatch "gain-factor" 7.05 ";;; Edit a valid LAMBDA EXPRESSION for \"time-delay\"$;;; e.g. (lambda (arg1 arg2 ...) ( ... ))$$(lambda (distance gain-expt) $$(float (/ (expt distance gain-expt)))$$)") (quote ((om-load-inputfun (quote input-funbox) "" "DISTANCE" nil) (om-load-inputfun (quote input-funbox) "" "GAIN-EXPT" nil))) (om-make-point 215 300) nil (list 0.16) nil "gain-factor"))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote abstraction) "airabsorption" (om-load-lisp-abspatch "airabsorption" 7.05 ";;; Edit a valid LAMBDA EXPRESSION for \"time-delay\"$;;; e.g. (lambda (arg1 arg2 ...) ( ... ))$$(lambda (distance) $$(float (/ 100000 (if (zerop distance) 0.01 distance)))$$)") (quote ((om-load-inputfun (quote input-funbox) "" "DISTANCE" nil))) (om-make-point 91 242) nil (list 40000.0) nil "airabsorption"))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-LOWPASS" (quote sox-lowpass) (quote ((om-load-inputfun (quote input-funbox) "Cutoff-frequency (Hz)" "CUTOFF-FREQUENCY" 1000) (om-load-inputfun (quote input-funbox) "Filter width (applies only to two-pole filters). Default unit: Hz" "WIDTH" 100) (om-load-inputfunmenu1 (quote input-funmenu) "One- or Two-pole filtering" "POLES" "onepole" (list (list "onepole" "onepole") (list "twopole" "twopole"))) (om-load-inputkeyword (quote input-keyword) "Append sox-effects/statistics to the processing chain." "sox-append" (quote :sox-append) nil nil))) (om-make-point 200 493) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PAD" (quote sox-pad) (quote ((om-load-inputfun (quote input-funbox) "duration of silence/zero-padding (if float in seconds, otherwise in samples)" "DURATION" 2) (om-load-inputkeyword (quote input-keyword) "position in the soundfile to insert silence" "position" (quote :position) 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 506 488) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-AMPLITUDE" (quote sox-amplitude) (quote ((om-load-inputfun (quote input-funbox) "amplitude factor (linear)" "AMPLITUDE" 1) (om-load-inputkeyword (quote input-keyword) "Append sox-effects/statistics to the processing chain." "sox-append" (quote :sox-append) nil nil))) (om-make-point 218 403) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "gain-expt" 2 (om-make-point 233 225) "" "gain-expt" 2.0 nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote abstraction) "time-delay" (om-load-lisp-abspatch "time-delay" 7.05 ";;; Edit a valid LAMBDA EXPRESSION for \"time-delay\"$;;; e.g. (lambda (arg1 arg2 ...) ( ... ))$$(lambda (distance speed-of-sound) $$(float (* (/ speed-of-sound) distance))$$)") (quote ((om-load-inputfun (quote input-funbox) "" "DISTANCE" nil) (om-load-inputfun (quote input-funbox) "" "SPEED-OF-SOUND" nil))) (om-make-point 291 151) nil (list 0.007352941) nil "time-delay"))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PAD" (quote sox-pad) (quote ((om-load-inputfun (quote input-funbox) "duration of silence/zero-padding (if float in seconds, otherwise in samples)" "DURATION" 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 369 328) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "speed-of-sound" 1 (om-make-point 290 39) "" "speed-of-sound" 340 nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxout "output" 0 (om-make-point 127 604) (quote ((om-load-inputfun (quote input-funbox) "" "out" nil))) nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxin "distance" 0 (om-make-point 106 39) "" "distance" 2.5 nil))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((19 0 0 0 nil 0) (2 0 1 0 nil 0) (2 1 1 1 nil 0) (2 2 1 2 nil 0) (2 3 1 3 nil 0) (2 4 1 4 nil 0) (3 0 1 5 nil 0) (4 0 2 0 nil 0) (5 0 3 0 nil 0) (0 0 5 0 nil 0) (10 0 8 0 nil 0) (19 0 9 0 nil 0) (14 0 9 1 nil 0) (19 0 10 0 nil 0) (8 0 11 0 nil 0) (13 0 11 3 nil 0) (6 0 12 0 nil 0) (7 0 12 1 nil 0) (1 0 12 2 nil 0) (9 0 13 0 nil 0) (16 0 13 1 nil 0) (19 0 15 0 nil 0) (17 0 15 1 nil 0) (15 0 16 0 nil 0) (12 0 16 1 nil 0) (11 0 18 0 nil 0))) nil 7.05)) |
New file |
| | |
| | | ; OM File Header - Saved 2025/03/05 15:54:40 |
| | | ; (7.05 :patc (om-make-point 10 360) (om-make-point 418 84) (om-make-point 907 881) "" 183 0 "2025/03/04 17:45:21" "2025/03/05 15:54:40") |
| | | ; End File Header |
| | | ; External resources |
| | | ; (list (list (quote :picture) "#P\"../../../resources/pict/omsox\"") (list (quote :abstraction) "#P\"../scripts-and-macros/distance-cues.omp\"") (list (quote :sound) "#P\"../../../../../../../../../../../../Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav\"")) |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "distance-cue rendering" (quote ((let ((box (om-load-boxcomment "comment 2" (om-make-point 130 24) (quote "pick rendering method") "" (om-make-point 209 387) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-HOAENCODE" (quote sox-hoaencode) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Positions as 3dc object, or list of azimuth+elevation values, or list of x+y+z coordinates. [3dc, list]" "positions" (list 0 0)) (om-load-inputfun (quote input-funbox) "Ambisonics order. [int]" "order" 3))) (om-make-point 197 262) (om-make-point 70 50) (if (find-class (quote sox-hoaencode) nil) (make-instance (quote sox-hoaencode) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host :unspecific :name "amen-break" :type "wav") :positions (list (list (list 0 0))) :order 3 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 200) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 128 24) (quote "distance values (in m)") "" (om-make-point 637 457) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 134 24) (quote "SoX-reverb parameters") "" (om-make-point 630 269) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 252 84) (quote "this abstraction processes the audio to render:$$- gain rolloff$- air absorption$- time delay$- dry/reverb ratio") "" (om-make-point 614 341) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "=" (quote =) (quote ((om-load-inputfun (quote input-funbox) "NUM" "NUM" 0) (om-load-inputfun (quote input-funbox) "add-input" "add-input" nil))) (om-make-point 75 423) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "OMIF" (quote omif) (quote ((om-load-inputfun (quote input-funbox) "IF" "TEST" nil) (om-load-inputfun (quote input-funbox) "THEN" "ACTION" nil) (om-load-inputfun (quote input-funbox) "ELSE" "ELSE" nil))) (om-make-point 115 437) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "POP-UP-MENU" (quote pop-up-menu) (quote ((om-load-inputfun (quote input-funbox) "list of choices" "items" (list "SoX-PAN" "SoX-HOAENCODE")) (om-load-inputfun (quote input-funbox) "a function or box in lambda mode" "action" nil))) (om-make-point 38 378) (om-make-point 172 43) (let ((rep (om-make-dialog-item (quote pop-up-menu) (om-make-point 1 1) (om-make-point 152 26) "untitled" :range (quote ("SoX-PAN" "SoX-HOAENCODE"))))) (om-set-selected-item-index rep (quote 1)) rep) "x" nil (pairlis (quote (winpos winsize)) (list (om-make-point 10 40) (om-make-point 335 275))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 471 45) (quote "For spatialization applications it is convenient to use a macro (abstraction) $for rendering of artificial distance cues") "" (om-make-point 149 22) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 6" (quote t) (quote nil) (om-make-point 624 293) (om-make-point 129 30) (list 75 100 100 100 0) "(75 100 100 100 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 5" (quote t) (quote nil) (om-make-point 572 258) (om-make-point 38 30) 0.5 "0.5" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 610 480) (om-make-point 130 30) (list 1 4 7 10 13 16 19) "(1 4 7 10 13 16 19)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote abstraction) "lispfunction" (om-load-lisp-abspatch "lispfunction" 7.05 ";;; Edit a valid LAMBDA EXPRESSION for \"lispfunction\"$;;; e.g. (lambda (arg1 arg2 ...) ( ... ))$$(lambda (lst) $$(butlast (om:mat-trans (list lst (cdr lst))))$$))") (quote ((om-load-inputfun (quote input-funbox) "" "LST" nil))) (om-make-point 377 359) nil (list (list (list 0.0 0.5) (list 0.5 1.0) (list 1.0 1.5) (list 1.5 2.0) (list 2.0 2.5) (list 2.5 3.0) (list 3.0 3.5))) nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "MAPCAR" (quote mapcar) (quote ((om-load-inputfun (quote input-funbox) "FUNCTION" "FUNCTION" nil) (om-load-inputfun (quote input-funbox) "LIST" "LIST" nil) (om-load-inputfun (quote input-funbox) "add-input" "add-input" nil))) (om-make-point 387 504) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "MAPCAR" (quote mapcar) (quote ((om-load-inputfun (quote input-funbox) "FUNCTION" "FUNCTION" nil) (om-load-inputfun (quote input-funbox) "LIST" "LIST" nil))) (om-make-point 553 454) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Output type (new file, replace file, pipe, or realtime) [string]. Also accepts directory, filename, filepath [path]" "output" (quote :output) nil (list (list "new file" nil) (list "replace file" "replace file") (list "pipe" "pipe") (list "realtime" "realtime"))) (om-load-inputkeyword (quote input-keyword) "Filetype of produced audio [string]" "filetype" (quote :filetype) "aif" (list (list "aif" "aif") (list "wav" "wav") (list "flac" "flac") (list "ogg" "ogg"))))) (om-make-point 163 678) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-CONCATENATE" (quote sox-concatenate) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Gain value for audio input before processing (dBFS). [float, list]" "gains" nil))) (om-make-point 124 588) (om-make-point 134 53) (if (find-class (quote sox-concatenate) nil) (make-instance (quote sox-concatenate) :sound (list "| '/Users/Shared/_Development/OM-SoX/sources/OM-SoX/executables/macos/sox-1442' -q --multi-threaded --buffer 4096 --input-buffer 512 -V0 -M -v1.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v1.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.5 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.8660254 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.61237246 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.7905694 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' '-p' lowpass -1 20000 vol 0.4 pad 0.007352941 pad 0.5@0.5 reverb 75 100 100 100 0 -9.642857" "| '/Users/Shared/_Development/OM-SoX/sources/OM-SoX/executables/macos/sox-1442' -q --multi-threaded --buffer 4096 --input-buffer 512 -V0 -M -v1.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v1.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.5 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.8660254 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v-0.61237246 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.0 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' -v0.7905694 '/Users/Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/amen-break.wav' '-p' lowpass -1 20000 vol 0.4 pad 0.007352941 pad 0.5@0.5 reverb 75 100 100 100 0 -9.642857") :gains (list 0.0 0.0) :from-file t)) nil nil (pairlis (quote (winpos winsize)) (list (om-make-point 10 40) (om-make-point 1022 150))) nil nil nil t (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "ARITHM-SER" (quote arithm-ser) (quote ((om-load-inputfun (quote input-funbox) "begin" "BEGIN" 0.0) (om-load-inputfun (quote input-funbox) "end " "END" 10) (om-load-inputfun (quote input-funbox) "step" "STEP" 0.5))) (om-make-point 382 296) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-TRIM" (quote sox-trim) (quote ((om-load-inputfun (quote input-funbox) "start (number in secs), or start and end (list of 'start' and 'end' point (in secs)" "START-AND-END" 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 343 429) nil nil "l" nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "SOX-SOUND-DURATION" (quote sox-sound-duration) (quote ((om-load-inputfun (quote input-funbox) "SELF" "SELF" nil))) (om-make-point 358 234) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 136 775) (om-make-point 153 54) (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 (outport inport player zoom grillestep mode winsize winpos show-spectrum deltapict obj-mode cmnpref notechancolor? show-stems scale onset measure)) (list nil nil (quote :om-audio) 1 nil 0 (om-make-point 370 280) (om-make-point 400 38) nil (om-make-point 0 0) 0 (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) nil (quote t) nil nil nil)) t nil nil t (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Output type (new file, replace file, pipe, or realtime) [string]. Also accepts directory, filename, filepath [path]" "output" (quote :output) "pipe" (list (list "new file" nil) (list "replace file" "replace file") (list "pipe" "pipe") (list "realtime" "realtime"))))) (om-make-point 111 498) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "amen-break.wav" (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 127 153) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "amen-break" :type "wav") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "amen-break.wav") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset scale show-stems notechancolor? cmnpref obj-mode deltapict show-spectrum winpos winsize mode grillestep zoom player inport outport)) (list nil nil nil (quote t) nil (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) 0 (om-make-point 0 0) nil (om-make-point 400 38) (om-make-point 1111 420) 0 nil 1 (quote :om-audio) nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-PAN" (quote sox-pan) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Gain value for audio input before processing (dBFS). [float, list]" "gains" 0.0) (om-load-inputfun (quote input-funbox) "Panning value (decimal number) for panning audio between adjacent channels. [float, list]" "panning" 1.2) (om-load-inputfun (quote input-funbox) "Number of available output channels for panning." "numchannels" 2))) (om-make-point 121 262) (om-make-point 70 50) (if (find-class (quote sox-pan) nil) (make-instance (quote sox-pan) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host nil :name "amen-break" :type "wav") :gains (list 0.0) :panning 1.2 :numchannels 2 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 200) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 541 257) (om-make-point 27 30) 1 "1" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 2" (quote t) (quote nil) (om-make-point 499 278) (om-make-point 41 30) 340 "340" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote patch-box) "distance-cues" (quote ("elements" "OM-SoX-tutorial-patches" "scripts-and-macros" "distance-cues")) (quote ((om-load-inputfun (quote input-funbox) "" "distance" 2.5) (om-load-inputfun (quote input-funbox) "" "speed-of-sound" 340) (om-load-inputfun (quote input-funbox) "" "gain-expt" 2.0) (om-load-inputfun (quote input-funbox) "" "sound-duration" nil) (om-load-inputfun (quote input-funbox) "" "padding" nil) (om-load-inputfun (quote input-funbox) "" "rev-params" nil))) (om-make-point 529 344) nil nil "l" "distance-cues" 1))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((22 0 1 1 nil 0) (7 0 5 1 nil 0) (5 0 6 0 nil 0) (23 0 6 1 nil 0) (1 0 6 2 nil 0) (17 0 12 0 nil 0) (18 0 13 0 nil 0) (12 0 13 1 nil 0) (14 0 13 2 nil 0) (26 0 14 0 nil 0) (11 0 14 1 nil 0) (16 0 15 0 nil 0) (21 0 16 1 nil 0) (19 0 17 1 nil 0) (22 0 19 0 nil 0) (15 0 20 0 nil 0) (6 0 21 0 nil 0) (13 0 21 1 nil 0) (22 0 23 1 nil 0) (25 0 26 1 nil 0) (24 0 26 2 nil 0) (10 0 26 3 nil 0) (10 0 26 4 nil 0) (9 0 26 5 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 78 19)) (setf (pict-size newpict) (om-make-point 63 46)) newpict)) 7.05)) |
| | |
| | | ; OM File Header - Saved 2025/03/01 02:41:41 |
| | | ; (7.05 :patc (om-make-point 238 218) (om-make-point 480 81) (om-make-point 928 591) "" 183 0 "2025/03/01 02:15:44" "2025/03/01 02:41:41") |
| | | ; OM File Header - Saved 2025/03/05 15:52:46 |
| | | ; (7.05 :patc (om-make-point 238 218) (om-make-point 390 297) (om-make-point 1016 593) "" 183 0 "2025/03/01 02:15:44" "2025/03/05 15:52:46") |
| | | ; End File Header |
| | | ; External resources |
| | | ; (list (list (quote :picture) "#P\"../../../../resources/pict/omsox\"") (list (quote :sound) "#P\"../../../../../../../../../../../../../Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/clarinet-multi-mono.aif\"") (list (quote :abstraction) "#P\"sox-hoaencode continuous.omp\"")) |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "sox-hoaencode" (quote ((let ((box (om-load-boxcall (quote patch-box) "sox-hoaencode continuous" (quote ("elements" "OM-SoX-tutorial-patches" "support" "input-combiners" "sox-hoaencode continuous")) (quote nil) (om-make-point 686 424) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 3" (om-make-point 136 36) (quote "check out this example $for continuous panning") "" (om-make-point 698 389) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 49 24) (quote "(x y z)") "" (om-make-point 721 154) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Filetype of produced audio [string]" "filetype" (quote :filetype) "aif" (list (list "aif" "aif") (list "wav" "wav") (list "flac" "flac") (list "ogg" "ogg"))))) (om-make-point 541 315) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 556 403) (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 onset measure)) (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 559 303) (om-make-point 400 38) 0 1 (quote t) nil 0 nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 723 190) (om-make-point 27 30) 3 "3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-HOAENCODE 2" (quote sox-hoaencode) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Positions as 3dc object, or list of azimuth+elevation values, or list of x+y+z coordinates. [3dc, list]" "positions" (list 0 0)) (om-load-inputfun (quote input-funbox) "Ambisonics order. [int]" "order" 3))) (om-make-point 547 234) (om-make-point 70 50) (if (find-class (quote sox-hoaencode) nil) (make-instance (quote sox-hoaencode) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host :unspecific :name "clarinet-multi-mono" :type "aif") :positions (list (list -90 0)) :order 3 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 150) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 658 157) (om-make-point 59 30) (list 1 0 0) "(1 0 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 557 131) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset :show-spectrum approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list nil nil (quote t) 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 540 306) (om-make-point 400 38) 0 1 (quote t) nil 0)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 115 24) (quote "(azimuth elevation)") "" (om-make-point 312 154) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Filetype of produced audio [string]" "filetype" (quote :filetype) "aif" (list (list "aif" "aif") (list "wav" "wav") (list "flac" "flac") (list "ogg" "ogg"))))) (om-make-point 132 315) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 524 48) (quote "The signal follows the ambiX convention, i.e. it uses SN3D normalization and ACN channel ordering. $The resulting file has (<order>+1)^2 channels $(order 0: 1 channel, order 1: 4 channels, order 2: 9 channels, order 3: 16 channels, ...).") "" (om-make-point 139 485) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 314 190) (om-make-point 27 30) 3 "3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-HOAENCODE 2" (quote sox-hoaencode) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Positions as 3dc object, or list of azimuth+elevation values, or list of x+y+z coordinates. [3dc, list]" "positions" (list 0 0)) (om-load-inputfun (quote input-funbox) "Ambisonics order. [int]" "order" 3))) (om-make-point 138 234) (om-make-point 70 50) (if (find-class (quote sox-hoaencode) nil) (make-instance (quote sox-hoaencode) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host :unspecific :name "clarinet-multi-mono" :type "aif") :positions (list (list -90 0)) :order 3 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 150) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 248 156) (om-make-point 60 30) (list -90 0) "(-90 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 148 131) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset :show-spectrum approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list nil nil (quote t) 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 540 306) (om-make-point 400 38) 0 1 (quote t) nil 0)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 147 403) (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 onset measure)) (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 559 303) (om-make-point 400 38) 0 1 (quote t) nil 0 nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 279 48) (quote "-> NB: this class has no editor yet$$Select box and press 'd' for documentation of inlets.") "" (om-make-point 232 240) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 662 60) (quote "Encode audio into higher-order ambisonics B-format following SN3D and ACN conventions. $Positions can be specified in polar (azimuth elevation in degrees) or cartesian coordinates (x y z), see doc.$Order can be specified numerically up to 3rd-order.") "" (om-make-point 128 52) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 141 34) (quote "SoX-HOAENCODE") "" (om-make-point 135 18) nil (om-make-color 0.0 0.0 0.0) (om-make-font "Verdana" 14.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((6 0 3 0 nil 0) (3 0 4 0 nil 0) (8 0 6 1 nil 0) (7 0 6 2 nil 0) (5 0 6 3 nil 0) (13 0 10 0 nil 0) (15 0 13 1 nil 0) (14 0 13 2 nil 0) (12 0 13 3 nil 0) (10 0 16 0 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 60 8)) (setf (pict-size newpict) (om-make-point 63 48)) newpict)) 7.05)) |
| | | ; (list (list (quote :picture) "#P\"../../../../resources/pict/omsox\"") (list (quote :sound) "#P\"../../../../../../../../../../../../../Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/clarinet-multi-mono.aif\"") (list (quote :abstraction) "#P\"../distance-cue rendering.omp\"" "#P\"sox-hoaencode continuous.omp\"")) |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "sox-hoaencode" (quote ((let ((box (om-load-boxcall (quote patch-box) "distance-cue rendering" (quote ("elements" "OM-SoX-tutorial-patches" "support" "distance-cue rendering")) (quote nil) (om-make-point 698 321) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 3" (om-make-point 188 72) (quote "SoX-HOAENCODE $does not render distance natively.$ $Check out this example $for distance cue rendering") "" (om-make-point 695 257) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 279 24) (quote "Select box and press 'd' for documentation of inlets.") "" (om-make-point 231 265) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote patch-box) "sox-hoaencode continuous" (quote ("elements" "OM-SoX-tutorial-patches" "support" "input-combiners" "sox-hoaencode continuous")) (quote nil) (om-make-point 686 424) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 3" (om-make-point 136 36) (quote "check out this example $for continuous panning") "" (om-make-point 699 394) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 49 24) (quote "(x y z)") "" (om-make-point 721 154) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Filetype of produced audio [string]" "filetype" (quote :filetype) "aif" (list (list "aif" "aif") (list "wav" "wav") (list "flac" "flac") (list "ogg" "ogg"))))) (om-make-point 541 315) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 556 403) (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 onset measure)) (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 559 303) (om-make-point 400 38) 0 1 (quote t) nil 0 nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 723 190) (om-make-point 27 30) 3 "3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-HOAENCODE 2" (quote sox-hoaencode) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Positions as 3dc object, or list of azimuth+elevation values, or list of x+y+z coordinates. [3dc, list]" "positions" (list 0 0)) (om-load-inputfun (quote input-funbox) "Ambisonics order. [int]" "order" 3))) (om-make-point 547 234) (om-make-point 70 50) (if (find-class (quote sox-hoaencode) nil) (make-instance (quote sox-hoaencode) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host nil :name "clarinet-multi-mono" :type "aif") :positions (list (list -90 0)) :order 3 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 150) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 658 157) (om-make-point 59 30) (list 1 0 0) "(1 0 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 557 131) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset :show-spectrum approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list nil nil (quote t) 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 540 306) (om-make-point 400 38) 0 1 (quote t) nil 0)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 115 24) (quote "(azimuth elevation)") "" (om-make-point 310 154) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "Audio input to be processed [sound, path, string/pipe, sox-input]" "SOX-INPUT" nil) (om-load-inputfun (quote input-funbox) "Sox-effect to be applied to audio input [string]" "SOX-EFFECT" "") (om-load-inputkeyword (quote input-keyword) "Filetype of produced audio [string]" "filetype" (quote :filetype) "aif" (list (list "aif" "aif") (list "wav" "wav") (list "flac" "flac") (list "ogg" "ogg"))))) (om-make-point 130 315) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 524 36) (quote "The signal follows the ambiX convention, i.e. it uses SN3D normalization and ACN channel ordering. $The resulting file will have (<order>+1)^2 channels") "" (om-make-point 141 468) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 312 190) (om-make-point 27 30) 3 "3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-HOAENCODE 2" (quote sox-hoaencode) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Positions as 3dc object, or list of azimuth+elevation values, or list of x+y+z coordinates. [3dc, list]" "positions" (list 0 0)) (om-load-inputfun (quote input-funbox) "Ambisonics order. [int]" "order" 3))) (om-make-point 136 234) (om-make-point 70 50) (if (find-class (quote sox-hoaencode) nil) (make-instance (quote sox-hoaencode) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device :unspecific :host :unspecific :name "clarinet-multi-mono" :type "aif") :positions (list -90 0) :order 3 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 150) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 246 156) (om-make-point 60 30) (list -90 0) "(-90 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 146 131) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset :show-spectrum approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list nil nil (quote t) 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 540 306) (om-make-point 400 38) 0 1 (quote t) nil 0)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 145 403) (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 onset measure)) (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 559 303) (om-make-point 400 38) 0 1 (quote t) nil 0 nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 190 24) (quote "-> NB: this class has no editor yet") "" (om-make-point 230 240) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 662 60) (quote "Encode audio into higher-order ambisonics B-format following SN3D and ACN conventions. $Positions can be specified in polar (azimuth elevation in degrees) or cartesian coordinates (x y z), see doc.$Order can be specified numerically up to 3rd-order.") "" (om-make-point 128 52) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 141 34) (quote "SoX-HOAENCODE") "" (om-make-point 135 18) nil (om-make-color 0.0 0.0 0.0) (om-make-font "Verdana" 14.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((9 0 6 0 nil 0) (6 0 7 0 nil 0) (11 0 9 1 nil 0) (10 0 9 2 nil 0) (8 0 9 3 nil 0) (16 0 13 0 nil 0) (18 0 16 1 nil 0) (17 0 16 2 nil 0) (15 0 16 3 nil 0) (13 0 19 0 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 60 8)) (setf (pict-size newpict) (om-make-point 63 48)) newpict)) 7.05)) |
| | |
| | | ; OM File Header - Saved 2025/03/04 17:27:51 |
| | | ; (7.05 :patc (om-make-point 238 218) (om-make-point 508 304) (om-make-point 602 522) "" 183 0 "2025/03/01 00:57:08" "2025/03/04 16:51:52") |
| | | ; OM File Header - Saved 2025/03/05 15:53:26 |
| | | ; (7.05 :patc (om-make-point 238 218) (om-make-point 508 304) (om-make-point 697 517) "" 183 0 "2025/03/01 00:57:08" "2025/03/05 15:53:26") |
| | | ; End File Header |
| | | ; External resources |
| | | ; (list (list (quote :picture) "#P\"../../../../resources/pict/omsox\"") (list (quote :sound) "#P\"../../../../../../../../../../../../../Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/clarinet-multi-mono.aif\"") (list (quote :abstraction) "#P\"sox-pan continuous.omp\"")) |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "sox-pan" (quote ((let ((box (om-load-boxcomment "comment 3" (om-make-point 139 60) (quote "planned future features:$$- spread$- panning function") "" (om-make-point 210 395) nil (om-make-color 1.1086464E-4 0.0017602444 0.9982184) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 148 39) (quote "check out this example $for continuous panning") "" (om-make-point 414 359) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 11.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote patch-box) "sox-pan continuous" (quote ("elements" "OM-SoX-tutorial-patches" "support" "input-combiners" "sox-pan continuous")) (quote nil) (om-make-point 416 391) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 2" (quote t) (quote nil) (om-make-point 256 225) (om-make-point 27 30) 4 "4" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 207 207) (om-make-point 38 30) 2.5 "2.5" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 170 187) (om-make-point 32 30) -3 "-3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 74 174) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (palette-mode scale show-stems obj-mode score-mode winpos winsize mode grillestep notechancolor? zoom player inport outport deltapict cmnpref staff fontsize approx :show-spectrum onset measure)) (list 0 nil (quote t) 1 0 (om-make-point 400 38) (om-make-point 540 306) 0 1000 nil 1 (quote :soxplayer) 0 nil (om-make-point 0 0) (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) (quote g) 24 2 (quote t) nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-PAN" (quote sox-pan) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Gain value for audio input before processing (dBFS). [float, list]" "gains" nil) (om-load-inputfun (quote input-funbox) "Panning value (decimal number) for panning audio between adjacent channels. [float, list]" "panning" nil) (om-load-inputfun (quote input-funbox) "Number of available output channels for panning." "numchannels" nil))) (om-make-point 94 256) (om-make-point 70 50) (if (find-class (quote sox-pan) nil) (make-instance (quote sox-pan) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") :gains (list -3) :panning 2.5 :numchannels 4 :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 104 200) (om-make-point 10 40))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 121 412) (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 (measure onset palette-mode scale show-stems obj-mode score-mode winpos winsize mode grillestep notechancolor? zoom player inport outport deltapict cmnpref staff fontsize approx)) (list nil nil 0 nil (quote t) 1 0 (om-make-point 400 38) (om-make-point 559 303) 0 1000 nil 1 (quote :soxplayer) 0 nil (om-make-point 0 0) (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) (quote g) 24 2)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 305 26) (quote "-> Double-click on sox-pan class to open the editor.") "" (om-make-point 174 267) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 11.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 446 60) (quote "Pan audio between adjacent output audio channels specified $as a floating point number. Gain (db) value before panning and $number of channels in the multichannel audio output can be specified. ") "" (om-make-point 61 67) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0D0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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-make-point 106 320) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 79 34) (quote "SoX-PAN") "" (om-make-point 135 18) nil (om-make-color 0.0 0.0 0.0) (om-make-font "Verdana" 14.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((6 0 7 1 nil 0) (5 0 7 2 nil 0) (4 0 7 3 nil 0) (3 0 7 4 nil 0) (11 0 8 0 nil 0) (7 0 11 0 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 60 8)) (setf (pict-size newpict) (om-make-point 63 48)) newpict)) 7.05)) |
| | | ; (list (list (quote :picture) "#P\"../../../../resources/pict/omsox\"") (list (quote :sound) "#P\"../../../../../../../../../../../../../Shared/_Development/OM-SoX/Alexander Ng/OM-SoX hoaencode/resources/sounds/clarinet-multi-mono.aif\"") (list (quote :abstraction) "#P\"../distance-cue rendering.omp\"" "#P\"sox-pan continuous.omp\"")) |
| | | (in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "sox-pan" (quote ((let ((box (om-load-boxcomment "comment 4" (om-make-point 188 72) (quote "SoX-PAN $does not render distance natively.$ $Check out this example $for distance cue rendering") "" (om-make-point 423 200) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 10.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote patch-box) "distance-cue rendering" (quote ("elements" "OM-SoX-tutorial-patches" "support" "distance-cue rendering")) (quote nil) (om-make-point 428 267) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 3" (om-make-point 139 60) (quote "planned future features:$$- spread$- panning function") "" (om-make-point 210 395) nil (om-make-color 1.1086464E-4 0.0017602444 0.9982184) (om-make-font "Verdana" 10.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 148 39) (quote "check out this example $for continuous panning") "" (om-make-point 430 363) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 11.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote patch-box) "sox-pan continuous" (quote ("elements" "OM-SoX-tutorial-patches" "support" "input-combiners" "sox-pan continuous")) (quote nil) (om-make-point 432 395) nil nil nil nil 0))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 2" (quote t) (quote nil) (om-make-point 256 225) (om-make-point 27 30) 4 "4" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 207 207) (om-make-point 38 30) 2.5 "2.5" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote bastype) "aux 3" (quote t) (quote nil) (om-make-point 170 187) (om-make-point 32 30) -3 "-3" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "clarinet-multi-mono.aif" (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 74 174) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") 0 1.0 0))) (when thesound (setf (markers thesound) (quote nil))) thesound))) (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 "clarinet-multi-mono.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (measure onset :show-spectrum approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode show-stems scale palette-mode)) (list nil nil (quote t) 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 540 306) (om-make-point 400 38) 0 1 (quote t) nil 0)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "SOX-PAN" (quote sox-pan) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "Audio input for sox input modules. [sound object, pathname, string/pipe]" "sound" nil) (om-load-inputfun (quote input-funbox) "Gain value for audio input before processing (dBFS). [float, list]" "gains" nil) (om-load-inputfun (quote input-funbox) "Panning value (decimal number) for panning audio between adjacent channels. [float, list]" "panning" nil) (om-load-inputfun (quote input-funbox) "Number of available output channels for panning." "numchannels" nil))) (om-make-point 94 256) (om-make-point 70 50) (if (find-class (quote sox-pan) nil) (make-instance (quote sox-pan) :sound (om-make-pathname :directory (quote (:absolute "Users" "Shared" "_Development" "OM-SoX" "Alexander Ng" "OM-SoX hoaencode" "resources" "sounds")) :device nil :host nil :name "clarinet-multi-mono" :type "aif") :gains (list -3) :panning 2.5 :numchannels 4 :from-file t)) nil nil (pairlis (quote (winpos winsize)) (list (om-make-point 10 40) (om-make-point 104 200))) nil nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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 121 412) (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 onset measure)) (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 559 303) (om-make-point 400 38) 0 1 (quote t) nil 0 nil nil)) t nil nil nil (quote nil)))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 209 26) (quote "-> Double-click to open the editor.") "" (om-make-point 167 270) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 11.0D0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 446 60) (quote "Pan audio between adjacent output audio channels specified $as a floating point number. Gain (db) value before panning and $number of channels in the multichannel audio output can be specified. ") "" (om-make-point 61 67) nil (om-make-color 0.0 0.0 1.0) (om-make-font "Verdana" 12.0D0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (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-make-point 106 320) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 79 34) (quote "SoX-PAN") "" (om-make-point 135 18) nil (om-make-color 0.0 0.0 0.0) (om-make-font "Verdana" 14.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((8 0 9 1 nil 0) (7 0 9 2 nil 0) (6 0 9 3 nil 0) (5 0 9 4 nil 0) (13 0 10 0 nil 0) (9 0 13 0 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 60 8)) (setf (pict-size newpict) (om-make-point 63 48)) newpict)) 7.05)) |
| | |
| | | |
| | | ; ### Ambisonics ### |
| | | |
| | | (defun sox-hoaencode-sn3d-factor (order degree) ; andere Nomenklatur, "degree" wäre besser "order" um Verwechslung mit Winkeln zu vermeiden |
| | | (defun sox-hoaencode-sn3d-factor (order degree) |
| | | "This is a placeholder for documentation" |
| | | (ecase order |
| | | (0 1) |
| | | (1 1) |
| | |
| | | ) |
| | | |
| | | (defun sox-hoaencode-azimuth-factor (degree theta_deg) |
| | | "This is a placeholder for documentation" |
| | | (let* |
| | | ( |
| | | (theta (sox-hoaencode-deg-to-rad theta_deg)) |
| | |
| | | ) |
| | | |
| | | (defun sox-hoaencode-elevation-factor (order degree phi_deg) |
| | | "This is a placeholder for documentation" |
| | | (let* |
| | | ( |
| | | (phi (sox-hoaencode-deg-to-rad phi_deg)) |
| | |
| | | |
| | | ; #### Utility functions #### |
| | | |
| | | #| |
| | | (defun sox-hoaencode-auto-convert-positions (positions) |
| | | "Ensures that positions are given as '((azimuth elevation) ...) (in degrees), i.e. |
| | | 1) if list of list of three values, input is assumed to be '(x y z) coordinates and will be transformed to '(azimuth elevation) coordinates (in the navigational spherical coordinate system). |
| | |
| | | (t (error "Positions must consist of lists of length 2 (ae) or 3 (xyz).")) |
| | | )) |
| | | (t (error "Positions must be of type 3dc or list.")))) |
| | | |
| | | |# |
| | | |
| | | |
| | | ; ####### High-level API ########## |
| | |
| | | |
| | | (defclass! sox-hoaencode (sox-input) |
| | | ( |
| | | (positions :accessor positions :initarg :positions :initform '(0 0) :documentation *sox-hoaencode-positions-doc*) |
| | | (order :accessor order :initarg :order :initform 3 :documentation *sox-hoaencode-order-doc*) |
| | | (gain :accessor gain :initarg :gain :initform 0 :documentation "gain value in dB (decibel)") |
| | | (azimuth :accessor azimuth :initarg :azimuth :initform 0 :documentation "azimuth angle in degrees") |
| | | (elevation :accessor elevation :initarg :elevation :initform 0 :documentation "elevation angle in degrees") |
| | | (order :accessor order :initarg :order :initform 3 :documentation *sox-hoaencode-order-doc*) |
| | | ) |
| | | (:icon 100) |
| | | (:documentation "Sox-hoaencode encodes <sound> into a <order>-th ambisonic (HOA) signal at <positions>. |
| | |
| | | ; (consider how to deal with multiple sounds to be hoaencoded and mixed later on... sox-mix might be better done in an explicit way rather than via the class directly. |
| | | ; in that case a 3DC would have to be used by using points (point-pairs) in a loop |
| | | |
| | | (if (probe-file *sox-path*) |
| | | (progn |
| | | (unless (listp (sound sox-input)) (setf (positions sox-input) (list (positions sox-input)))) ; quick hack to prevent having to provide position arg as list of lists |
| | | (when |
| | | (not |
| | | (or |
| | | (subtypep (type-of (positions sox-input)) '3dc) |
| | | (and (subtypep (type-of (positions sox-input)) 'list) |
| | | (> (length (positions sox-input)) 0) |
| | | (subtypep (type-of (first (positions sox-input))) 'list) |
| | | (> (length (first (positions sox-input))) 1)) |
| | | ) |
| | | ) |
| | | (om-message-abort "positions must be of type 3dc, or a list of lists.") |
| | | ) |
| | | (let* ((sound (list! (sound sox-input))) |
| | | (positions-ae (sox-hoaencode-auto-convert-positions (positions sox-input)))) |
| | | (if (probe-file *sox-path*) |
| | | (let ((sound (sound sox-input))) |
| | | |
| | | (when (and (find-if 'stringp sound) (equal output "pipe")) |
| | | (when (and (stringp sound) (equal output "pipe")) |
| | | (om-message-abort "Pipe output not possible with this type of input.")) |
| | | |
| | | (let* ((filenames (loop for soundfile in sound collect (namestring soundfile))) |
| | | (outfile (create-path nil output filetype))) |
| | | (let ((filename (namestring sound)) |
| | | (outfile (create-path nil output filetype))) |
| | | |
| | | (setf str (format nil " ~s ~a" (namestring *sox-path*) *sox-options*)) |
| | | (if (= (length filenames) 1) |
| | | ; case: one file |
| | | (let* ((filename (first filenames)) |
| | | (position (first positions-ae))) |
| | | (if (= (order sox-input) 0) |
| | | |
| | | (if (= (order sox-input) 0) |
| | | ; case: order = 0 |
| | | (setf str (string+ str (format nil " ~s" filename))) |
| | | (setf str (string+ str (format nil " ~s" filename))) |
| | | ; case: order > 0 |
| | | (progn |
| | | (setf str (string+ str " -M")) |
| | | (loop for gain in (sox-hoaencode-gains-up-to-order (order sox-input) (first position) (second position)) |
| | | do (setf str (string+ str (format nil " -v~d ~s" gain filename)))) |
| | | ) |
| | | ) |
| | | ) |
| | | ; case: multiple files |
| | | (if (= (order sox-input) 0) |
| | | ; case: order = 0 |
| | | (progn |
| | | (setf str (string+ str " -m")) ; this is the mixer. e.g. sox-mix |
| | | (loop for filename in filenames |
| | | do (setf str (string+ str (format nil " ~s" filename)))) |
| | | ) |
| | | ; case: order > 0 |
| | | (progn |
| | | (setf str (string+ str " -m")) |
| | | |
| | | ; Create components |
| | | (setf component_idx 0) |
| | | (loop |
| | | for filename in filenames |
| | | for position in positions-ae |
| | | do |
| | | (progn ; it is impossible to create a sox-merge instance as gain values are in dB which cannot represent negative amplitudes |
| | | |
| | | ; in Object-Oriented Programming we would call-next-method i.e. set a sox-merge input class with the corresponding params. |
| | | ; e.g. (make-instance 'sox-merge ... (more redundancy and compactness, less error-prone) ... possible? |
| | | ; for multiple sound inputs if possible we would then call a sox-mix to mix the sox merge pipes. everything |
| | | |
| | | (progn |
| | | (setf str_component (format nil " ~s ~a -M" (namestring *sox-path*) *sox-options*)) |
| | | (loop for gain in (sox-hoaencode-gains-up-to-order (order sox-input) (first position) (second position)) |
| | | do (setf str_component (string+ str_component (format nil " -v~d ~s" gain filename)))) |
| | | |
| | | (setf outfile_tmp (format nil "~a~a-~d.~a" (directory-namestring outfile) (pathname-name outfile) component_idx (pathname-type outfile))) |
| | | (setf str_component (sox-samplebits str_component bitdepth samplerate outfile_tmp)) |
| | | (sox-out str_component filename "new file" outfile_tmp nil) |
| | | |
| | | (setf component_idx (1+ component_idx)) |
| | | |
| | | ; Add component path to <str> |
| | | (setf str (string+ str (format nil " ~s" outfile_tmp))) |
| | | ) |
| | | ) |
| | | (setf str (string+ str " -M")) |
| | | (loop for gain in (print (sox-hoaencode-gains-up-to-order (order sox-input) (azimuth sox-input) (elevation sox-input))) |
| | | do (setf str (string+ str (format nil " -v~d ~s" gain filename)))) |
| | | ) |
| | | ) |
| | | ) |
| | | |
| | | (setf str |
| | | (cond |
| | | ((equal output "realtime") |
| | | (sox-samplebits (string+ str " -q ") bitdepth samplerate *sox-audio-device*)) |
| | | ((equal output "pipe") |
| | | (sox-samplebits str bitdepth samplerate "-p")) |
| | | (t |
| | | (sox-samplebits str bitdepth samplerate outfile)) |
| | | (t (sox-samplebits str bitdepth samplerate outfile)) |
| | | ) |
| | | ) |
| | | |
| | | (setf str (string+ str sox-effect)) |
| | | (print str) |
| | | (sox-out str sox-input output outfile recursive) |
| | | |
| | | |
| | | ;optional removal of temp file |
| | | ; (add-tmp-file outfile_tmp) |
| | | ; (when *delete-inter-file* (clean-tmp-files)) |
| | | |
| | | ) |
| | | ) |
| | | ) |
| | | (sox-not-found) |
| | | ) |
| | | ) |
| | | |
| | | |
| | | ; === sox-mix ============= |
| | | |
| | | (defmethod! sox-process ((sox-input sox-mix) (sox-effect string) &key output filetype samplerate bitdepth recursive batch-mode) |