Clamps Dictionary
make-wd-recorder
Function
(make-wd-recorder wf-display &key (name "rec") (dir "/tmp"))
Return a recorder closure for wf-display. To start the recording, call the closure with :start as first argument, to stop the recording, call the returned closure with :stop as first argument.
Arguments
wf-display |
a waveform-display struct for a display of the recorded soundfile in a browser waveform element. |
:name |
The base name of the recording. For each new start of the recorder, an increasing integer and .wav get appended to the name. |
:dir |
The directory to store the recording. |
Example
(defparameter *wf-display* (make-waveform-display)) ;;; add some code here to display the waveform in the browser, e.g. (progn (defun clamps-waveform-gui (body) "handler for a waveform display gui window." (setf (clog:title (clog:html-document body)) "Gui Test") (set-page-dimensions body 192 16) (let ((collection (create-collection body "1/2"))) (create-o-waveform collection (refs-to-attr-bindings (x-zoom y-zoom start color background recording) *wf-display* :conc-name wd-) :width "100%" :height "20em" ;; :color "#3f8" ;; :background "#666" :buffer-peaks-ref (wd-buffer-peaks *wf-display*)))) (clog:set-on-new-window #'clamps-waveform-gui :path "/")) ;;; open a browser at http://localhost:54619 (defparameter *my-recorder* (make-wd-recorder)) (funcall *my-recorder* :start) (funcall *my-recorder* :stop)