Hi Hard Off,
That would be sufficiently simple --
But maybe I'm missing something, because I understand that [key] reads the keyboard's input, then [receive] and [send] can pipe values around within PD, and a Bang does all sorts of things within PD.
However, I don't understand how any combination of those things will "emulate" the pressing of a keyboard key.
Here's an example of what I'm trying to do:
Ableton Live is the currently active window, PD is in the background. (PD is already working beautifully as a MIDI transformer.)
PD receives a MIDI message from an external MIDI controller (and, of course, it doesn't have to be in focus to do so.) When it gets the MIDI message, it sends out a sequence of keystrokes -- just as if these keystrokes were being typed into the keyboard.
Since, on the OS level, the currently active window receives any keystroke messages, the Ableton Live window will receive them -- just as if they had been typed into the keyboard.
Thanks for any more thoughts! rs
On Sun, 25 Sep 2005, Ryan Supak wrote:
However, I don't understand how any combination of those things will "emulate" the pressing of a keyboard key.
That's highly platform-dependent. This means that the code for doing it will be completely different on Linux/X11 and OSX and Windows. The only exception is if you want to control an app based on Tcl/Tk, that is, the same GUI system as Pd.
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada
The platform is OSX -- not sure if that makes it easier or harder.
Thanks, rs
On 9/25/05, Mathieu Bouchard matju@artengine.ca wrote:
On Sun, 25 Sep 2005, Ryan Supak wrote:
However, I don't understand how any combination of those things will "emulate" the pressing of a keyboard key.
That's highly platform-dependent. This means that the code for doing it will be completely different on Linux/X11 and OSX and Windows. The only exception is if you want to control an app based on Tcl/Tk, that is, the same GUI system as Pd.
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada
i haven't used ableton live since it was 0.8 beta or whatever, so i don't really know...but are you sure you can't just send midi instead of keystrokes???? i thought it was reasonably flexible like that.
as far as i know, there is no object which outputs keystrokes.
What are you sending the keystroke to? That is the most important question here. There are many ways to send data to other applications...
b.
hard off wrote:
i haven't used ableton live since it was 0.8 beta or whatever, so i don't really know...but are you sure you can't just send midi instead of keystrokes???? i thought it was reasonably flexible like that.
as far as i know, there is no object which outputs keystrokes.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I am sending a series of keystrokes to an OSX app -- Ableton Live. Ableton Live will be the "in focus" app at this time.
There's no way to do what I want to do via MIDI, it has to be keystrokes in this case.
Thanks again! rs
What about OSC, local socket?
Seems the question you should be asking is how to control Ableton live the way you want to control it...
since the keystrokes to ableton come from the OS, then it is the OS that needs to send them... I don't know of any software that does this, you want some kind of reverse key-logger...
Maybe the python API has some hooks into keyboard events...
Seems to me it Ableton causing the issue here... Anything you could use instead? Reaktor has some OSC support apparently...
Good luck.
b.
Ryan Supak wrote:
I am sending a series of keystrokes to an OSX app -- Ableton Live. Ableton Live will be the "in focus" app at this time.
There's no way to do what I want to do via MIDI, it has to be keystrokes in this case.
Thanks again! rs
Yes, Python can do this.
Just wanted to be sure there wasn't a way to do it natively in PD...or with a single object such as [hid].
The benefits of using Ableton Live for what I do, unfortunately, greatly outweigh the minor added trouble in automating certain processes ;)
Thanks rs
On 9/26/05, B. Bogart ben@ekran.org wrote:
What about OSC, local socket?
Seems the question you should be asking is how to control Ableton live the way you want to control it...
since the keystrokes to ableton come from the OS, then it is the OS that needs to send them... I don't know of any software that does this, you want some kind of reverse key-logger...
Maybe the python API has some hooks into keyboard events...
Seems to me it Ableton causing the issue here... Anything you could use instead? Reaktor has some OSC support apparently...
Good luck.
b.
Ryan Supak wrote:
I am sending a series of keystrokes to an OSX app -- Ableton Live. Ableton Live will be the "in focus" app at this time.
There's no way to do what I want to do via MIDI, it has to be keystrokes in this case.
Thanks again! rs