0

I've got some software (written in Qt) that controls some very flexible hardware. Consequently, the display is loaded with controls to adjust this and that. Overloaded, really. I was thinking that one of the general MIDI control surfaces with various buttons and knobs that send MIDI messages might be pressed into service as a dedicated hardware control panel, if:

A) I can write, buy or otherwise locate software to catch MIDI no matter what app is active (I think this is the normal way it works... otherwise MIDI wouldn't really function, would it?)

B) I can send, from that software, keystroke events to a specific app that may or may not be presently active (this way, one could be working in, for instance, the web browser, tap a control on the midi surface, and have the keystroke command properly routed to the hardware.

So, my question is twofold: First, is (B) possible, and second, if it is, any pointers to either already existing software or the appropriate portion of Qt?

TIA.

--Ben

fyngyrz
  • 2,458
  • 2
  • 36
  • 43

1 Answers1

1

Not sure if there is any software solution out there which can do everything that you need, but MidiPipe is probably a good starting point for you.

tuomassalo
  • 8,717
  • 6
  • 48
  • 50
Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
  • Thanks, I've modded the answer up, but as it turns out, OSX/Cocoa has a huge flaw wherein you can ONLY send keystrokes to the active application. If you send a keystroke to app A, but app B is active, the keystroke moves to app B. I can't use keystrokes as a result. And, since Cocoa has no standard IPC, the only path left is actually implementing midi in the app, which is proving to be quite a challenge for me. But anyway, I'm working it, and I expect to solve it despite the whole keyboard thing. Very mush appreciate the pointer, Nik. – fyngyrz Aug 17 '11 at 07:29
  • @fyngyrz It's definitely possible to send keystrokes to an application which isn't running in the foreground -- quicksilver does this, for example, as do several other apps. Maybe browse the source here: https://github.com/quicksilver/quicksilver . I also found this project, maybe useful to you: http://code.google.com/p/clonekeys/wiki/CloneKeys – Nik Reiman Aug 17 '11 at 07:38
  • Nik, I took a look, but the only thing I found to send keystrokes was via applescript; and applescript deactivates the current app, activates the target app, and then sends the keystroke. What I need is to receive a keystroke without changing what app is active. This is something you can do under linux, windows, Amiga Intuition... but Apple's gui paradigm only allows for one "key window" at a time. – fyngyrz Aug 31 '11 at 17:16
  • clonekey project is the same -- it changes the focus in order to send the key. – fyngyrz Aug 31 '11 at 17:22