Archive

Monthly Archives: March 2014

Messing again in OSS, and after a workstation migration thought this might be useful for the next one. I am basing my post on Rumen Filkov’s post, but commenting and clearing some of the steps which might tricky.

1. Download and unpack OpenNI2 and NiTE2 tar balls. (Make sure you’re getting the x86_64 version whenever possible)

2. Open ‘/etc/launchd.conf’ and set the needed environment variables: ‘setenv OPENNI2_REDIST [path-to-openni2]/Redist‘ and ‘setenv NITE2_REDIST [path-to-nite2]/Redist‘. You might need to create the file from scratch. Then restart your Mac. Use the ‘printenv’ command to verify that the variables are actually set.

3. If needed install libusb 32-bit: ‘brew install –universal libusb‘. At this point, if your sensor is PrimeSense, the OpenNI2-Unity package should work.

4. Kinect only: Install libfreenect: ‘brew install –universal libfreenect‘. This will shortcut on some dependencies.

5. Kinect only: If OpenNI2 still cannot find the Kinect sensor, take the driver’s sources from https://github.com/piedar/OpenNI2-FreenectDriver and build a universal dylib, i.e. for both x64 and i386 architectures. In order to accomplish an universal build just edit the wscript in your OpenNI2-FreenectDriver directory and append the following:

conf.env.append_value(‘CXXFLAGS’, [‘-arch’, ‘i386’])
conf.env.append_value(‘CXXFLAGS’, [‘-arch’, ‘x86_64’])
conf.env.append_value(‘LINKFLAGS’, [‘-arch’, ‘i386’])
conf.env.append_value(‘LINKFLAGS’, [‘-arch’, ‘x86_64’])

6. copy the files bellow to ‘[path-to-openni2]/Redist/OpenNI2/Drivers’ and try again.

libFreenectDriver.1.2.1.dylib
libFreenectDriver.dylib
libFreenectDriver.1.dylib

That’s it ;)

Advertisements

Going after the possibilities that audio analysis and visualisation bring to video games development, I have decided to use Aubio library within PureData environment. Thus, I have decided to post a walkthrough on compiling Aubio on Mac OS X Mavericks (10.9.2).

First, get Aubio latest release (0.4.0) source, from http://aubio.org/download

Get homebrew to install dependencies, you’ll find how to in http://brew.sh. This might bring you some conflicts with macports, but it is definitely worthwhile. I’ll post here the only command that you have to use in terminal for convenience:

>ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

Use “brew doctor” between installations to check if things are correct. You might need to append

export PATH=’/usr/local/bin:$PATH’

to your .bash_profile

In the Aubio directory, issue waf configuration to check missing dependencies

>./waf configure

I had to install some of them using brew, so bellow is part of my bash history. Also install JackOSX latest binary version for audio routing.

>brew install pkg-config
>brew install libsndfile
>brew install doxygen
>brew install txt2man
>brew install libav
>brew install samplerate
>brew install ffmpeg

This will help you overcome the configuration step in Aubio directory.  Some of the installs are optional but I installed all of them, and FFMpeg lib will bring some needed dependencies also. After all have checked fine you can proceed

>./waf build install

Some other things missing, I will get back to it soon.