This is an original post written for my blog on Wednesday, January 12th, 2011 as a way to get the Kinect working on the Mac and working with Max. I had lost it in a database issue and thought, though the tech is now outdated, it would be worth archiving. Here it is, brought back to life from the ether by the amazing Wayback Machine.
OpenNI is a “natural interaction” software that uses the Kinect for XBox 360. Using this, connected to a Mac, we can control various software via OSC. Here, I will show you how to get the data into Max. The idea here is that you are like me, longing to try, but missing the few crucial steps that the README’s forget about the amateur hacker.
First, if you are not comfortable with the terminal, I will try to walk you through it. Everything in this tutorial will require being in the terminal. That does not mean that it is hard, just different for many of us.
Second, I have tried this on three machines just to be safe that I did not ruin anything. My school computer went first (17” MacBook Pro 2006, 2.33 ghz), then my old Mac Mini (1.83 ghz, 2006) and now my MacBook Pro (2008, 2.4 ghz). All are working great. All are Intel. I can make no promises about your machine… but mine are all running smooth.
Third… I cannot help you. I would not even know where to begin. I am amazed that I have gotten this to work as it is with out something catching on fire or opening a hole to the Nether… there are far better programmers that could help you further than I ever will.
Where is it?
Applications > Utilities > Terminal
What to do with it for now?
Add it to your Dock if you don’t have it there… trust me on this one… you will use it a lot
What code will I need to know?
sudo= superuser… makes things happen. See this for more info
cd= change directory
Quick Tip: Drag a folder into terminal of where you want to go after typing cd[single space] to save from typing.
*** Click “Select Command Line Links” when finishing up MacPorts install, its very important for the next steps***
RESTART
- Open the Terminal (in your Dock right? I warned you…)
- Type:
sudo port install libtool
Be patient, MacPorts is flying through the interwebs getting you files for you. It took about 20 minutes to run its course for me… just enough time to catch up on some music tech news or a little humor.
RESTART
- Back in Terminal, Run:
sudo port install libusb-devel +universal
*** Do not forget the +universal, it’s very important as well!!***
This takes awhile as well, get comfortable and perhaps enjoy a little light reading or a movie (yes, it is that long… your mileage may vary).
Again RESTART
If you have troubles with the Macports portion, I have been getting good feedback about the Homebrew version of the install. More on that here. I personally have not tried it yet, but plan to on my next install (plus you gotta love the “Macports driving you to drink? Try Homebrew!” motto)
- You will need the latest unstable version (be brave) for Mac. Be sure to download the mac version found at the bottom only, do not go to the github link at the top of the page!
- Create a OpenNI Folder in your Documents (I use that here because it is clean, you may need/want to put it elsewhere).
- Unpack the download and drag into an newly unpacked OpenNI… folder in your Documents> OpenNI folder
- Navigate to the folder using the terminal. Type (or drag the visible folder after a space following cd):
cd (folderpath)
example:
cd /Users/YOURUSERHERE/Documents/OpenNI/OpenNI-Bin-MacOSX-v1.0.0.25
- Hit Enter to select that folder and in the terminal type:
sudo ./install.sh
The avin2 version worked best for me. I had tried two others, but had problems, not sure why… get it here:
https://github.com/avin2/SensorKinect
Please note, versions vary, I will not be typing out versions numbers for now.
- Unpack the avin2 SensorKinect file and drag into your OpenNI folder
- Navigate through the SensorKinect folder to: avin2…>Bin>… And unpack the SensorKinect-MacOSX-5.0.0.tar.bz2
- Navigate to the new folder using the terminal
cd (folderpath)
example:
cd /Users/YOURUSERNAME/Documents/OpenNI/avin2…/Bin/SensorKinect-MAcOSX5.0.0.25
- Hit Enter and in the terminal type
sudo ./install.sh
Again, you need the latest unstable
- Unpack the NITE file download and drag into your OpenNI folder
- Navigate to the new folder using the terminal
cd (folderpath)
example:
cd /Users/YOURUSERNAME/Documents/OpenNI/Nite…/
- Hit Enter and in the terminal type: sudo ./install.sh
- The Primesense license key is found on their site and is 0KOIk2JeIBYClPWVnMoRKn5cdY4=
- Hit Enter
COPY FILES…
This is important, or you will get errors. Copy the 3 files from avin2…>NITE>Data to Nite-1.3.0.18>Data. It is ok to replace these files
FIRST TEST:
- In Terminal change directory to the Nite…> Samples> Bin>
- Run the Sample-PointViewer program (you can just drag it into the terminal and hit enter)
- Wave your hands like you care that you see the point…
SUCCESS? Then keep going… we are almost there. You will need to quit Sample-PointViewer and then…
- Unpack the OSCeleton file download and drag into your OpenNI folder
- Navigate through to the folder to: Sensebloom…> bin> OSX> osceleton-osx
- Drag the osceleton-osx file onto your terminal
- The terminal should be running happy if you step back… Users will be added, calibrated and sending data (FYI, put your hands up to calibrate.. surprisingly, not many places say that…)
- The Calibrate position is called the “Psi” Pose… Arms in a “stick’em up” pose… like this or this (be sure to watch the terminal for calibration… hold the pose and it will catch you. Also, be sure to stand far enough back… I am rather tall and had to step about 8 feet back…)
To test, we can use a pre-made Processing example… but its not needed, you can just skip to Max if you wish
- Download the examples from Sensebloom
- You will need Processing if you don’t have it (If you are new to processing you will also need to download: oscP5 and pbox2d
- Open Processing
- Close Processing
- Move the Folders for oscP5 and pbox2d into the created libraries folder (should be in your Documents folder after running Processing the first time)
- Open the file Stickmanetic and press the Play icon
- Stand/Calibrate (stand about 6ft away)/ AND DANCE
Now… getting the data into Max is easy…
For Max you will need the CNMAT objects (which if you don’t have, you really should anyway).
Download/unpack/move it into the Cycling ‘74 folder in Max
I assume if you went this far, you know your way around max a bit… so I will keep this short
Paste this into a new patcher:
----------begin_max5_patcher---------- 2849.3oc0c00aiiaE84jeEDdeclL7aJl21tEEnEEn.s6Cscxf.Ga4DuQQJPV Yyrcw9euhjx1bmXGRsV7COHiskLk7UGduGd4gTT+5kWL6tluVtYF3ZvmAWbw ud4EWn2kZGWLr8EydZ9WWTMeitXypKes4teZ1GLeUW4W6z6tpY9x6lWe+1uX 8R8t6K5G4zs6bUScW87mJ0e022tdd01uo9kmVWWU1o+MPVEey5+mt3H7Uv8k s4ktusvlc08KOWZtZlosFvWF95mm2s3g002eaa4hNSIHpSI3i5yLfCUuh6eE 7E0Q7aWdo5kO3Iprn4omJq6dCr7v75ka24yska5Ky7t0M01VtETwjgDpfGvP rvCLUiDXl9MpXOfbbLjizEiWvTugXgAEKqtq40Q.ibbBgwsffAFYDefQJWWL g4PCELt4glWpVV1NFjjjPjjIrARtW.Iw.jPdHAxQFUSooOpFYhm8LpFhzQ0B XNEUSkoOpd.F8LplVncFIrLKplQSdT8VfzunZjFH4RTHAxtl1MMi.EIvzGVa dkvymn55xEONFPjl9f5APTjOwzOTNeLMvPjIOddvcDlOgy+y02+P2H.QbwwA QvepoZo+HI8OHRpgEDwfGX8VXhCrDRsCpKf6OnIDK+6kqFETJyCnDahRwXpO PIoP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2XdOENXeZuKK2z oRVXHw8OuqcOqx7v5kKKqsiWdZ8xm07fli4HUz9ZRpU.I.xgIoVQphsMgcYS I.mHtrIZbsIhGtSpkZwXaStp6TKotiwlPP5UHUenUKz5Ty8vIGdEaXqovjcE BTLRXruunEaWtMGFH.IQawpsNUKF6SPKLtU7Xep3kw2lbEzpVshinMo88c5s whuM4rtiFeaxYcGIt1jOwcEv3aStp6Dx3aStp6DwMtyG2IDN5ljqZNkv3Q1j b4fihqCNG4QVN7DXStp5XijDGgI6xYfXdHRS3LUNC5slBS1UUKajvXw97xHC 2sc8cAkMr0oZwPer33xhnsImU7h3aStn1XwsKbZeem0cj3aSNq6vw2lbV2E2 1.X9D2QKhuM4ptiJhuM4ptiF43NOZqLt4wS8gIfRhuM4zaBGeaxo2TbYBn9v DPJhuM4ptiHhuM4ptiDWl.ejZNtdSDeXBHj3aSN8lvw2lb5ME25N08uhaV7Q 1gmB1tdOfMq3oC8dPu0TXwNaJDFeTzo21n61HaW2FwXtU2F0acplrORdgiLL 5ijWHY7sIm5KE2lJwdDAHhtE4phCOR1V4dMHFl.aDtdjVzaMAFrS8vFIFxE6 hWQXw1a7N1vVmnAi7RAu3N7BHuD5jFeaxY7ZbSFo2g0mj1vzDXUNcoFa8WeT PuKO2ba5OL1n5sNYy0mTUPXbjAQeZ5GgQIvpbOpHws4ciqjaGNbBrJ2CWCJA VkyZvHOjM5GuBtmfBiLaHAdW6lzgYFng1Pu0jXxN4dgEI.Hc5zAIic9zv2ky DkRrlOM5sNYitvqQQjGYnrvKnjk.qxY7KLxM4qcnbNa2jIvnb6VgRfU41sJx Dv9Lw.GIoAEoHHjV2VH1ed3gsNQpmianIfP1mQ8GMkWBXodlERoZsSjxnbIL 1j4e+KAjYBfatDzaDiKgry09a6HkunJ0BUs9LePUMsuMeBDUyqqAnbJ8Lnla aIy0fdiuYpse4uc4+Gbg7zFO -----------end_max5_patcher-----------
Refer to the READ ME files for all of these for more info and settings.
Enjoy!
Please let me know if you do anything fun/educational/crazy with this.
I plan to post some examples shortly… been to busy getting it working to experiment yet, hahaha. I will update if you find something I missed.
cheers,
tohm
This entry was posted on Wednesday, January 12th, 2011 at 6:37 pm and is filed under blog, music, performance, technology and tagged with OpenNI. FILE ARCHIVED ON 11:31:13 Feb 9, 2011 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 18:30:34 Oct 28, 2015.