;*********************************************************************
|
; OM-SoX, (c) 2011-2013 Marlon Schumacher (CIRMMT/McGill University) *
|
; http://sourceforge.net/projects/omsox/ *
|
; *
|
; Multichannel Audio Manipulation and Functional Batch Processing. *
|
; DSP based on SoX - (c) C.Bagwell and Contributors *
|
; http://sox.sourceforge.net/ *
|
;*********************************************************************
|
;
|
;This program is free software; you can redistribute it and/or
|
;modify it under the terms of the GNU General Public License
|
;as published by the Free Software Foundation; either version 2
|
;of the License, or (at your option) any later version.
|
;
|
;See file LICENSE for further informations on licensing terms.
|
;
|
;This program is distributed in the hope that it will be useful,
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;GNU General Public License for more details.
|
;
|
;You should have received a copy of the GNU General Public License
|
;along with this program; if not, write to the Free Software
|
;Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,10 USA.
|
;
|
;Authors: M. Schumacher
|
|
(in-package :om)
|
|
;;; SOX-RECORD ========================
|
|
(defclass! sox-record ()
|
(
|
(duration :accessor duration :initarg :duration :initform 10 :documentation *sox-dur-doc*)
|
(gains :accessor gains :initarg :gains :initform nil :documentation *sox-gain-doc*)
|
(channels :accessor channels :initarg :channels :initform nil :documentation "List of input channels to record."))
|
(:icon 06)
|
(:documentation "Record from the audio device into a file or stream as a pipe.
|
|
<gains> (list) specifies the gain for each input channel.
|
<channels> specifies the input channels to record (audio output will contain channels in the order given).")
|
;Default is a one-to-one mapping of channels (i.e. input-channel 1 will be channel 1 in the recorded file, etc.) without changing levels.
|
)
|
|
|
(defmethod get-fonde-pict ((self sox-record)) *sox-bg-pict*)
|
|
|
(defmethod initialize-instance :after ((self sox-record) &rest args)
|
(when (channels self)
|
(let* ((thechannels (channels self))
|
(newgains (if (equal (length (gains self)) (length thechannels))
|
(gains self)
|
(repeat-n 0.0 (length thechannels))))
|
)
|
(setf (gains self) newgains))
|
))
|
|
|