On windows, this should work: http://www.jsoftware.com/pipermail/programming/2014-June/037891.html On Dec 7, 2014 7:50 PM, "Raul Miller" <[email protected]> wrote:
> You're on windows, so there's no way that you can get /dev/audio > working, that I know of. > > I think your best option is to use j 6.02 and the media/wav addon. > This addon has not yet been ported to j 8.03. I'm not sure why. I > copied the text of media/wav from a j 6.02 session to a j 8.03 windows > 64 script, and it worked just fine, in the experiments I tried. > > Anyways, once you have that loaded, you could try something like: > > 4 wavplay wavmake <.128+ 128*1 o. 0.4 * i.100 > > Though that's a bit short, so maybe instead > > 4 wavplay wavmake <.128+ 128*1 o. 0.4 * i.2000 > > Note also that the one-liners referred to in the original article > seemed to be using a character representation for amplitude, along > with a fixed sample rate. That's what I imagine the putchar and "pipe > to /dev/audio" meant, though I've not actually tried running their > code. > > The equivalent, here, would probably require something like: > putchar=: 4 wavplay wavemake > > ... and a self imposed limit of numbers which are valid a. indices. > > Thanks, > > -- > Raul > > On Sun, Dec 7, 2014 at 7:02 PM, Skip Cave <[email protected]> wrote: > > If I generate a sine wave in J, > > x =. 1 o. 0.4 * i.100 > > How do I cause it to be played out the speaker? > > I searched the J Software site for sound, audio, music, etc., no luck. > > > > Skip > > > > > > Skip Cave > > > > > > On Sun, Dec 7, 2014 at 1:50 PM, Raul Miller <[email protected]> > wrote: > > > >> Can we do better than this? > >> > >> > >> > http://countercomplex.blogspot.com.au/2011/10/algorithmic-symphonies-from-one-line-of.html > >> > >> (Here, writing to /dev/audio on a unix system - warning: some of them > >> are discordant.) > >> > >> -- > >> Raul > >> ---------------------------------------------------------------------- > >> For information about J forums see http://www.jsoftware.com/forums.htm > >> > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
