midifade


NAME

midifade - Provides faders generating midi-controller events


SYNOPSIS

 midifade c13m71v120 c2m11v80 # 2 faders: cha2 cc11=80, cha13 cc71=120
 midifade -o 128:0            # outputs to port 0 of client 128
 midifade -N fade1            # sets Alsa-Client name to "fade1"
 midifade -v                  # prints the Version number
 perldoc midifade             # read the manual :-)

DESCRIPTION

Midifade is a Curses and ALSA application which provides on-screen faders, to control various midi-controllers on various midi-channels.

It uses a simple user-interface: The Left and Right arrow keys move from one fader to the next, the Up and Down arrow keys adjust the value of the current fader by 1, the PageUp and PageDown keys adjust the value by 10, and the Home and End keys set it to maximum (127) or minimum (0).

The faders are always displayed sorted by channel-number then by midi-controller-number.

The available keystrokes are displayed in the bottom three lines of the screen.

Two versions are available, one in Perl and one in Lua, which should behave identically.
The Perl version uses the Curses CPAN module for the user-interface, and the MIDI::ALSA CPAN module to set up an ALSA client which can communicate with your synth.
The Lua version uses the minicurses Lua module for the user-interface, and the midialsa luarocks module to set up an ALSA client which can communicate with your synth.


OPTIONS

-o 128:0   or  -o TiMidity

These examples play into the ALSA port 128:0, or into the TiMidity client. This option allows midifade to use the same port-specification as the other alsa-utils, e.g. aplaymidi and aconnect. For port 0 of a client, the ":0" part of the port specification can be omitted. The port specification is taken from the ALSA_OUTPUT_PORTS environment variable if none is given on the command line.
Since Version 1.3, you may supply a comma-separated list of ports, e.g. -o 20,128:1

If the ALSA port is specified as 0 then midifade will start up without connecting to anything. This allows you, for example, to use midifade in one xterm (assumed here to be starting up as ALSA-client 129 ; check with aconnect -ol) to control ecasound in another xterm:

 midifade -o 0 -N fade2 c0m9v102 c1m9v105 c2m9v96 c3m9v64
 ecasound -c -r -Md:alsaseq,fade2 \
  -a:1 -i drums.wav                -ea:200 -km:1,0,250,9,1 \
  -a:2 -i synth-chords.wav -epp:30 -ea:120 -km:1,0,150,9,2 \
  -a:3 -i bass-guitar_take-2.ewf   -ea:75  -km:1,0,100,9,3 \
  -a:4 -i brass-lead.wav   -epp:70 -ea:50  -km:1,0,100,9,4 \
  -a:1,2,3,4 -o loop,1 \
  -a:5,6 -i loop,1 \
  -a:5 -o alsa \
  -a:6 -o current-mix.wav

Here I chose midi-controller 9 because it isn't defined in General-MIDI, and therefore General-MIDI-labels, useless in this context, do not appear in the midifade screen.

Note that ecasound numbers the channels 1 to 16, whereas midifade numbers them 0 to 15.
See ecasound_manpage.html and examples.html in the ecasound documentation for details of the -ea and -km options.

-N my_name

Sets the Alsa-Client name, to my_name in this example.
This is useful in scripts, to be able to connect from a particular midifade by a known name.

The default Alsa-Client name is "midifade"

-v

Prints version number.


ARGUMENTS

c14m74v123

This example starts midifade up with a fader on channel 14 (0..15), midi-controller 74 (0..127), set initially to a value of 123 (0..127). (In muscript, that would be expressed cha14 cc74=123).   Multiple arguments can be specified.   The c and m and v bits must be in that order, all in one word with no spaces.   The v bit is optional; its default value is 64.


INSTALLATION

The current versions of midifade are available
    at pjb.com.au/midi/free/midifade_pl for Perl,
    and pjb.com.au/midi/free/midifade_lua for Lua.
To install one, save it to disc, change its name to midifade, move it into your $PATH, make it executable,
and if necessary edit the first line to reflect where perl or lua might be installed on your system.

You will also need to install either the MIDI::ALSA and Curses CPAN modules for the Perl version,
or the midialsa and minicurses luarocks modules for the Lua version.


CHANGES


2.1, 20211228, midifade_lua now available
2.0, 20150809, a new fader with val=0 does not get given val=64
1.9, 20140907, -N my_name   sets the AlsaClientName
1.8, 20130323, keystroke D can now delete the only fader
1.7, 20120831, -o "string" works
1.6, 20120820, display_clientstr called at start
1.5, 20111201, if -o 0 then midifade starts up but connects to nothing
1.4, 20111103, uses the new MIDI-ALSA 1.11 to handle ALSA-ports by their names
1.3, 20111028, OutputPort can be a comma-separated list
1.2, 20111027, add-new-fader dialogue allows 3-digit controller-nums
1.1, 20111023, much irrelevant code eliminated; q asks y/n first
1.0, 20111022, first working version


AUTHOR

Peter J Billam https://pjb.com.au/comp/contact.html


CREDITS

Based on the Curses and MIDI::ALSA CPAN modules,
or on the minicurses and midialsa luarocks modules.


SEE ALSO

 aconnect -oil
 http://www.pjb.com.au/muscript/index.html#midi_in_a_stave
 http://www.pjb.com.au/muscript/gm.html#cc
 http://ecasound.sourceforge.net/ecasound/Documentation/examples.html
 http://search.cpan.org/perldoc?Curses
 http://search.cpan.org/perldoc?MIDI::ALSA
 http://www.pjb.com.au/midi