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 2016/11/10 23:55:43
; (6.100008 :patc (om-make-point 23 391) (om-make-point 50 50) (om-make-point 706 770) "" 183 0 nil "2016/11/10 23:55:43")
; End File Header
; External resources 
; (list (list (quote :picture) "#P\"../resources/pict/omsox\"") (list (quote :sound) "#P\"../in-files/IR_theater.wav\"" "#P\"../../../../../../../../in-files/IR_theater_omsox.wav\"" "#P\"../in-files/drumloop.aif\""))
(in-package :om)(load-lib-for (quote ("OM-SoX")))(setf *om-current-persistent* (om-load-patch1 "2-convolution-reverb" (quote ((let ((box (om-load-boxcomment "comment 7" (om-make-point 233 26) (quote "IRs can be processed as any other soundfile") "" (om-make-point 415 370) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.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 37 26) (quote "gain") "" (om-make-point 309 166) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.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 452 34) (quote "NB: the convolution kernel is currently limited to 65535 samples length") "" (om-make-point 144 63) 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) (let ((box (om-load-editor-box1 "IR_theater.wav 2" (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 416 394) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:relative "in-files")) :device :unspecific :host :unspecific :name "IR_theater" :type "wav") 0 100 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 "IR_theater.wav") (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)) (list 0 nil (quote t) 1 0 (om-make-point 459 44) (om-make-point 553 301) 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))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-FLANGER" (quote sox-flanger) (quote ((om-load-inputfun (quote input-funbox) "Base delay (ms)" "DELAY" 0) (om-load-inputfun (quote input-funbox) "Added swept delay (ms)" "DEPTH" 2) (om-load-inputfun (quote input-funbox) "Signal feedback (%)" "FEEDBACK" 0) (om-load-inputfun (quote input-funbox) "Amount of delayed signal mixed with oiginal (%)" "MIX" 71) (om-load-inputfun (quote input-funbox) "Frequency of sweep (Hz)" "MODULATION-FREQUENCY" 0.5) (om-load-inputfunmenu1 (quote input-funmenu) "waveform of sweep (sine/triangle)" "SHAPE" "sine" (list (list "sine" "sine") (list "triangle" "triangle"))) (om-load-inputfun (quote input-funbox) "Swept wave phase-shift for multi-channel audio (%) [0 = 100 = same phase on each channel]" "PHASE" 25) (om-load-inputfunmenu1 (quote input-funmenu) "interpolation mode for digital delay-line (linear/quadratic)" "INTERPOLATION" "quadratic" (list (list "linear" "linear") (list "quadratic" "quadratic"))))) (om-make-point 534 480) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "IR_theater_omsox.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 429 652) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:relative "in-files")) :device nil :host nil :name "IR_theater_omsox" :type "wav") 0 100 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 "IR_theater_omsox.wav") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (outport inport player zoom grillestep mode winsize winpos show-spectrum deltapict obj-mode cmnpref notechancolor? show-stems scale)) (list nil nil (quote :libaudiostream) 1 nil 0 (om-make-point 370 280) (om-make-point 400 20) 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)) t nil nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS 3" (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) "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-make-point 418 569) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-REVERSE" (quote sox-reverse) (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 447 476) nil nil nil nil 1))) (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 202 475) (om-make-point 46 30) (list -6 0) "(-6 0)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "IR_theater.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 200 160) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:relative "in-files")) :device :unspecific :host :unspecific :name "IR_theater" :type "wav") 0 100 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 "IR_theater.wav") (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)) (list 0 nil (quote t) 1 0 (om-make-point 459 44) (om-make-point 553 301) 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))) (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 304 194) (om-make-point 36 30) -12 "-12" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-editor-box1 "drumloop.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 154 269) (om-make-point 80 50) (let ((newobj (let ((thesound (load-sound (om-make-pathname :directory (quote (:relative "in-files")) :device :unspecific :host :unspecific :name "drumloop" :type "aif") 0 100 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 "drumloop.aif") (set-tonalite newobj nil) newobj) "x" nil (pairlis (quote (scale show-stems obj-mode score-mode winpos winsize mode grillestep notechancolor? zoom player inport outport deltapict cmnpref staff fontsize approx)) (list nil (quote t) 1 0 (om-make-point 400 22) (om-make-point 558 288) 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))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-CONVOLVE" (quote sox-convolve) (quote ((om-load-inputfun (quote input-funbox) "Impulse Response" "IR" nil) (om-load-inputkeyword (quote input-keyword) "Gain" "gain" (quote :gain) nil nil) (om-load-inputkeyword (quote input-keyword) "Padding before and after convolution" "amp-env" (quote :amp-env) nil nil) (om-load-inputkeyword (quote input-keyword) "Append sox-effects/statistics to the processing chain." "padding" (quote :padding) nil nil))) (om-make-point 263 255) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment" (om-make-point 377 34) (quote "Use \"sox-convolve\" for applying convolution with room IRs") "" (om-make-point 126 22) 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) (let ((box (om-load-editor-box1 "BPF" (quote bpf) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "X coordinates (list)" "x-points" (list 0 0.74 1.0)) (om-load-inputfun (quote input-funbox) "Y coordinates (list)" "y-points" (list 0.0 1.0 0.1 0.0)) (om-load-inputfun (quote input-funbox) "precision (integer) [0 - 10]" "decimals" 10))) (om-make-point 369 175) (om-make-point 40 60) (let ((newobj (when (find-class (quote bpf) nil) (let ((newbpf (simple-bpf-from-list (quote (0.0 0.74 1.0 1.2600001)) (quote (0.0 1.0 0.1 0.0)) (quote bpf) 10))) (setf (bpfcolor newbpf) (om-make-color 0 0 0)) (set-name newbpf nil) newbpf)))) (when newobj) newobj) nil nil (pairlis (quote (winsize winpos picture)) (list (om-make-point 1096 604) (om-make-point 37 79) nil)) t nil nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 2" (om-make-point 139 26) (quote "predelay and padding") "" (om-make-point 521 225) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.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 460 225) (om-make-point 59 30) (list 0.5 2) "(0.5 2)" nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 6" (om-make-point 67 26) (quote "Dry sound") "" (om-make-point 162 245) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.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 5" (om-make-point 67 26) (quote "Wet sound") "" (om-make-point 289 418) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.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 4" (om-make-point 115 26) (quote "Impulse Response") "" (om-make-point 187 136) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.0 :family "Verdana" :style (quote (:italic)) :mode (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" 1) (om-load-inputfun (quote input-funbox) "a list of markers (s)" "markers" nil))) (om-make-point 194 659) (om-make-point 111 67) (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 (palette-mode scale show-stems obj-mode score-mode winpos winsize mode grillestep notechancolor? zoom player inport outport deltapict cmnpref staff fontsize approx)) (list 0 nil (quote t) 1 0 (om-make-point 400 23) (om-make-point 576 333) 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 gf) 24 2)) t nil nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcomment "comment 3" (om-make-point 138 36) (quote "Use sox-mix for $setting dry/wet balance") "" (om-make-point 216 516) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.0 :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-MIX" (quote sox-mix) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "" "soundfiles" nil) (om-load-inputfun (quote input-funbox) "" "gains" nil))) (om-make-point 138 511) (om-make-point 70 50) (if (find-class (quote sox-mix) nil) (make-instance (quote sox-mix) :sound (list (om-make-pathname :directory (quote (:absolute "Users" "Marlon_MBPro3" "hfm-dropbox" "Dropbox" "_SpatSeminar2" "Spat2_wkspc" "in-files")) :device :unspecific :host nil :name "drumloop" :type "aif") "|'/Users/Marlon_MBPro3/Research/OM-SoX/sources/OM-SoX/executables/macos/sox'  -q --multi-threaded --buffer 4096 --input-buffer 512 -V0  '/Users/Marlon_MBPro3/hfm-dropbox/Dropbox/_SpatSeminar2/Spat2_wkspc/in-files/drumloop.aif' -p  gain -12  pad 0.45989797 0.9198186  fir '/Users/Marlon_MBPro3/hfm-dropbox/Dropbox/_SpatSeminar2/Spat2_wkspc/out-files/sox-tempcoeffs3.txt' gain 0.0") :gains (list -6 0) :from-file t)) nil nil (pairlis (quote (winsize winpos)) (list (om-make-point 206 150) (om-make-point 56 69))) nil nil nil nil))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote lispfun) "LIST 2" (quote list) (quote ((om-load-inputfun (quote input-funbox) "add-input" "add-input" nil) (om-load-inputfun (quote input-funbox) "add-input" "add-input" nil))) (om-make-point 163 466) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS 3" (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) "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 251 353) nil nil nil nil 1))) (when (fboundp (quote set-active)) (set-active box nil)) box) (let ((box (om-load-boxcall (quote genfun) "SOX-PROCESS 2" (quote sox-process) (quote ((om-load-inputfun (quote input-funbox) "" "INPUT" nil) (om-load-inputfun (quote input-funbox) "" "COMMANDS" ""))) (om-make-point 191 574) 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 111 26) (quote "amplitude envelope") "" (om-make-point 410 187) nil (om-make-color 0.0 0.19194556 1.0) (om-make-font "Verdana" 11.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))))) (when (fboundp (quote set-active)) (set-active box nil)) box))) (quote ((6 0 5 0 nil 0) (3 0 6 0 nil 0) (7 0 6 1 nil 0) (4 0 7 0 nil 0) (9 0 12 0 nil 0) (10 0 12 1 nil 0) (14 0 12 2 nil 0) (16 0 12 3 nil 0) (25 0 20 0 nil 0) (23 0 22 1 nil 0) (8 0 22 2 nil 0) (11 0 23 0 nil 0) (24 0 23 1 nil 0) (11 0 24 0 nil 0) (12 0 24 1 nil 0) (22 0 25 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 11)) (setf (pict-size newpict) (om-make-point 63 55)) newpict)) 6.100008))