Git Product home page Git Product logo

emaccordion's Introduction

Emaccordion

Control your Emacs with an accordion — or any MIDI instrument!

A video demo is coming soon… meanwhile, see https://twitter.com/ykarikos/status/1038145486618861573

You only need a computer running Linux or BSD with OSS (or ALSA emulation of OSS), some MIDI instrument, and Emacs (version 24.3 or later - for cl-lib).

You can e.g. plug in a MIDI pedalboard (like one in a church organ) for modifier keys (ctrl, alt, shift); or you can define chords to trigger complex commands or macros.

2018-09-11, version 0.0.9.

Configuration

Connect the MIDI instrument.

Modify the emaccordion.el file as follows.

Make sure the emaccordion-midi-device-pathname points to the correct OSS midi device.

If you want some of your MIDI instrument keys to behave like control, meta, shift, hyper, super or alt keys, modify the table emaccordion-note-to-modifier. Edit that to suit your purposes. This is a list containing a mapping from MIDI channel and note to a modifier. The possible modifiers are :alt (which is probably not what your keyboard’s “Alt” issues), :super, :hyper, :shift, :ctrl and :meta (which is typically keyboard’s “Alt”).

Matching chords to characters or macros or functions is configured with emaccordion-chord-actions, so edit that to your liking. Chords (which can also be just one note) are defined as a list of MIDI channel and note. Action can be:

  1. a character in Emacs format (e.g. ?a for lowercase a, or ?✈ for Unicode airplane character) to input that character
  2. anything that satisfies functionp and commandp (e.g. interactive function like emacs-uptime)
  3. vector or a string, see execute-kbd-macro

If a MIDI key has both a modifier and a chord definition, the modifier key definition takes precedence. Hence, chords with that key will not work as intended.

Emaccordion is still under construction, so the configuration isn’t as user-friendly as it should be. This should be improved.

Running emaccordion

Load the emaccordion.el you modified. Start the MIDI reader process by calling emaccordion-create-midi-reading-process. Then just start typing.

The buffer *emaccordion-events* is updated with received events. This may help with troubleshooting.

Detailed documentation

See file documentation.org for a more thorough technical exposition.

Acknowledgements, links to related work

The idea for the whole thing came from EmacsWiki: https://www.emacswiki.org/emacs/EmacsMidi. I immediately became totally convinced that a full-size chromatic button accordion with its 120 bass keys and around 64 treble keys would be the epitome of an input device for Emacs.

The video has been inspired by Yuri Charyguine’s awesome Moscow Nights: https://www.youtube.com/watch?v=ajUtVyGv7ss. The video also refers to “Emacs Rocks!” series by Magnar Sveen, which I highly recommend: http://emacsrocks.com/

There’s another Emacs MIDI library, written by David Kastrup: https://elpa.gnu.org/packages/midi-kbd.html.

TODO-list

Here’s a brief list of what needs to be improved.

  • Implement the various user-configurable parameters with defcustom.

Author

Janne Nykopp <[email protected]>

License

GNU General Public License Version 3, 29 June 2007

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.