Re: [Haskell-cafe] Sound library?

2004-12-14 Thread Jeremy Shaw
At Fri, 03 Dec 2004 10:40:45 -0800,
Jeremy Shaw wrote:
 
 At Fri, 03 Dec 2004 10:56:24 -0500,
 Jason Bailey wrote:
  
  
  Would anyone know of packages out there for Haskell that support mp3's 
  or ogg files?
 
 I have some haskell bindings to libmad somewhere ... I don't remember
 how complete they are, but I think i got them to the point that I
 could decode and play an mp3. 

Sorry for the delay, I found a copy of my code that compiles, it is
now online at:

http://www.n-heptane.com/nhlab/

I think it might even work...

Right now I only have a low-level binding, and a sample application
that decodes an mp3. But, the low-level bindings to mad are pretty low
-- there really needs to be a higher level library, but I have not
written one yet ;)

The MadTest stuff is a bit hack-ish and should probably be updated to
use NewBinary.

Jeremy Shaw.
--

This message contains information which may be confidential and privileged. 
Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy 
or disclose to anyone 
the message or any information contained in the message. If you have received 
the message in error, 
please advise the sender and delete the message.  Thank you.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-04 Thread Ian Lynagh
On Fri, Dec 03, 2004 at 10:56:24AM -0500, Jason Bailey wrote:
 
 Would anyone know of packages out there for Haskell that support mp3's 
 or ogg files?

I have a (partial, I think) binding for gstreamer:

http://urchin.earth.li/~ian/minstrel/

(you only need GHC 6.3 for hcurses, hgstreamer and dependencies should
compile fun without it I believe).

I also have a complete, although error-checking-free, libalsaplayer
binding, but I found it a less pleasant API (which is why I switched):

darcs get http://urchin.earth.li/darcs/ian/halsaplayer


Thanks
Ian

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Henning Thielemann

On Fri, 3 Dec 2004, Jason Bailey wrote:

 Would anyone know of packages out there for Haskell that support mp3's 
 or ogg files?

Do you mean realtime unpacking and playback? I'm afraid without hacking
Haskell programs are too slow for that. If you want to read or write
compressed audio streams you might content with piping data through an
external compressor/decompressor, or calling a library for that purpose. 

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Jeremy Shaw
At Fri, 03 Dec 2004 10:56:24 -0500,
Jason Bailey wrote:
 
 
 Would anyone know of packages out there for Haskell that support mp3's 
 or ogg files?

I have some haskell bindings to libmad somewhere ... I don't remember
how complete they are, but I think i got them to the point that I
could decode and play an mp3. Of course, all the actual decoding work
was being done in libmad, and haskell was just pulling the strings...

I can attempt to dig them up if that would suit your needs...

Jeremy Shaw.


--

This message contains information which may be confidential and privileged. 
Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy 
or disclose to anyone 
the message or any information contained in the message. If you have received 
the message in error, 
please advise the sender and delete the message.  Thank you.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Ketil Malde
Henning Thielemann [EMAIL PROTECTED] writes:

 On Fri, 3 Dec 2004, Jason Bailey wrote:

 Would anyone know of packages out there for Haskell that support mp3's 
 or ogg files?

 Do you mean realtime unpacking and playback? I'm afraid without hacking
 Haskell programs are too slow for that.

Really?  Written in C, mpg123 can decode 50 minutes of audio in 30
seconds (tested on a 1GHz PIII) -- would a Haskell implementaion
really be 100x slower?   

(Although I agree that FFI'ing to an existing library does sound like
the thing to do.)

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Henning Thielemann

On Fri, 3 Dec 2004, Ketil Malde wrote:

 Henning Thielemann [EMAIL PROTECTED] writes:
 
  On Fri, 3 Dec 2004, Jason Bailey wrote:
 
  Would anyone know of packages out there for Haskell that support mp3's 
  or ogg files?
 
  Do you mean realtime unpacking and playback? I'm afraid without hacking
  Haskell programs are too slow for that.
 
 Really?  Written in C, mpg123 can decode 50 minutes of audio in 30
 seconds (tested on a 1GHz PIII) -- would a Haskell implementaion
 really be 100x slower?   

I've written much simpler audio signal processing routines compiled by GHC
which don't run in realtime on a 1GHz machine ... 

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Jason Bailey




I'm new to Haskell so I didn't realize it had that much of a
performance issue. If you could find those bindings I'd appreciate it,
at the very least it would give me a starting point on where to go
frrom here.

Jason


Jeremy Shaw wrote:

  At Fri, 03 Dec 2004 10:56:24 -0500,
Jason Bailey wrote:
  
  

Would anyone know of packages out there for Haskell that support mp3's 
or ogg files?

  
  
I have some haskell bindings to libmad somewhere ... I don't remember
how complete they are, but I think i got them to the point that I
could decode and play an mp3. Of course, all the actual decoding work
was being done in libmad, and haskell was just pulling the strings...

I can attempt to dig them up if that would suit your needs...

Jeremy Shaw.


--

This message contains information which may be confidential and privileged. Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone 
the message or any information contained in the message. If you have received the message in error, 
please advise the sender and delete the message.  Thank you.


  




___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Sound library?

2004-12-03 Thread Philippa Cowderoy
On Fri, 3 Dec 2004, Henning Thielemann wrote:


 On Fri, 3 Dec 2004, Ketil Malde wrote:

  Really?  Written in C, mpg123 can decode 50 minutes of audio in 30
  seconds (tested on a 1GHz PIII) -- would a Haskell implementaion
  really be 100x slower?

 I've written much simpler audio signal processing routines compiled by GHC
 which don't run in realtime on a 1GHz machine ...


Mind if I ask what was going on there? I can see things potentially taking
that long if you do things in a [Word16] or something like that, and this
/is/ one of the cases where float is better than double...

That, and this is probably one of those squash laziness situations.

-- 
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe