We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › New JOAL based audio playback library
Page Index Toggle Pages: 1
New JOAL based audio playback library (Read 4787 times)
New JOAL based audio playback library
Dec 20th, 2008, 4:03am
 
"New" actually isn't quite true anymore, since I've been using the core of this library for over 2 years and it's even been lying around here for close to that long, but only recently really got around to make it more library like and standalone, apart from the JOAL dependency and some other packages of my toxiclibs project...

http://code.google.com/p/toxiclibs/downloads/list

audioutils-0002 is the first public release of this library and you can do the following with it:

* Play & loop multiple audio files (mono & stereo, WAV only) without any performance loss (In a recent project I'm playing 96 stereo samples at the same time whilst still getting 60fps in OpenGL).

* No glitching when looping (unless badly edited samples or when running out of voices).

* On sound cards supporting that kind of thing, playback will be in true 3D (with doppler effect, falloff etc.) Cheaper sound cards will only have left/right panning

* The library has a multi-timbral manager for playing multiple instances of the same audio buffer without interrupting/restarting currently playing ones.

* AudioSource & SoundListener classes extend Vec3D (from the fairly popular geomutils package) and so can be directly used in vector maths.

* As with all of my other libraries, I went to great lengths not to have any direct dependency on the monolithic PApplet or any other 3rd party, so this library can be used in any Java based context (however the demos are done in Processing).

* Because the underlying JOAL library has not received the same love from Sun as its sibling JOGL and has not been issued with a digitally signed certificate, you can't unfortunately use the library for projects running in a web browser.

To get you started the only demo available for this lib can be downloaded from here:
http://toxiclibs.googlecode.com/files/audioutils-demos.zip (5.2MB)

It's a sample based sequencer player showing off various interesting parts and usage patterns of the lib...

The library comes bundled with the latest version of JOAL (1.1.2), but if you haven't done so yet, you might have to download the actual OpenAL drivers from here too (not sure anymore, I believe its works automatically on OSX (as expected ;)):

http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx

Finally, you'll also need to download/update the "geomutils" package from the toxiclibs repository... There was a new release yesterday!

Online javadocs are available here:
http://dev.postspectacular.com/docs/audioutils/

Hope some of you find this useful! K.
Re: New JOAL based audio playback library
Reply #1 - Dec 21st, 2008, 3:54am
 
I am having some issues with example/DEMO. When I attempt to run the sketch I receive an error stating:

    Cannot find a class or type named "FMSquareWave"

This is in response to this line of code:

    p.setVolumeAutomation(new FMSquareWave(PI,0.01,0.1,0.1));

So I commented this line out as well as the other three lines surrounding it. Once I do this the sketch runs and sound plays fine with the exception of that 808 boom. I have downloaded and placed all of the libraries where they belong as well as installed OpenAL. I will dig through the sketch some more and see if I can wrap my head around it, but any tips on what might be the issue? I should also mention that I am rather new to Processing.

I am working with:
Processing 1.0.1
Intel MacBook 10.4.11
Re: New JOAL based audio playback library
Reply #2 - Dec 21st, 2008, 2:34pm
 
Hey, I think you haven't downloaded the latest geomutils, if FMSquareWave is the only thing not found. This is one of the new wave form types added to the latest release (geomutils-0012) and I've mentioned above this should be downloaded/upgraded too. In future, I think I should also offer a bundle version of all modules in one go, but that needs some more work with my current bundling system and so far the more modular approach has worked quite well for people. Please let me know if that works for you. I could only test on OSX 10.5.5 and WinXP SP3.
Re: New JOAL based audio playback library
Reply #3 - Jul 18th, 2009, 10:57am
 
Just wanted to let you all know that I've released a new version (0003) with various bug fixes, more convenience wrappers, fluid interfaces and most importantly: more examples showing basic usage, dynamic pitch changes and spatial concepts...

Get the lib from over here (and if you haven't done so yet, you'll also need to download the toxiclibscore package from the same list):

http://code.google.com/p/toxiclibs/downloads/list

Processing examples for this library are bundled separately due to file size reasons...

Enjoy!
Re: New JOAL based audio playback library
Reply #4 - Aug 5th, 2009, 9:40pm
 
* AudioSource & SoundListener classes extend Vec3D (from the fairly popular geomutils package) and so can be directly used in vector maths.

Hi - this lib. looks great but I was wondering if you could further describe these extensions...
Re: New JOAL based audio playback library
Reply #5 - Jun 8th, 2010, 9:15am
 
Hello all,

we're aiming to create a virtual sound space, for the moment, with static listeners above which multiple sound objects orbit in a 3D simulation. Users will use headphones to experience the simulation and the ideal is that the 3D effect should get as fine as possible, so object's positions are identifiable.

We have the library running on a MacBook pro, but the examples run like simple sound pannings and we're doubting if it's because of the hardware or because we need to write our own filters on top of the library methods to increase the effects.

Since you have experience with this kind of installations, I thought you might give some input perhaps?

Would this Card help optimizing the 3D effect?:
http://la.m-audio.com/products/es_la/FastTrackPro.html

Thanks
Re: New JOAL based audio playback library
Reply #6 - Jun 13th, 2010, 12:56pm
 
By default on OSX OpenAL will only run in software mode and simply does distance attenuation without any clever filtering, which is only available if you have an EAX compatible 5.1 audio card. So the M-Audio device you were looking at is unfortunately not going to be an improvement. However, I've done some digging and found this USB box by Creative (the same company behind the OpenAL standard) which seems to be fully mac compatible according to the linked thread below:

http://us.store.creative.com/Sound-Blaster-XFi-Surround-5.1/M/B0017QQQAE.htm

Discussed here:
http://forums.macrumors.com/showthread.php?t=810797#3

Also note that a 5.1 surround card will still not necessarily provide a full 3D ambisonic field, even with an EAX card. However, for Windows there's a commercial, OpenAL compatible, fully 3D ambisonic driver, called Rapture3D: http://www.blueripplesound.com - this would simply show up as virtual OpenAL device and can be used by the library as well...
Page Index Toggle Pages: 1