joakim@verona.se writes: > David Kastrup writes: > >> I've been meddling with CCL programs and stuff for integrating Midi >> input received via make-serial-process into Emacs. I've encountered >> several puzzling design decisions and drawbacks. >> >> There are several crucial ones, however. At its core, pressing keys >> on a musical keyboard will result in the insertion of note names into >> the current buffer. This basically is similar to an input method. >> c) the inserted text actually depends on buffer-local variables, for >> example the current notename language (English writes cs for c-sharp, >> Dutch writes cis, Italian writes dod), and the current key (the Midi >> event for c-sharp is indistinguishable from d flat, and the decision is >> made based on the current key in the current piece). Switching CCL >> programs in the decoder is tricky as they do not lend themselves to >> closures with internal states. Also, one would need one closure per >> language/key pairing currently active. >> >> This kind of flexible back-and-forth mapping is actually better >> accomplished by swapping around keymaps rather than encodings. >> >> What this leads up to is that a better approach would be to have Midi >> events in the Emacs event queue. >> >> Thoughts? > > Since you said "Thoughts", I have some. > > - I'm building a combined computer/midi keyboard, and it would > be really nice to use it with emacs with your idea. (If I ever manage > to finish the project) > > - I'm sure you considered OSC, but heres a link anyway: > http://delysid.org/emacs/osc.el Never heard of it. I'll take a look eventually. > My idea with OSC was to embedd gtk sliders in a buffer, and drive a > softsynth made with Overtone with these sliders using OSC. > > Anyway, good luck with your project! Here is the current pitch I am working with without recompiling the binary, so obviously not taking modifier keys or timings at the moment. Also, no strategy yet for encoding key-release events. You just call M-x midikbd-open RET, specify a raw midi device (if necessary, provided by the snd-virmidi module), and then you can choose yourself how you are going to bind the resulting key events.