[CM] midishare: output-stop
taube at uiuc.edu
taube at uiuc.edu
Tue Mar 2 17:35:41 PST 2004
>(midi-close) works. but it would be nice to have a keystroke. ist there
>a way to define them in openmcl?
Assuming that (midi-close) works then the following two functions might do what you want. The first function defines a midi-hush function for openmcl that closes and then reopens your midishare connection.
the second bit of code defines a keystroke command (C-x C-;) in emacs that invokes it when you are working in a Lisp mode buffer.
;;;-------------------------------------------
;;; add to your cminit.lisp file
(defun midi-hush (&optional ms)
(let ((s (if (not ms)
(find-object "midi.port" nil)
(if (stringp ms)
(find-object ms nil)
ms))))
(when (typep s 'midishare-stream)
(close-io s ':force)
(open-io s t))
s))
;;;-------------------------------------------
;;; add to your .emacs or .xemacs/init.el file
(defun midi-hush ()
(interactive)
(comint-send-string inferior-lisp-buffer
"(midi-hush)\n"))
(define-key lisp-mode-map [(control ?x) (control 59)]
'midi-hush)
More information about the Cmdist
mailing list