| | |
| | | |
| | | (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 |
| | | ;(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)) |
| | | ) |
| | | ; (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)))) |
| | | (positions-ae (list (azimuth sox-input) (elevation sox-input)))) |
| | | |
| | | (when (and (find-if 'stringp sound) (equal output "pipe")) |
| | | (om-message-abort "Pipe output not possible with this type of input.")) |
| | |
| | | (if (= (length filenames) 1) |
| | | ; case: one file |
| | | (let* ((filename (first filenames)) |
| | | (position (first positions-ae))) |
| | | (position positions-ae)) |
| | | (if (= (order sox-input) 0) |
| | | ; case: order = 0 |
| | | (setf str (string+ str (format nil " ~s" filename))) |
| | | ; case: order > 0 |
| | | (progn |
| | | (progn ; here it would be more redundant to call sox-merge with the given params |
| | | (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 |
| | | (cond |