From: David Kastrup <dak@gnu.org>
To: Niels Giesen <niels.giesen@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Integrating Midi into Emacs
Date: Wed, 14 Jan 2015 12:20:53 +0100 [thread overview]
Message-ID: <87zj9lfw16.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <878uh5hc1t.fsf@fencepost.gnu.org> (David Kastrup's message of "Wed, 14 Jan 2015 11:49:34 +0100")
[-- Attachment #1: Type: text/plain, Size: 1896 bytes --]
David Kastrup <dak@gnu.org> writes:
> Niels Giesen <niels.giesen@gmail.com> writes:
>
>> Hi David,
>>
>> This looks really cool to me. I tried to use your code, but cannot for the
>> life of me find out how to bind functions to those events. Could you give a
>> simple example?
>
> Well, this is work in progress. I've been tripped up by quirks of the
> raw Midi spec: to make things more challenging, it allows inserting
> foreign command bytes ("realtime events") in the middle of other
> commands. And it allows leaving off command bytes altogether ("running
> status byte"). When accessing Midi devices through libraries or the
> Midi API, those peculiarities are taken care off, but not so with the
> raw Midi stream.
>
> I'm appending the current files I am working with. They are _not_ a
> finished application yet. The midikbd module produces events. The
> decoding framework should now be working reliably, but currently only
> the events I am interested in working with get produced. And the
> lily-midi module integrates this into LilyPond-mode, assuming that it
> has already been loaded (again: work in progress, so load order,
> autoloads etc are all not in place). The notenames are hardwired to
> dutch, channel changes are not currently used, timing is not recorded
> and so on. The last thing I did was implementing a recording key
> signature so that pitches are produced with accidentals chosen in a
> useful relation to the key signature.
>
> The long pitch would be to use libmidiport in Emacs proper, and produce
> both key up and down events (with at least the up events ignored by
> default) and full timing info, similar to mouse events. Most of this
> (apart from the default binding behavior) can probably be presimulated
> by extending midi-kbd.el, but the precision of the timing would likely
> suffer.
Oh fiddlesticks. Should have appended the files.
[-- Attachment #2: midi-kbd.el --]
[-- Type: application/emacs-lisp, Size: 6444 bytes --]
[-- Attachment #3: lily-midi.el --]
[-- Type: application/emacs-lisp, Size: 4509 bytes --]
[-- Attachment #4: Type: text/plain, Size: 20 bytes --]
--
David Kastrup
next prev parent reply other threads:[~2015-01-14 11:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 11:28 Integrating Midi into Emacs David Kastrup
2015-01-02 13:24 ` davi
2015-01-02 21:11 ` Christopher Allan Webber
2015-01-03 9:27 ` David Kastrup
2015-01-09 21:21 ` joakim
2015-01-09 21:59 ` David Kastrup
2015-01-10 8:32 ` joakim
2015-01-14 9:42 ` Niels Giesen
2015-01-14 10:49 ` David Kastrup
2015-01-14 11:20 ` David Kastrup [this message]
2015-01-09 22:06 ` David Kastrup
2015-01-10 8:28 ` joakim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zj9lfw16.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=niels.giesen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).