From bf4ab6962d0aa471d1906c66041b0f45f8e0391f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 3 Jun 2013 16:24:41 -0500 Subject: audio/lsmi: Added (map device input to ALSA MIDI sequencer events) Signed-off-by: Robby Workman --- audio/lsmi/man/lsmi-joystick.1 | 83 ++++++++++++++++++++ audio/lsmi/man/lsmi-keyhack.1 | 90 +++++++++++++++++++++ audio/lsmi/man/lsmi-monterey.1 | 172 +++++++++++++++++++++++++++++++++++++++++ audio/lsmi/man/lsmi-mouse.1 | 100 ++++++++++++++++++++++++ 4 files changed, 445 insertions(+) create mode 100644 audio/lsmi/man/lsmi-joystick.1 create mode 100644 audio/lsmi/man/lsmi-keyhack.1 create mode 100644 audio/lsmi/man/lsmi-monterey.1 create mode 100644 audio/lsmi/man/lsmi-mouse.1 (limited to 'audio/lsmi/man') diff --git a/audio/lsmi/man/lsmi-joystick.1 b/audio/lsmi/man/lsmi-joystick.1 new file mode 100644 index 0000000000000..72bb02ab80fb8 --- /dev/null +++ b/audio/lsmi/man/lsmi-joystick.1 @@ -0,0 +1,83 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LSMI-JOYSTICK 1 "May 15, 2012" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME + +lsmi-joystick \- Linux Pseudo MIDI Input -- Joystick +.SH SYNOPSIS +.B lsmi-joystick +.RI [ options ] " files" ... +.SH DESCRIPTION + +This driver allows any joystick supported by the Linux joydev interface to +be used as a MIDI pitch/modulation controller. Of course, some joysticks are +more suitable than others. I use an old analog flight stick. Holding down +button 1 causes the vertical axis to send pitchbend messages, while button 2 +causes the vertical axis to send modulation messages. Holding down both +buttons causes the vertical axis to send pitchbend messages and the +horizontal axis to send modulation messages. + +.SH USAGE + +Distribution specific init scripts are not included. The drivers may be +started from init, your .bashrc, by qjackctl, etc. In order to be run by a +non-root user the drivers must have access to the device files in /dev/input. +This may be accomplished by adding a group 'input', adding desired users to +this group, and configuring udev to assign the appropriate ownership to files +in /dev/input. It should be perfectly safe to run the drivers as root, +however. + +For realtime scheduling (the \-R option), either use set_rlimits, or set the +appropriate POSIX capabilities on the executable: +.P +/sbin/setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/lsmi-joystick +.P +The lsmi.SlackBuild script already includes RT scheduling support. + +.SH OPTIONS +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-d, \-\-device specialfile +Event device to use (instead of js0). +.TP +.B \-R, \-\-realtime rtprio +Use realtime priority 'rtprio' (requires privs). +.TP +.B \-v, \-\-verbose +Be verbose (show note events). +.TP +.B \-p, \-\-port client:port +Connect to ALSA Sequencer client on startup. +.TP +.B \-n, \-\-no-hold +Send controller data even when no joystick button is held. +.TP +.B \-z, \-\-daemon +Fork and don't print anything to stdout. +.SH SEE ALSO +.BR lsmi-keyhack (1), +.BR lsmi-monterey (1), +.BR lsmi-mouse (1). +.br +.SH AUTHOR +lsmi was written by Jonathan Moore Liles. +.PP +This manual page was written by Ariel Errera , +for the Debian project (but may be used by others). It was then modified +by B. Watson for the SlackBuilds.org project. diff --git a/audio/lsmi/man/lsmi-keyhack.1 b/audio/lsmi/man/lsmi-keyhack.1 new file mode 100644 index 0000000000000..17a932c4bb9f8 --- /dev/null +++ b/audio/lsmi/man/lsmi-keyhack.1 @@ -0,0 +1,90 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LSMI-KEYHACK 1 "May 15, 2012" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME + +lsmi-keyhack \- Linux Pseudo MIDI Input -- Keyboard Hack +.SH SYNOPSIS +.B lsmi-keyhack +.RI [ options ] " files" ... +.SH DESCRIPTION + +This driver is for a hacked AT / PS/2 keyboard functioning as a MIDI +controller. + +It is somewhat specific to the author's own hardware, but, since it relies a learning +capability rather than a fixed keymap, it should be equally useful for +others wishing to build their own fake MIDI keyboard. Of course, such a +keyboard will not be velocity sensitive, but this project is a good way to +salvage both an old QWERTY keyboard and a manual from a decrepit analog +organ or cheap PCM noise-maker. + +The driver supports up to 88 musical keys, three footswitches, and several +additional buttons for control and data entry. It has the rather unfortunate +side-effect of rendering the console useless, unless, of course you have +another (USB) keyboard to type on. + +.SH USAGE + +Distribution specific init scripts are not included. The drivers may be +started from init, your .bashrc, by qjackctl, etc. In order to be run by a +non-root user the drivers must have access to the device files in /dev/input. +This may be accomplished by adding a group 'input', adding desired users to +this group, and configuring udev to assign the appropriate ownership to files +in /dev/input. It should be perfectly safe to run the drivers as root, +however. + +For realtime scheduling (the \-R option), either use set_rlimits, or set the +appropriate POSIX capabilities on the executable: +.P +/sbin/setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/lsmi-joystick +.P +The lsmi.SlackBuild script already includes RT scheduling support. + +.SH OPTIONS +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-d, \-\-device specialfile +Event device to use (instead of event0). +.TP +.B \-R, \-\-realtime rtprio +Use realtime priority 'rtprio' (requires privs). +.TP +.B \-v, \-\-verbose +Be verbose (show note events). +.TP +.B \-c, \-\-channel n +Initial MIDI channel. +.TP +.B \-p, \-\-port client:port +Connect to ALSA Sequencer client on startup. +.TP +.B \-k, \-\-keydata file +Name file to read/write key mappings (instead of ~/.keydb). +.SH SEE ALSO +.BR lsmi-joystick (1), +.BR lsmi-monterey (1), +.BR lsmi-mouse (1). +.br +.SH AUTHOR +lsmi was written by Jonathan Moore Liles. +.PP +This manual page was written by Ariel Errera , +for the Debian project (but may be used by others). It was then modified +by B. Watson for the SlackBuilds.org project. diff --git a/audio/lsmi/man/lsmi-monterey.1 b/audio/lsmi/man/lsmi-monterey.1 new file mode 100644 index 0000000000000..67b365f0b5d70 --- /dev/null +++ b/audio/lsmi/man/lsmi-monterey.1 @@ -0,0 +1,172 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LSMI-MONTEREY 1 "May 15, 2012" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME + +lsmi-monterey \- Linux Pseudo MIDI Input -- Monterey +.SH SYNOPSIS +.B lsmi-monterey +.RI [ options ] " files" ... +.SH DESCRIPTION + +Monterey is a userspace driver for Monterey +International MK-9500 / K617W reversible keyboard. + +This device consists of a 104 QWERTY AT computer keyboard on one side and a +37 key, velocity sensitive musical keyboard on the other. In addition to +flipping the unit over, one must flip a switch on the right side in order to +change the mode. + +The keyboard interface is standard, except that the musical side sends +two-scancode packets for each piano key press and release ('make' codes +only). The first scancode indicates the note, the second the velocity: 7 +being the lowest, 1 the highest, and 0 representing a release (or sometimes +a very very light keypress). The musical side also has buttons for keys F1 +through F9, left and right arrow keys, and return--all generating 'make' +codes only with no way to register release. + +This driver creates an ALSA Sequencer port and attempts to fill it with +realtime MIDI data representing input from the musical side of the keyboard, +while passing regular textual data through the uinput interface and on to +Linux console or X Window System. There is no need to load a special +application or even run X in order to generate MIDI events: simply flip the +keyboard over and go nuts. The driver doesn't interfere at all with +multiple/international layouts. You can even use it along +side another (merged input) keyboard (ie. plugged into a laptop) and the +driver should be able to sort everything out (provided that you refrain from +typing on both keyboards simultaneously). + +.SH FUNCTION KEYS + +There's no reliable way to distinguish the function keys on the musical +side from those on the QWERTY side in order to map them to channel, +program change and so on. One solution is to interpret any function key +(including arrows and return) pressed within two seconds of the 'quaver' +key (F9) as a MIDI event. + +.TP +.B Program Change +The first four keys (I-IV) function as patch pages, each page able to +address 32 patches. To change to program number 2 (GM Bright Acoustic +Piano), first press QUAVER, then function key I, then press the second +piano key from the left (the first black key). + +.TP +.B Bank Change +Keys V-VIII work similarly to program change, but alter current bank +instead. Note that you won't see any effect until you change patches as +well. + +.TP +.B Channel Change and Octave Change +The arrow keys are used to change channel or octave. To lower or raise +the octave (from that of middle C) the octave, press QUAVER followed by +the appropriate arrow key. QUAVER may be ommitted between subsequent +arrow presses, if they occur within 2 seconds of each other. To change +the channel, press QUAVER followed by 'R' (return), then an arrow key. + +All of these heuristics are timing critical and might fail to operate under +heavy system loads. To ensure proper performance, use a high realtime +priority, like 99 (and it wouldn't hurt to do the same for your keyboard +controller's IRQ). + +.SH KNOWN ISSUES + +.TP +.B Events +For some reason the kernel event layer drops KEY events, mostly when +switching between a piano key and its associated text key. I believe this +is a due to a bug in the repeat state tracking code, exposed here because +the keyboard generates only 'make' scancodes on the musical side. The +driver works around this by tracking the MSC_SCAN events instead, but it's +kind of a hack and requires massaging the events more than I'm comfortable +with (might not work with PS2->USB adaptors, etc.) + +.TP +.B Repeat Rate +To prevent frustrating "stuck" repeats in X (the console doesn't appear to +suffer from this problem) the driver converts all REPEAT events it passes +to PRESSes. + +.TP +.B LEDs +The LEDs don't work. This little driver is the only example of a real +uinput filter I've seen. I'm not sure the kernel developers anticipated +the problem of managing the LEDs. Ideally it would be transparent. As it +is, it would probably take a large amount of code to get the keyboard LEDs +working again--which seems silly. + +.SH PREREQUISITES + +2.6 series kernel with evdev and uinput modules loaded. +ALSA Sequencer drivers and library. + +An MK-9500 or K617W keyboard... + +.SH USAGE + +Distribution specific init scripts are not included. The drivers may be +started from init, your .bashrc, by qjackctl, etc. In order to be run by a +non-root user the drivers must have access to the device files in /dev/input. +This may be accomplished by adding a group 'input', adding desired users to +this group, and configuring udev to assign the appropriate ownership to files +in /dev/input. It should be perfectly safe to run the drivers as root, +however. + +For realtime scheduling (the \-R option), either use set_rlimits, or set the +appropriate POSIX capabilities on the executable: +.P +/sbin/setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/lsmi-joystick +.P +The lsmi.SlackBuild script already includes RT scheduling support. + +.SH OPTIONS +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-d, \-\-device specialfile +Event device to use (instead of event0). +.TP +.B \-v, \-\-verbose +Be verbose (show note events). +.TP +.B \-p, \-\-port client:port +Connect to ALSA Sequencer client on startup. +.TP +.B \-R, \-\-realtime rtprio +Use realtime priority 'rtprio' (requires privs). +.TP +.B \-n, \-\-no-velocity +Ignore velocity information from keyboard. +.TP +.B \-c, \-\-channel n +Initial MIDI channel. +.TP +.B \-z, \-\-daemon +Fork and don't print anything to stdout. +.SH SEE ALSO +.BR lsmi-joystick (1), +.BR lsmi-keyhack (1), +.BR lsmi-mouse (1). +.br +.SH AUTHOR +lsmi was written by Jonathan Moore Liles. +.PP +This manual page was written by Ariel Errera , +for the Debian project (but may be used by others). It was then modified +by B. Watson for the SlackBuilds.org project. diff --git a/audio/lsmi/man/lsmi-mouse.1 b/audio/lsmi/man/lsmi-mouse.1 new file mode 100644 index 0000000000000..d7162d2489035 --- /dev/null +++ b/audio/lsmi/man/lsmi-mouse.1 @@ -0,0 +1,100 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LSMI-MOUSE 1 "May 15, 2012" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME + +lsmi-mouse \- Linux Pseudo MIDI Input -- Mouse +.SH SYNOPSIS +.B lsmi-mouse +.RI [ options ] " files" ... +.SH DESCRIPTION + +This driver is capable of generating a stream of MIDI controller and/or note +events from the state of mouse buttons. I have a MouseSystems serial mouse +controller board with footswitches wired to each of its three buttons. You +must have evdev and the kernel driver for your mouse type loaded (in my +case, this is sermouse). Mouse axes, wheels, or additional buttons are not +used (if you can think of something to do with them [rotary encoders for +filter and resonance?], then, by all means, let me know). + +I use this device to control Freewheeling and various softsynths. Much +cheaper than a real MIDI pedalboard, of this I assure you. + +.SH EXAMPLE + +Use mouse device "/dev/input/event4", mapping left button +to Controller #64, middle button to Note #36, and +right button to Note #37 (all on Channel #1): +.br +.B lsmi-mouse -d /dev/input/event4 -1 c:1:64 -2 n:1:36 -3 n:1:37 + +.SH USAGE + +Distribution specific init scripts are not included. The drivers may be +started from init, your .bashrc, by qjackctl, etc. In order to be run by a +non-root user the drivers must have access to the device files in /dev/input. +This may be accomplished by adding a group 'input', adding desired users to +this group, and configuring udev to assign the appropriate ownership to files +in /dev/input. It should be perfectly safe to run the drivers as root, +however. + +For realtime scheduling (the \-R option), either use set_rlimits, or set the +appropriate POSIX capabilities on the executable: +.P +/sbin/setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/lsmi-joystick +.P +The lsmi.SlackBuild script already includes RT scheduling support. + +.SH OPTIONS +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-d, \-\-device specialfile +Event device to use (instead of event0). +.TP +.B \-R, \-\-realtime rtprio +Use realtime priority 'rtprio' (requires privs). +.TP +.B \-v, \-\-verbose +Be verbose (show note events). +.TP +.B \-p, \-\-port client:port +Connect to ALSA Sequencer client on startup. +.TP +.B \-1, \-\-button-one 'c'|'n':n:n +Button mapping. +.TP +.B \-2, \-\-button-two 'c'|'n':n:n +Button mapping. +.TP +.B \-3, \-\-button-thrree 'c'|'n':n:n +Button mapping. +.TP +.B \-z, \-\-daemon +Fork and don't print anything to stdout. +.SH SEE ALSO +.BR lsmi-joystick (1), +.BR lsmi-keyhack (1), +.BR lsmi-monterey (1). +.br +.SH AUTHOR +lsmi was written by Jonathan Moore Liles. +.PP +This manual page was written by Ariel Errera , +for the Debian project (but may be used by others). It was then modified +by B. Watson for the SlackBuilds.org project. -- cgit v1.2.3