Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created May 19, 2014 14:20
Show Gist options
  • Save dtinth/2171e21a6ddb17b6d453 to your computer and use it in GitHub Desktop.
Save dtinth/2171e21a6ddb17b6d453 to your computer and use it in GitHub Desktop.
MIDI Key Mapper

Problem 1 - อ่านข้อมูลจาก Keyboard MIDI

มีวิธีทำหลายภาษา

  1. Ruby — https://github.com/arirusso/unimidi : Platform independent realtime MIDI input and output for Ruby
  2. Node.js — https://github.com/justinlatimer/node-midi : A node.js wrapper for the RtMidi C++ library that provides realtime MIDI I/O.
  3. Java — http://docs.oracle.com/javase/tutorial/sound/overview-MIDI.html

Problem 2 - สั่งคีย์บอร์ดให้กด

ไม่รู้เหมือนกันว่า JavaScript / Ruby ทำได้หรือเปล่า ที่ได้แน่ๆ คือ Java กับ JRuby

Problem 3 - ถ้า Solution 1 กับ 2 เป็นคนละภาษากัน ต้องหาทางมาเชื่อมกัน วิธีง่ายๆ คือผ่าน TCP Socket

  1. Ruby — http://ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html
  2. Node.js — http://nodejs.org/api/net.html
  3. Java — http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment