Kinect de-theremin

3,757 views

Published on

Kinect のデータを node.js 経由でブラウザに送信し、そのデータを元に Audio Data API でテルミンのような音を出すデモと解説です。

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • Source Code:

    kinect-de-theremin (node.js アプリとprocessing による kinect アプリ)
    https://github.com/hakobera/kinect-de-theremin

    kinect.js
    https://github.com/hakobera/kinectjs
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
3,757
On SlideShare
0
From Embeds
0
Number of Embeds
642
Actions
Shares
0
Downloads
10
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Kinect de-theremin

    1. 1. Kinect- Kinect Audio Data API node.js - @hakobera / Kazuyuki Honda 2011/3/24 Node 1
    2. 2. • hakobera /• Web• : Java / JavaScript• node.js :• Kinect :2
    3. 3. LTKinectnode.js + Socket.IO Audio Data API
    4. 4. Kinect• 1000•• • Kinect XBox 360 20 2 • SDK
    5. 5. Audio Data API• HTML5 Audio Mozilla• JavaScript• Chrome Audio API API
    6. 6. TCP/IP Socket.IO Hand Tracker express HTMLopenkinect/libfreenect Audio Data API
    7. 7. expressvar port = 3000;var app = express.createServer();app.configure(function() { app.use(express.static(__dirname + /static)); app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));});app.set(view engine, ejs);app.set(view options, { layout: false });app.get(/, function(req, res) { console.log(get index); res.render(index, { port: port });});app.listen(port);
    8. 8. Socket.IOvar webSocket = socketIo.listen(app);webSocket.on(connection, function(client) { console.log(connected: + client.sessionId); client.on(message, function(msg) { console.log(msg); }); client.on(disconnect, function() { console.log(disconnect); });});
    9. 9. TCP/IPvar kinectTransporter = net.createServer(function(kinect){ var buff = ""; kinect.on("data", function(d){ var s = d.toString(); var v = s.split(,); var o = { x: v[0], y: v[1] }; console.log(o); webSocket.broadcast(JSON.stringify(o)); }); kinect.on(error, function (err) { console.log("ignoring exception: " + err); });});kinectTransporter.listen(9999);
    10. 10. KinectC++
    11. 11. (C++)
    12. 12. Java python• Java, Python, Ruby, C#, ActionScript OK
    13. 13. JavaScript
    14. 14. JavaScript orz
    15. 15. kinect.js
    16. 16. kinect.jslibfreenect Java - processingRhinoCommonJSprocessinghttp://processing.org/kinect java - processing wrapperhttp://www.shiffman.net/p5/kinect/
    17. 17. var processing = require(processing);var kinect = require(kinect);processing.run({ setup: function() { this.size(kinect.width(), kinect.height()); this.frameRate(5); kinect.init({ processing: this, enableDepth: true, enableIR: false, enableRGB: false, processDepthImage: true }); }, draw: function() { var depthImg = kinect.getDepthImage(); this.image(depthImg, 0, 0); }, stop: function() { kinect.stop(); }}); Kinect
    18. 18. •• libfreenect RGB,• node.js

    ×