  NAME

   imidiacy - record MIDI files from the PC keyboard

  DESCRIPTION

   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.

  OUTPUT

   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.

  INSTALLATION AND DEPENDENCIES

   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

                      *** SECURITY WARNING: IMPORTANT ***

   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.

  USAGE

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 = Cb
   -6 = Gb
   -5 = Db
   -4 = Ab
   -3 = Eb
   -2 = Bb
   -1 = F
   0 = C
   1 = G
   2 = D
   3 = A
   4 = E
   5 = B
   6 = F#
   7 = C#

   It 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.
   ***********************************************************************
   1. Acoustic Grand Piano
   2. Bright Acoustic Piano
   3. Electric Grand Piano
   4. Honky-tonk Piano
   5. Electric Piano 1
   6. Electric Piano 2
   7. Harpsichord
   8. Clavi
   9. Celesta
   10. Glockenspiel
   11. Music Box
   12. Vibraphone
   13. Marimba
   14. Xylophone
   15. Tubular Bells
   16. Dulcimer
   17. Drawbar Organ
   18. Percussive Organ
   19. Rock Organ
   20. Church Organ
   21. Reed Organ
   22. Accordion
   23. Harmonica
   24. Tango Accordion
   25. Acoustic Guitar (nylon)
   26. Acoustic Guitar (steel)
   27. Electric Guitar (jazz)
   28. Electric Guitar (clean)
   29. Electric Guitar (muted)
   30. Overdriven Guitar
   31. Distortion Guitar
   32. Guitar Harmonics
   33. Acoustic Bass
   34. Electric Bass (finger)
   35. Electric Bass (pick)
   36. Fretless Bass
   37. Slap Bass 1
   38. Slap Bass 2
   39. Synth Bass 1
   40. Synth Bass 2
   41. Violin
   42. Viola
   43. Cello
   44. Contrabass
   45. Tremolo Strings
   46. Pizzicato Strings
   47. Orchestral Harp
   48. Timpani
   49. String Ensemble 1
   50. String Ensemble 2
   51. Synth Strings 1
   52. Synth Strings 2
   53. Choir Aahs
   54. Voice Oohs
   55. Synth Voice
   56. Orchestra Hit
   57. Trumpet
   58. Trombone
   59. Tuba
   60. Muted Trumpet
   61. French Horn
   62. Brass Section
   63. Synth Brass 1
   64. Synth Brass 2
   65. Soprano Sax
   66. Alto Sax
   67. Tenor Sax
   68. Baritone Sax
   69. Oboe
   70. English Horn
   71. Bassoon
   72. Clarinet
   73. Piccolo
   74. Flute
   75. Recorder
   76. Pan Flute
   77. Blown Bottle
   78. Shakuhachi
   79. Whistle
   80. Ocarina
   81. Lead 1 (square)
   82. Lead 2 (sawtooth)
   83. Lead 3 (calliope)
   84. Lead 4 (chiff)
   85. Lead 5 (charang)
   86. Lead 6 (voice)
   87. Lead 7 (fifths)
   88. Lead 8 (bass + lead)
   89. Pad 1 (new age)
   90. Pad 2 (warm)
   91. Pad 3 (polysynth)
   92. Pad 4 (choir)
   93. Pad 5 (bowed)
   94. Pad 6 (metallic)
   95. Pad 7 (halo)
   96. Pad 8 (sweep)
   97. FX 1 (rain)
   98. FX 2 (soundtrack)
   99. FX 3 (crystal)
   100. FX 4 (atmosphere)
   101. FX 5 (brightness)
   102. FX 6 (goblins)
   103. FX 7 (echoes)
   104. FX 8 (sci-fi)
   105. Sitar
   106. Banjo
   107. Shamisen
   108. Koto
   109. Kalimba
   110. Bag pipe
   111. Fiddle
   112. Shanai
   113. Tinkle Bell
   114. Agogo
   115. Steel Drums
   116. Woodblock
   117. Taiko Drum
   118. Melodic Tom
   119. Synth Drum
   120. Reverse Cymbal
   121. Guitar Fret Noise
   122. Breath Noise
   123. Seashore
   124. Bird Tweet
   125. Telephone Ring
   126. Helicopter
   127. Applause
   128. Gunshot
   ***********************************************************************

   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
   ***********************************************************************
   25. Snare Roll
   26. Snap
   27. High Q
   31. Sticks
   32. Square Click
   33. Metronome Click
   34. Metronome Bell
   37. Stick Rim
   38. Snare 1
   40. Snare 2
   42. Hi-Hat Closed
   44. Hi-Hat Pedal
   46. Hi-Hat Open
   49. Cymbal Crash 1
   51. Cymbal Ride 1
   52. Cymbal Chinese
   54. Tombourine
   55. Cymbal Splash
   56. Cow Bell
   57. Cymbal Crash 2
   58. Vibra-Slap
   59. Cymbal Ride 2
   60. Bongo High
   61. Bongo Low
   63. Conga High 2 Open
   64. Conga Low
   65. Timbale High
   66. Timbale Low
   67. Agogo High
   68. Agogo Low
   70. Maracas
   71. Whistle 1 High Short
   72. Whistle 2 Low Long
   73. Guiro 1 Short
   74. Guiro 2 Long
   76. Wood Block 1 High
   77. Wood Block 2 Low
   80. Triangle 1 Mute
   81. Triangle 2 Open
   82. Shaker
   84. Belltree
   ********************************************************************

  COMPATIBILITY

   timidity 2.13.2  works
   rosegarden 12.04 works
   muse 2.0         works
   LMMS 0.4.10      works
   qtractor 0.5.5   works

  CAVEATS

   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).

  AUTHOR

   Andy Allinger
   andy_a@users.sourceforge.net

  DATE

   source code: 2006 - 2007
   this documentation: 2016

  LICENSE

   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
