emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integrating Midi into Emacs


From: David Kastrup
Subject: Re: Integrating Midi into Emacs
Date: Wed, 14 Jan 2015 12:20:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Niels Giesen <address@hidden> 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: midi-kbd.el
Description: application/emacs-lisp

Attachment: lily-midi.el
Description: application/emacs-lisp


-- 
David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]