caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Julian Brown <brown@cs.bris.ac.uk>
To: caml-list@inria.fr
Subject: Re: Could be Caml a good language for sound manipulation ?
Date: Mon, 29 Nov 2004 03:21:09 +0000 (UTC)	[thread overview]
Message-ID: <slrncql55t.jur.brown@panic.cs.bris.ac.uk> (raw)
In-Reply-To: <41AA5C8C.2010503@free.fr>

On 2004-11-28, Elthariel <elthariel@free.fr> wrote:
> Hello "les Cémaliens",
> I'm quite new in oCaml world, I partially learnt it in my school (EPITA 
> / Paris) and I'm going to finish this next year. I'm not really ease in 
> english so my question will be short : do you think Caml coul be a nice 
> langage for sound manipulation implementation, as Synthetizers, effects 
> plugins ? I doesn't ask for answer in term of performance which should 
> be I guess quite good :p, but more in term of software design and 
> language facility.

I can't really answer this very sensibly with my extremely limited
experience in the area, but I will try anyway!

I think that performance problems may hit you sooner than you might hope
for real-time stuff. I was slightly surprised that my naive first attempt
at audio-type programming with Ocaml failed to fill buffers fast enough
with a bytecode-compiled executable, though native code is fine (this
was on a 1GHz Athlon, YMMV). The trancendental functions and non-tail
recursive functions I used might have something to do with it though.

As for the manipulation of sound itself, yes, Ocaml is a lovely
language! It may be better to stick with an imperative rather than
functional programming style though, for reasons of performance. Also,
under Linux, the low-level ioctl calls are a total pain, and require
interfacing to C.

You can have a look at this as an example if you like, though I don't
expect it will be very useful to you:

  http://panic.cs.bris.ac.uk/~jules/beepy.tar.bz2

It needs lablgtk2, and probably won't work on anything but Linux. It's
only been tested on x86. The sound.ml/sountctl.c files might be a useful
starting point for some sort of sound output library, if you can't find
anything else more suitable.

Cheers,

Julian


  reply	other threads:[~2004-11-29  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28 23:17 Elthariel
2004-11-29  3:21 ` Julian Brown [this message]
2004-11-29  3:35 ` [Caml-list] " Evan Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrncql55t.jur.brown@panic.cs.bris.ac.uk \
    --to=brown@cs.bris.ac.uk \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).