QWERTY to OSC mapper

136 Views Asked by At

I'm stumped on this simple task..

I just want to map my QWERTY keys so that each one when pressed sends an OSC message. That's it.

What's an app or script or library (any platform/language) that can do this (with 0-5 lines of code)?

1

There are 1 best solutions below

0
On

How about this little script in Processing (requires the oscP5 library):

import oscP5.*;
import netP5.*;
OscP5 oscP5;

void setup() { oscP5 = new OscP5(this,12000); }

void draw() {}

void keyPressed() {
  println("Key down " + key);
  OscMessage message = new OscMessage("/keypressed/" + key);
  NetAddress address = new NetAddress("127.0.0.1",12000);
  oscP5.send(message,address);
}