Re[2]: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Hello Andrew, Sunday, December 6, 2009, 1:09:18 AM, you wrote: Maybe once I get hired by some financial modelling consultants and get paid shedloads of money to write Haskell all day, I'll be able to afford a Mac. But until then... with such attitude you will never be hired by financial sector. try instead: mac? great! windows? i love it! unix? i've used it since 60's -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Bulat Ziganshin wrote: Hello Andrew, Sunday, December 6, 2009, 1:09:18 AM, you wrote: Maybe once I get hired by some financial modelling consultants and get paid shedloads of money to write Haskell all day, I'll be able to afford a Mac. But until then... with such attitude you will never be hired by financial sector. try instead: mac? great! windows? i love it! unix? i've used it since 60's That's OK. I'm reasonably sure I will never get hired by the financial sector /anyway/. :-( ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
M Xyz wrote: if you get it to work As a spoiled Java programmer, this new role as pioneer is a bit intimidating, but I will give it a shot. :) I wish there was a multimedia standard library for beginners like me. Writing audio to the speakers shouldn't be such a journey. Unfortunately, I've yet to find a single Haskell package that binds to C which will actually compile on Windows. :-( (It still makes me chuckle that even the COM bindings - which, by definition, can *only* work on Windows - also don't compile. One wonders how the author managed to test it...) Fortunately, for GUI work we have Gtk2hs, which works just fine on Windows. (Although obviously, Windows boxes don't usually have GTK+ installed.) But most of the really interesting stuff on Hackage is just unusable on Windows, sadly. If you ever do manage to get audio working, I'd be interested to know how. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Hello Andrew Plenty compile on Windows: Some OpenVG, OpenGL[1] (still? - I'm a bit behind the times) only compile with MinGW. Others are fine with Cygwin provided you have the dev packages installed (readline, pcre-light...). Yet others - no chance... If you can get the raw C library to work in either Cygwin or MinGW, you should have a good chance. The only sound software I've had working on Cygwin has been ChucK though I haven't tried many - ChucK uses RtAudio to talk to the soundcard which probably isn't easy to write a binding for as its C++. I had ChucK working two years ago, maybe things have improved in the Cygwin world regarding sound since then and other systems now work. http://www.music.mcgill.ca/~gary/rtaudio/ Best wishes Stephen [1] OpenGL worked fine when it was bundled with GHC, when it got unbundled things seemed to go amiss, plus it seemed to be the thing to use freeglut - hence the complicated instructions here: http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Andrew Coppin wrote: Unfortunately, I've yet to find a single Haskell package that binds to C which will actually compile on Windows. :-( Take a look at logfloat[1], it builds cleanly on Windows XP using GHC 6.10.1 without needing Cygwin nor Mingw/Msys (however GHCi has some DLL errors[2]). Not that that has anything to do with audio ;) [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/logfloat [2] If you know how to resolve these, I'd be much obliged. I don't have a Windows machine to test on but I've been much irked that there's still this outstanding portability bug. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Stephen Tetley wrote: Hello Andrew Plenty compile on Windows: Some OpenVG, OpenGL[1] (still? - I'm a bit behind the times) only compile with MinGW. Others are fine with Cygwin provided you have the dev packages installed (readline, pcre-light...). You're talking about MinGW and Cygwin. So... Unix emulators, basically. I don't think it should be necessary to install a Unix emulator just so that I can write Windows programs. Maybe others disagree. If you can get the raw C library to work in either Cygwin or MinGW, you should have a good chance. I'm by no means an expert here, but isn't it usual for C libraries on Windows to be supplied as a compiled DLL and a header file for using it? I don't quite understand why you need a C compiler. [1] OpenGL worked fine when it was bundled with GHC, when it got unbundled things seemed to go amiss. Apparently there is some talk of removing OpenGL from the Haskell Platform. And if this happens, it'll be one more thing I can't use on Windows. :-( Personally, I'd like to see *more* C bindings in HP, so that I can start doing cool stuff on Windows. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
I'm constantly amused by those who manage to use Windows without installing Cygwin. On 5 Dec 2009, at 23:33, Andrew Coppin wrote: Stephen Tetley wrote: Hello Andrew Plenty compile on Windows: Some OpenVG, OpenGL[1] (still? - I'm a bit behind the times) only compile with MinGW. Others are fine with Cygwin provided you have the dev packages installed (readline, pcre-light...). You're talking about MinGW and Cygwin. So... Unix emulators, basically. I don't think it should be necessary to install a Unix emulator just so that I can write Windows programs. Maybe others disagree. If you can get the raw C library to work in either Cygwin or MinGW, you should have a good chance. I'm by no means an expert here, but isn't it usual for C libraries on Windows to be supplied as a compiled DLL and a header file for using it? I don't quite understand why you need a C compiler. [1] OpenGL worked fine when it was bundled with GHC, when it got unbundled things seemed to go amiss. Apparently there is some talk of removing OpenGL from the Haskell Platform. And if this happens, it'll be one more thing I can't use on Windows. :-( Personally, I'd like to see *more* C bindings in HP, so that I can start doing cool stuff on Windows. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Hi Andrew 2009/12/5 Andrew Coppin andrewcop...@btinternet.com: I don't think it should be necessary to install a Unix emulator just so that I can write Windows programs. Maybe others disagree. ... I'm by no means an expert here, but isn't it usual for C libraries on Windows to be supplied as a compiled DLL and a header file for using it? I don't quite understand why you need a C compiler. The thing is, all the bindings on Hackage (or at least something most likely above 95%) are to Unix C libraries so you need a C compiler and a Unix emulator to use them. I do have have some sympathy with your point though - it is possible to get things to compile once you have Cygwin, but deployment on any other machine Windows thereafter is 'challenging' to say the least. Apparently there is some talk of removing OpenGL from the Haskell Platform. And if this happens, it'll be one more thing I can't use on Windows. :-( I didn't realise until I looked today that OpenGL was in the Haskell Platform. If the proposal to remove it is from Sven Panne then fair enough, otherwise it would be a bit disappointing - it always just worked when it was part of GHCs extralibs... Best wishes Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Miguel Mitrofanov wrote: I'm constantly amused by those who manage to use Windows without installing Cygwin. I'm constantly puzzled by those who think that Cygwin is a mandatory part of Windows. ;-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Am Samstag 05 Dezember 2009 21:43:13 schrieb Miguel Mitrofanov: I'm constantly amused by those who manage to use Windows without installing Cygwin. I'm constantly amazed by those who manage to use Windows. (In case you want to misunderstand, it's not a Windows bashing, I just never managed to work with it) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Daniel Fischer wrote: I'm constantly amazed by those who manage to use Windows. (In case you want to misunderstand, it's not a Windows bashing, I just never managed to work with it I've not had a lot of luck with Linux. I imagine this is merely due to having a lot more experience with Windows. FWIW, I used to hate Windows too - AmigaOS is far nicer. ;-) But now we're drifting wildly off-topic. For better or worse, Windows is the most popular desktop OS currently. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Compiling the C PortAudio library for either Cygwin or MinGW will be challenging at the moment. The current release doesn't compile as is, and although there should be patch for the configure script as an attachment to this message it seems to have gone amiss: http://music.columbia.edu/pipermail/portaudio/2009-May/009116.html I'd look for a different library to talk to the sound card... Best wishes Stephen 2009/12/4 M Xyz functionallyharmoni...@yahoo.com What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Try Mac. /commercial On 6 Dec 2009, at 01:00, Andrew Coppin wrote: Daniel Fischer wrote: I'm constantly amazed by those who manage to use Windows. (In case you want to misunderstand, it's not a Windows bashing, I just never managed to work with it I've not had a lot of luck with Linux. I imagine this is merely due to having a lot more experience with Windows. FWIW, I used to hate Windows too - AmigaOS is far nicer. ;-) But now we're drifting wildly off-topic. For better or worse, Windows is the most popular desktop OS currently. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Miguel Mitrofanov wrote: Try Mac. /commercial You're not the first to suggest this either. ;-) Maybe once I get hired by some financial modelling consultants and get paid shedloads of money to write Haskell all day, I'll be able to afford a Mac. But until then... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Stephen, I had no problem compiling the portaudio binaries on Windows. It came with a msvc project that worked. The problem I'm getting currently is that when I cabal install portaudio etc etc I get a c2hs.exe does not exist error when c2hs.exe clearly exists and is in my system path. Just like this post from months ago: http://www.mail-archive.com/haskell-...@lurk.org/msg00101.html --- On Sat, 12/5/09, Stephen Tetley stephen.tet...@gmail.com wrote: From: Stephen Tetley stephen.tet...@gmail.com Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card? To: haskell-cafe@haskell.org Date: Saturday, December 5, 2009, 5:00 PM Compiling the C PortAudio library for either Cygwin or MinGW will be challenging at the moment. The current release doesn't compile as is, and although there should be patch for the configure script as an attachment to this message it seems to have gone amiss: http://music.columbia.edu/pipermail/portaudio/2009-May/009116.html I'd look for a different library to talk to the sound card... Best wishes Stephen 2009/12/4 M Xyz functionallyharmoni...@yahoo.com What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Am Sonntag 06 Dezember 2009 00:10:05 schrieb M Xyz: Stephen, I had no problem compiling the portaudio binaries on Windows. It came with a msvc project that worked. The problem I'm getting currently is that when I cabal install portaudio etc etc I get a c2hs.exe does not exist error when c2hs.exe clearly exists and is in my system path. Just like this post from months ago: http://www.mail-archive.com/haskell-...@lurk.org/msg00101.html Try cabal install --with-c2hs=C:\path\to\c2hs.exe portaudio maybe that'll work. If not, run cabal --verbose=3 install portaudio, perhaps that gives more information about what went wrong. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
--- On Sat, 12/5/09, Daniel Fischer daniel.is.fisc...@web.de wrote: Try cabal install --with-c2hs=C:\path\to\c2hs.exe portaudio maybe that'll work. If not, run cabal --verbose=3 install portaudio, perhaps that gives more information about what went wrong. Daniel, Thank you for your thoughtful reply. I didn't know about those flags. The log is fairly long, and as I'm new to Haskell and Cabal it is mostly meaningless to me. I see very many incidences of searching for ___ in path. Cannot find ___ on the path so maybe this is all as simple as me not setting my environment correctly. Log: cabal install portaudio --verbose=3 --with-c2hs=C:\Program Files\Haskell\bin\c2hs.exe --extra-include-dirs=C:\A\install\programming\portaudio\portaudio\include --extra-lib-dirs=C:\A\install\programming\portaudio\portaudio\build\msvc\Win32\Release log.txt searching for ghc in path. found ghc at C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc.exe (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc.exe,[--numeric-version]) C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc.exe is version 6.10.4 looking for package tool: ghc-pkg near compiler in C:\Program Files\Haskell Platform\2009.2.0.2\bin found package tool in C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc-pkg.exe,[--version]) C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe is version 6.10.4 (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc.exe,[--supported-languages]) Reading installed packages... (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc-pkg.exe,[dump,--global]) Reading available packages... Resolving dependencies... selecting portaudio-0.0.1 (hackage) and discarding mtl-1.0 selecting mtl-1.1.0.2 (installed or hackage) and discarding mtl-1.1.0.0 and 1.1.0.1 selecting haskell98-1.0.1.0 (installed or hackage) and discarding haskell98-1.0 selecting random-1.0.0.1 (installed or hackage) and discarding random-1.0.0.0 selecting process-1.0.1.1 (installed or hackage) and discarding filepath-1.0 and process-1.0.0.0 selecting directory-1.0.0.3 (installed or hackage) and discarding directory-1.0.0.0 selecting old-time-1.0.0.2 (installed or hackage) and discarding old-time-1.0.0.0 selecting old-locale-1.0.0.1 (installed or hackage) and discarding old-locale-1.0.0.0 selecting filepath-1.1.0.2 (installed or hackage) and discarding filepath-1.1.0.0 and 1.1.0.1 selecting Win32-2.2.0.0 (installed or hackage) and discarding Win32-2.1 and 2.1.0.0 selecting bytestring-0.9.1.4 (installed or hackage) and discarding bytestring-0.9, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.9.1.0, 0.9.1.1, 0.9.1.2, 0.9.1.3 and 0.9.1.5 selecting ghc-prim-0.1.0.0 (installed) selecting rts-1.0 (installed) selecting array-0.2.0.0 (installed or hackage) and discarding array-0.1.0.0 selecting base-3.0.3.1 (installed) and 4.1.0.0 (installed) and discarding syb-0.1.0.0 and 0.1.0.1 selecting integer-0.1.0.1 (installed) selecting syb-0.1.0.1 (installed) In order, the following would be installed: portaudio-0.0.1 (new package) portaudio-0.0.1 has already been downloaded. Extracting C:\Documents and Settings\M\Application Data\cabal\packages\hackage.haskell.org\portaudio\0.0.1\portaudio-0.0.1.tar.gz to C:\DOCUME~1\M\LOCALS~1\Temp\portaudio-0.0.13824... Using internal setup method with build-type Simple and args: [configure,--verbose=3,--ghc,--global,--extra-include-dirs=C:\\A\\install\\programming\\portaudio\\portaudio\\include,--extra-lib-dirs=C:\\A\\install\\programming\\portaudio\\portaudio\\build\\msvc\\Win32\\Release,--constraint=base ==3.0.3.1,--constraint=haskell98 ==1.0.1.0,--constraint=mtl ==1.1.0.2,--with-c2hs=C:\\Program Files\\Haskell\\bin\\c2hs.exe] Configuring portaudio-0.0.1... Creating dist (and its parents) searching for ghc in path. found ghc at C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc.exe (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc.exe,[--numeric-version]) C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc.exe is version 6.10.4 looking for package tool: ghc-pkg near compiler in C:\Program Files\Haskell Platform\2009.2.0.2\bin found package tool in C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc-pkg.exe,[--version]) C:\Program Files\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe is version 6.10.4 (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc.exe,[--supported-languages]) Reading installed packages... (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\bin\\ghc-pkg.exe,[dump,--global]) Dependency base 3 ==3.0.3.1: using base-3.0.3.1 Dependency haskell98 -any ==1.0.1.0: using haskell98-1.0.1.0 Dependency mtl =1.1.0.0 ==1.1.0.2: using mtl-1.1.0.2 searching for alex in path. found alex at C:\Program Files\Haskell Platform\2009.2.0.2\extralibs\bin\alex.exe (C:\\Program Files\\Haskell Platform\\2009.2.0.2\\extralibs\\bin\\alex.exe,[--version]) C:\Program
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Am Sonntag 06 Dezember 2009 00:47:38 schrieb M Xyz: Daniel, Thank you for your thoughtful reply. I didn't know about those flags. The log is fairly long, and as I'm new to Haskell and Cabal it is mostly meaningless to me. I see very many incidences of searching for ___ in path. Cannot find ___ on the path so maybe this is all as simple as me not setting my environment correctly. If you have cpphs, hugs, jhc, greencard etc., it is probably something about your environment. If you don't have them, it's clear that they aren't found. On the other hand, that doesn't explain Using c2hs version 0.16.0 given by user at: C:\Program Files\Haskell\bin\c2hs.exe -- so it finds c2hs, and can apparently run c2hs --version (C:\\Program Files\\Haskell\\bin\\c2hs.exe,[--include=dist\\build,--cppopts=- D__GLASGOW_HASKELL__=610,--cppopts=-IC: \\A\\install\\programming\\portaudio\\portaudio\\include,--output-dir=dist\\build,-- output=Sound\\PortAudio\\Base.hs,.\\Sound\\PortAudio\\Base.chs]) c2hs.exe: does not exist C:\Program Files\Haskell\bin\c2hs.exe returned ExitFailure 1 -- bang To ascertain whether c2hs works at all, can you try to run it manually? (cd to an appropriate directory, cabal unpack portaudio cd portaudio (or whatever, so that Base.chs is found via .\Sound\PortAudio\Base.chs md dist\build c2hs.exe --include=dist\build --cppopts=-D__GLASGOW_HASKELL__=610 --cppopts=-IC: \A\install\programming\portaudio\portaudio\include --output-dir=dist\build -- output=Sound\PortAudio\Base.hs .\Sound\PortAudio\Base.chs ) If that works, the problem is somewhere in cabal, otherwise in c2hs, either way, we'll know more. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz: I just had another idea. da...@linux-mkk1:~ c2hs -o memyself.hs memyself.chs c2hs: does not exist it's not that c2hs isn't found or something, c2hs doesn't find Base.chs! Try installing from the unpacked sources (cd portaudio; cabal install) or the old- fashioned way: cd portaudio-0.0.1 ghc --make Setup ./Setup configure --help (choose your options, prefix, profiling, ...) ./Setup configure $OPTIONS ./Setup build if all's well, ./Setup haddock ./Setup install (dies for me with dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder Verzeichnisnicht gefunden c2hs: Error during preprocessing custom header file cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the building phase. The exception was: exit: ExitFailure 1 because I don't have portaudio installed) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
--- On Sat, 12/5/09, Daniel Fischer daniel.is.fisc...@web.de wrote: cd portaudio-0.0.1 ghc --make Setup ../Setup configure --help (choose your options, prefix, profiling, ...) ../Setup configure $OPTIONS ../Setup build Everything went well until Setup build which yielded our friend c2hs.exe does not exist. C:\A\install\programming\portaudio\haskell\portaudio-0.0.1ghc --make Setup [1 of 1] Compiling Main ( Setup.hs, Setup.o ) Linking Setup.exe ... C:\A\install\programming\portaudio\haskell\portaudio-0.0.1Setup configure --hel p Usage: Setup configure [FLAGS] Flags for configure: ...(edited out) C:\A\install\programming\portaudio\haskell\portaudio-0.0.1Setup configure --ext ra-include-dirs=C:\A\install\programming\portaudio\portaudio\include --extra-l ib-dirs=C:\A\install\programming\portaudio\portaudio\build\msvc\Win32\Release Configuring portaudio-0.0.1... C:\A\install\programming\portaudio\haskell\portaudio-0.0.1Setup build Preprocessing library portaudio-0.0.1... c2hs.exe: does not exist ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
I am going to give this a try. Thanks. Where can I get the pexports and dlltool utilities? Google yields: http://www.emmestech.com/software/pexports-0.43/download_pexports.html http://sourceware.org/binutils/ Are those correct? --- On Sat, 12/5/09, john lask jvl...@hotmail.com wrote: From: john lask jvl...@hotmail.com Subject: RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card? To: daniel.is.fisc...@web.de, functionallyharmoni...@yahoo.com Cc: haskell-cafe@haskell.org Date: Saturday, December 5, 2009, 9:03 PM I don't know whether this will help you but I just downloaded an built the haskell portaudio package ... (I had a windows msvc build of portaudio dll already) the process I used ... ghc 6.10.4, portaudio-19 make an import lib for ghc from dll: pexports libpa19.dll libpa19.def dlltool --input-def libpa19.def --output-lib libpa19.a edit the .cabal file or use command line flags extra-Libraries: pa19 extra-lib-dirs: c:\portaudio19\lib include-dirs: c:\portaudio19\include runghc setup configure make sure you have cpp i.e. the c-preprocessor on your exe path, otherwise you will get 'cpp' is not recognized as an internal or external command, operable program or batch file. c2hs.exe: Error during preprocessing custom header file runghc setup build builds ok ...?? From: daniel.is.fisc...@web.de To: functionallyharmoni...@yahoo.com Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card? Date: Sun, 6 Dec 2009 02:34:17 +0100 CC: haskell-cafe@haskell.org Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz: I just had another idea. da...@linux-mkk1:~ c2hs -o memyself.hs memyself.chs c2hs: does not exist it's not that c2hs isn't found or something, c2hs doesn't find Base.chs! Try installing from the unpacked sources (cd portaudio; cabal install) or the old- fashioned way: cd portaudio-0.0.1 ghc --make Setup ./Setup configure --help (choose your options, prefix, profiling, ...) ./Setup configure $OPTIONS ./Setup build if all's well, ./Setup haddock ./Setup install (dies for me with dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder Verzeichnisnicht gefunden c2hs: Error during preprocessing custom header file cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the building phase. The exception was: exit: ExitFailure 1 because I don't have portaudio installed) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Australia's #1 job site If It Exists, You'll Find it on SEEK ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: cabal install portaudio Resolving dependencies... Downloading portaudio-0.0.1... Configuring portaudio-0.0.1... cabal: Missing dependency on a foreign library: * Missing C library: portaudio This problem can usually be solved by installing the system package that provides this library (you may need the -dev version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the configure step. The exception was: exit: ExitFailure 1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Hi, portaudio is my embarrassing fault, but it does work most of the time. (Community, some one remind me to revisit this package after Christmas.) Are you running in Windows? Linux? If Linux, which flavor? /jve On Fri, Dec 4, 2009 at 1:51 PM, M Xyz functionallyharmoni...@yahoo.comwrote: What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: cabal install portaudio Resolving dependencies... Downloading portaudio-0.0.1... Configuring portaudio-0.0.1... cabal: Missing dependency on a foreign library: * Missing C library: portaudio This problem can usually be solved by installing the system package that provides this library (you may need the -dev version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the configure step. The exception was: exit: ExitFailure 1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Hi, portaudio is my embarrassing fault, but it does work most of the time. (Community, some one remind me to revisit this package after Christmas.) Are you running in Windows? Linux? If Linux, which flavor? /jve I'm using Haskell on XP but I dual boot with Ubuntu 9 and I'd prefer not to break compatibility. I'm new to this, was I supposed to install portaudio for my OS before downloading the Haskell package? Are there other similar simple sound apis? On Fri, Dec 4, 2009 at 1:51 PM, M Xyz functionallyharmoni...@yahoo.com wrote: What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: cabal install portaudio Resolving dependencies... Downloading portaudio-0.0.1... Configuring portaudio-0.0.1... cabal: Missing dependency on a foreign library: * Missing C library: portaudio This problem can usually be solved by installing the system package that provides this library (you may need the -dev version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the configure step. The exception was: exit: ExitFailure 1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
You'll have to install the portaudio C libraries and header files before continuing. I never actually tested the package on XP, if you get it to work, I'd love to hear your experience. /jve On Fri, Dec 4, 2009 at 2:20 PM, M Xyz functionallyharmoni...@yahoo.comwrote: Hi, portaudio is my embarrassing fault, but it does work most of the time. (Community, some one remind me to revisit this package after Christmas.) Are you running in Windows? Linux? If Linux, which flavor? /jve I'm using Haskell on XP but I dual boot with Ubuntu 9 and I'd prefer not to break compatibility. I'm new to this, was I supposed to install portaudio for my OS before downloading the Haskell package? Are there other similar simple sound apis? On Fri, Dec 4, 2009 at 1:51 PM, M Xyz functionallyharmoni...@yahoo.comhttp://mc/compose?to=functionallyharmoni...@yahoo.com wrote: What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: cabal install portaudio Resolving dependencies... Downloading portaudio-0.0.1... Configuring portaudio-0.0.1... cabal: Missing dependency on a foreign library: * Missing C library: portaudio This problem can usually be solved by installing the system package that provides this library (you may need the -dev version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the configure step. The exception was: exit: ExitFailure 1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mc/compose?to=haskell-c...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
if you get it to work As a spoiled Java programmer, this new role as pioneer is a bit intimidating, but I will give it a shot. :) I downloaded the portaudio v19 source and I'm attempting to build it. Apparently I have to register my Visual Studio Express with Microsoft. Deeper down the rabbit hole... (Interesting aside, on the registration form under What programming language topics are you interested in? neither F# or Haskell are listed) I wish there was a multimedia standard library for beginners like me. Writing audio to the speakers shouldn't be such a journey. You'll have to install the portaudio C libraries and header files before continuing. I never actually tested the package on XP, if you get it to work, I'd love to hear your experience. /jve On Fri, Dec 4, 2009 at 2:20 PM, M Xyz functionallyharmoni...@yahoo.com wrote: Hi, portaudio is my embarrassing fault, but it does work most of the time. (Community, some one remind me to revisit this package after Christmas.) Are you running in Windows? Linux? If Linux, which flavor? /jve I'm using Haskell on XP but I dual boot with Ubuntu 9 and I'd prefer not to break compatibility. I'm new to this, was I supposed to install portaudio for my OS before downloading the Haskell package? Are there other similar simple sound apis? On Fri, Dec 4, 2009 at 1:51 PM, M Xyz functionallyharmoni...@yahoo.com wrote: What is the most minimal (preferably platform independent) library available for writing bytes to the sound card? I see 60 wonderful libraries on Hackage, but I really just need the Haskell equivalent of an audio.write(byte[]) method. What sound api are these 60 libraries using? I think the portaudio library is the only contender but when I try to install it I get: cabal install portaudio Resolving dependencies... Downloading portaudio-0.0.1... Configuring portaudio-0.0.1... cabal: Missing dependency on a foreign library: * Missing C library: portaudio This problem can usually be solved by installing the system package that provides this library (you may need the -dev version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: portaudio-0.0.1 failed during the configure step. The exception was: exit: ExitFailure 1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
2009/12/4 M Xyz functionallyharmoni...@yahoo.com if you get it to work As a spoiled Java programmer, this new role as pioneer is a bit intimidating, but I will give it a shot. :) I downloaded the portaudio v19 source and I'm attempting to build it. Apparently I have to register my Visual Studio Express with Microsoft. Deeper down the rabbit hole... (Interesting aside, on the registration form under What programming language topics are you interested in? neither F# or Haskell are listed) I wish there was a multimedia standard library for beginners like me. Writing audio to the speakers shouldn't be such a journey. Hi, Did you look at synthesizer ? There is a short introductory file [1]. Be sure to look at the source (there is a link next to each function definition). Outputting list of values is easy, for instance Play.monoToInt16 (44100::Double) (map sin [0::Double,0.1..]) It uses SoX [2], which should be installed. Cheers, Thu [1] http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer-Plain-Tutorial.html [2] http://sox.sourceforge.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
Did you look at synthesizer ? There is a short introductory file [1]. Cheers, Thu [1] http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer-Plain-Tutorial.html Thanks for the tutorial link. As I'm new to Haskell, these 2 lines got me thinking: Using plain lists is not very fast and Getting real-time performance is mostly an issue of the right signal data structure. What do you use as an efficient byte buffer in a value-oriented language? The array tutorial says Obviously, a naive implementation of such an array semantics would be intolerably inefficient, either requiring a new copy of an array for each incremental redefinition, or taking linear time for array lookup; thus, serious attempts at using this approach employ sophisticated static analysis and clever run-time devices to avoid excessive copying. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
M Xyz schrieb: Did you look at synthesizer ? There is a short introductory file [1]. Cheers, Thu [1] http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer-Plain-Tutorial.html Thanks for the tutorial link. As I'm new to Haskell, these 2 lines got me thinking: Using plain lists is not very fast and Getting real-time performance is mostly an issue of the right signal data structure. What do you use as an efficient byte buffer in a value-oriented language? I have written some more details on it: http://hackage.haskell.org/packages/archive/synthesizer/0.2.0.1/doc/html/Synthesizer-Storage.html But I think that's not something one should start with ... http://www.haskell.org/haskellwiki/Sound_data_structures ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe