[plt-scheme] DrScheme, libsdl

From: John Clements (clements at brinckerhoff.org)
Date: Thu Oct 29 13:51:35 EDT 2009

On Oct 23, 2009, at 7:49 AM, Dave Griffiths wrote:

> I've been thinking on and off about how to get sound working in
> DrScheme, but is sort of depends on exactly what you want to do.
> For example, fluxus has two ways of making audio:
> One is a dedicated audio server, a synthesis/dsp graph engine called
> fluxa - which runs in a separate process (similar, although much much
> smaller than supercollider). Events are timestamped and sent to the
> server over the network, things can then be made to happen with a very
> high timing accuracy (in other words, good for techno etc). It uses  
> jack
> as it's audio server which is great in performance situations for it's
> reliability, but not for desktop audio due to fiddly setup (it's just
> not designed for that). I've used fluxa in DrScheme though.
> The other method in fluxus is a tiny C++ OpenAL binding, which should
> probably be rewritten using the ffi. It's designed for adding sounds  
> to
> games.
> OpenAL is great if you're happy playing a wav file and altering it's
> pitch and volume. It's crossplatform and doesn't need any other  
> servers
> or processes running, and is probably what SDL is using.
> I haven't tried making music with OpenAL though. One thing which could
> be problematic is getting the timing accurate enough. You'd have to
> drive it from a tight loop dealing with scheduled events, as it works
> around 'play now/asap' concept, rather than sequencing or scheduling
> things in the future. Even then, it might sound a little sloppy. It  
> all
> needs experimenting with though.
> On the other hand, maybe someone is working on a solution already and
> has figured all this out... :)

FWIW, I've implemented support for OS X MIDI to go with Eli's Linux  
support.  We haven't tried to glue things together to come up with a  
common interface, but I'm attaching my 'midi' collection just for the  
heck of it.  Running the "user.ss" module produces a cacophonous swirl  
of piano notes. I'm pleased to see that it runs in pure mzscheme, sans  

Note that this is simply going directly to a common MIDI interface,  
and not trying to provide support for other operations (chaining  
filters, input sources, etc.).  As such, it's probably more  
appropriate for "learn-to-program" type of situations than what you're  


-------------- next part --------------
A non-text attachment was scrubbed...
Name: midi.tgz
Type: application/octet-stream
Size: 7489 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20091029/517d55db/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20091029/517d55db/attachment.p7s>

Posted on the users mailing list.