;;; ecasound.el --- Interactive and programmatic interface to Ecasound ;; Copyright (C) 2001, 2002, 2003 Mario Lang ;; Author: Mario Lang ;; Keywords: audio, ecasound, eci, comint, process, pcomplete ;; Version: 0.8.3 ;; This file 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, or (at your option) ;; any later version. ;; This file 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 GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; This file implements several aspects of ecasound use: ;; ;; * A derived-major-mode, from comint mode for an inferior ecasound ;; process (ecasound-aim-mode). Complete with context sensitive ;; completion and interactive features to control the current process ;; using ECI. ;; ;; * Ecasound Control Interface (ECI) library for programmatic control ;; of a Ecasound process. This allows you to write Ecasound batch ;; jobs in Emacs-Lisp with Lisp functions and return values. Have a ;; look at eci-example and ecasound-normalize. ;; ;; * ecasound-ewf-mode, a mode for editing .ewf files. ;; ;; ;; Usage: ;; ;; You need at least ecasound 2.2.0 for this file to work properly. ;; ;; Put ecasound.el in your load-path and require it in your .emacs. ;; Set `ecasound-program' to the path to your ecasound executable. ;; ;; (setq load-path (cons "/home/user/elisp") ;; (require 'ecasound) ;; (setq ecasound-program "/home/user/bin/ecasound" ;; eci-program "/home/user/bin/ecasound") ;; ;; To set ecasound startup options use ;; ;; M-x ecasound-customize-startup RET ;; ;; Then use M-x ecasound RET to invoke an inferior ecasound process. ;; ;; For programmatic use of the ECI API, have a look at `eci-init', ;; `eci-command' and in general the eci-* namespace. ;; ;; Compatibility: ;; ;; This file is only tested with GNU Emacs 21. I've invested some minimal ;; efforts to get it working with XEmacs. However, XEmacs support ;; might be broken in some areas. Since I personally very seldomly ;; use XEmacs, I am happy about suggestions and patches. ;; ;; Todo: ;; ;; * Find a better way to do status info fetching... ;; * Add more conditions to the menu. ;; * Use map-xxx-list data in the ecasound-copp widget. This means we ;; need to merge cop-status and map-cop-list data somehow or have ;; the cop-editor fetch hints from map-cop/ladpsa/preset-list. ;; * Make `ecasound-signalview' faster, and allow to invoke it on already ;; opened sessions. ;; * Fix the case where ecasound sends output *after* the prompt. ;; This is tricky! Fixed for internal parsing, probably will leave ;; like that for interactive use, not worth the trouble... ;; * Copy documentation for ECI commands into eci-* docstrings and menu ;; :help keywords. ;; * Expand the menu. ;;; History: ;; ;; Version: 0.8.3 ;; ;; * ecasound-cli-arg:value-to-internal: Use `widget-get' instead of ;; (car (last elt)) to extract :value from :args which makes code compatible ;; to XEmacs. ;; * ecasound-cli-arg:value-to-external: Use `widget-get' instead of ;; `widget-apply' to fetch :arg-format. Makes XEmacs happy. ;; * Add "-D" to the default `ecasound-arguments'. This fixes a problem ;; with the TERM variable which only appeared in XEmacs and is a reasonable ;; default anyway. ;; * Fix `ecasound-output-filter' when "-D" is used as argument on startup. ;; * Add `comint-strip-ctrl-m' to `comint-output-filter-functions' when ;; we are running XEmacs. ;; * `defeci' cs-set-position. Bound to "M-c M-s s" and in ;; `ecasound-iam-cs-menu'. ;; * Add some more docstrings. ;; * New interactive functions `ecasound-set-mark' and `ecasound-goto-mark' ;; which implement the position marker system discussed on ecasound-list. ;; Bound to C-c C-SPC and C-c C-j respectively. ;; * New user variable `ecasound-daemon-host' which defaults to "localhost". ;; * Record the daemon port in a buffer local variable `ecasound-daemon-port' ;; and therefore allow temporarily binding `ecasound-arguments' to something ;; different via e.g. `let' before invoking `ecasound'. ;; * Fix regexp in `eci-input-filter' to be XEmacs compatible. ;; ;; Version: 0.8.2 ;; ;; * Added quite some missing docstrings. ;; * New variable `ecasound-last-command-alist'. Use that to do fancy stuff ;; to certain commands return values. ;; * New variable `ecasound-type-alist'. Normally you should not need to ;; change this, but it's nice to have it configurable. ;; * New function `eci-is-valid-p'. Rationale is that nil as return ;; value of a ECI command should indicate an error. So this function ;; with a -p suffix to use as a predicate. ;; * New variable `ecasound-parent' holds the parent buffer in a daemon buffer. ;; * New variables ecasound-timer-flag&interval. ;; * Renamed `eci-output-filter' to `ecasound-output-filter'. ;; * New variable ecasound-mode|header-line-format. ;; * `ecasound-cop-edit' now uses cop-set instead of ;; cop-select+copp-select+copp-set to update values. ;; * Fixed multiple-argument handling. They are separated with ',', not ;; with a space. ;; * New variable ecasound-sending-command, used to prevent the background ;; timer from coliding with other ECI requests. ;; ;; Version: 0.8.1 ;; ;; * Make ai|ao|cs-forward|rewind use ai|ao|cs-selected in the prompt ;; string of the interactive spec. ;; * New keymaps ecasound-audioin|audioout-map. ;; Now you can be very quick: ;; M-x ecasound RET M-i a