Miller, Raul D wrote:
> Does anyone know how to play audio from J?

You need SoX <http://sox.sourceforge.net/>, and may have it already on
Linux.  This does conversions between various file formats, and in
particular supports a simple text file format.  Then it is easy to play
your example.

require 'files strings'
host=:[: 2!:0 '('"_ , ] , ' || true)'"_
sound=:1 o.440*2p1*(i.%])44100
time=:(i.%])44100
'sine.dat' fwrites~ '; Sample Rate 44100'
'sine.dat' fappends~ '_-' charsub 0j8": time,.sound
host 'play sine.dat'

John




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to