Work-in-progress repo for ambisonics extensions for OM-SoX
Marlon Schumacher
24.02.25 197ce0f724aa567c7401f63dc889e7861ed8c0aa
commit | author | age
92c40d 1 ;*********************************************************************
AN 2 ; OM-SoX, (c) 2011-2014 Marlon Schumacher (CIRMMT/McGill University) *
3 ;             http://sourceforge.net/projects/omsox/                 *
4 ;                                                                    *
5 ;  Multichannel Audio Manipulation and Functional Batch Processing.  *
6 ;        DSP based on SoX - (c) C.Bagwell and Contributors           *
7 ;                  http://sox.sourceforge.net/                       *
8 ;*********************************************************************
9 ;
10 ;This program is free software; you can redistribute it and/or
11 ;modify it under the terms of the GNU General Public License
12 ;as published by the Free Software Foundation; either version 2
13 ;of the License, or (at your option) any later version.
14 ;
15 ;See file LICENSE for further informations on licensing terms.
16 ;
17 ;This program is distributed in the hope that it will be useful,
18 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;GNU General Public License for more details.
21 ;
22 ;You should have received a copy of the GNU General Public License
23 ;along with this program; if not, write to the Free Software
24 ;Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,10 USA.
25 ;
26 ;Authors: M. Schumacher
27
28 (in-package :om)
29
30 ;;; SoX-Multiply might be grouped together with SoX-Add, SoX-Subtract into a subset of mathematical input combiner functions (Add and Subtract is doable. Division with SoX is more tricky)
31
32 ; ==== SOX-MULTIPLY ========================
33
34 (defclass! sox-multiply (sox-input)
35            (
36             (gains :accessor gains :initarg :gains :initform nil :documentation *sox-gain-doc*)
37             )
38            (:icon 09) 
39            (:documentation "Sox-Multiply will multiply audio from multiple inputs together.
40
41 The number of channels in input audio may differ.")
42            )
43
44 (defmethod initialize-instance :after ((self sox-multiply) &rest l)
45    (declare (ignore l))
46    (when (sound self)
47      (sox-init-gains self)
48      (sox-init-sound self 'list)
49      )
50    )