csound play
Charlie Baker
baker@jitterbug.ccmrc.ucsb.edu
Mon, 9 May 94 14:02:26 PDT
OK- for csound syntax after write play:
then the fix would be (& it checks out on my Next...)
In stella/csound.lisp:
The defclass becomes:
(defclass csound-score-file (event-file header-mixin)
((orchestra :initarg orchestra :initform nil)
(output :initarg output :initform nil)
(syntax :initform (find-syntax ':csound))))
and the play-using-syntax method is now:
(defmethod play-using-syntax ((syntax csound) file &rest args)
(declare (ignore args))
#+mcl (format t "Sorry, can't play csound from Lisp on the Mac.~%")
#-mcl (let* ((ofile (slot-value (find-stream file) 'output))
(orc (slot-value (find-stream file) 'orchestra))
(command (format nil "~Aunix/playcsound -o ~A ~A ~A"
*common-music-directory* ofile orc
(namestring (truename file))))
(plcmd (format nil "~Aunix/playsnd ~A"
*common-music-directory* ofile)))
(cm::shell command)
(tell-user "Playing ~A ." ofile)
(cm::shell plcmd)))
AND the TWO shell scripts (one to compile sound, other to play it...):
1) (Place in unix directory as playcsound and chmod a+x playcsound. Edit for your site!)
#!/bin/csh -f
if (-e /usr/local/bin/csound) then
/usr/local/bin/csound $*
else if (-e /LocalApps/CSnd/csound) then
/LocalApps/CSnd/csound $*
else echo "Can't find csound! Fix unix/playcsound in Common Music's directory."
endif
2) (Place in unix directory as playsnd and chmod a+x playsnd. Edit for your site!)
#!/bin/csh -f
if (-e /musr/bin/newplay) then
/musr/bin/newplay $1
else if (-e /usr/bin/sndplay) then
/usr/bin/sndplay $1
else echo "Can't find sound player! Fix unix/playsnd in Common Music's directory."
endif
Thank you for the help! (I didn't know about find-stream!)
Charlie
---
*_________________________________________________________*
Charlie Baker
Center for Computer Music Research and Composition
University of California at Santa Barbara
baker@waltz.ccmrc.ucsb.edu
*_________________________________________________________*
>From hkt@zkm.de Tue May 10 03:17:55 1994