imidiacy - record MIDI files from the PC keyboard
Record a MIDI music file from the PC keyboard rather than a musical keyboard. The files are Type 0, meaning that all events occur on the same MIDI channel. It has the ability to change tempo and volume. The output of imidiacy may be synthesized with a sequencer, or revised with a music editor.
A type 0 midi file is written to the working directory at the end of a session. In addition, the name A-G# of the note presently sounding appears in the console window. Its tone is heard on the PC speaker, if available.
Imidiacy requires the development version of the ncurses library. Install that first. Then, compile with the command:
user@host$ gcc -O3 -lm -lncurses -o bin_path/imidiacy bitwise.c speaker_fns.c term_fns.c record.c program.c
To get access to /dev/console for speaker access, issue as root:
root@host# chown root path/imidiacy root@host# chmod u+s path/imidiacy
To get access to the PC speaker, the program must open /dev/console, which requires that it be installed setuid root. Note that this is a critical security hole. Users on computer systems where security is a concern should not do this. This program will still run, in silence.
user@host$ imidiacy
A few simple dialogs are then asked of the user prior to recording:
Channel numbers are in the range 1-16. It doesn't matter much which channel you choose, unless you enter 10. By convention, this is the MIDI drum channel and instead of hearing different pitches of a particular instrument, you will hear different drums from a particular drum kit.
Note that 100 beats per minute is typical pop, 70 is slow, and 150 is upbeat.
Velocity ranges from 1 to 127. Bigger numbers are louder.
The legato setting determines the length of the note, as a fraction of the time between from one keystroke to the next. The allowed range is 0.5 to 1.0. Small numbers are staccato, and big numbers are legato.
For key signature, remember the circle of fifths. So, calling flats negative:
-7 = CbIt is OK to just enter 0 here. Key signature affects only the way the sound is written, not how it is heard.
For time signature, enter 4 for march time, 3 for waltz, or 2, 5, 6, 7 for something more exotic. Note that this affects only the way the sound is written, not how is is heard. Although MIDI supports changing the timebase from 1 quarter note to 1 beat, this has not been implemented. This means the only time signatures which may be created with imidiacy are 2/4, 3/4, 4/4, 5/4, 6/4, and 7/4.
In the recording mode, the US PC keyboard has been used. Each letter and digit, plus period (.), comma (,), slash (/), and semicolon (;) represents a different pitch. Press Shift to lower everything by an octave. The right arrow key increases tempo (the way it will be written. It has no effect on your performance of the tune, which is recorded in real time). The left arrow key decreases tempo. The up arrow key increases volume. (This does have an effect on how your tune will sound.) The down arrow key decreases volume. Press Home to increase the spacing between notes (you will not hear a difference until you play back the file with a sequencer.) Press the End key to make the notes run more smoothly together. To silence one note without beginning another, press the spacebar. When you are finished recording, press Backspace, Escape, or F1.
To assist you, the PC speaker will sound the present tone. The monitor will also show a capital letter and sharp or flat, placed on the screen left to right to represent pitch, and up or down to represent volume.
After recording, there are more dialogs. The title of the tune will be used for a filename and should contain only letters and numbers. (Otherwise a default filename will be used.) CAUTION: If the name already exists, the old file will be overwritten.
To select a patch (synthesized instrument sound), enter the number. Here's a list of the 128 MIDI patches.
***********************************************************************For reference, here is a list of drums (what you hear when you choose channel 10). The numbers here are not patch numbers, they are MIDI note numbers. Each half-step is a new MIDI note number, where middle C is 60. So then pressing each key on the keyboard is like playing a different drum from a drum set
***********************************************************************timidity 2.13.2 | works |
rosegarden 12.04 | works |
muse 2.0 | works |
LMMS 0.4.10 | works |
qtractor 0.5.5 | works |
The program has been tested on a single personal computer. Many incompatibilities are possible. Only a single melody may be recorded. PC speaker access is a SEVERE SECURITY RISK (see above).
Free to everyone subject to the terms of the GNU General Public License, version 2. A copy of the license should be included with the distribution, if not, write the Free Software Foundation:
59 Temple Place, Suite 330 Boston, MA 02111-1307 USA
or visit www.fsf.org