Improv is a C++ environment for writing
programs that enable musician/computer interaction using MIDI instruments.
Improv programs can be written in special pre-defined
environments, or
they can be written from scratch using just the basic MIDI
input and
output classes.
Example programs are provided which demonstrate how to use the
Improv library. The programs range from simple programs
such as one which switches the key number and attack velocity parameters
of a MIDI message (switch1)
to more complicated programs such as one which statistically analyzes
the input notes to estimate the musical key of the performance (keyan).
The example programs are sorted according to their use of
MIDI I/O connections. Each group of examples share a common
programming interface called an environment. There are two primary
interactive environments: one for MIDI keyboard interaction, called
synthImprov; and
another called
batonImprov to
allow interaction with a radio baton MIDI controller.
Also, there are example programs which do not need a pre-defined
environment because they do not even use MIDI I/O, or they use it
in a simple manner. These example are collected in the
improv examples directory.
Example programs in this category include
cinmidi which is
a MIDI input scope, and
midimixup which
smears the timing information in a standard MIDI file
and does not use MIDI I/O.
Compiled versions of some of the example programs can
be downloaded: [ Linux |
MS windows ]
More information about Improv can be found on the
Documentation page, and keyword searches
can be made on the Improv website from the
Improv search page.
Components
Portability
Currently, programs using the Improv library
run in the Windows 95/98/ME/NT/2000 and Linux operating systems with Intel
75 MHz Pentium CPU's or better. A compile-time definition is used
to specify which operating system is being used. For example,
the symbol LINUX is defined when compiling for Linux
operating systems, and VISUAL is used when compiling
for Windows 95/NT systems using Microsoft Visual C++.
The Improv programming environment is designed to be portable to
different computer operating systems. Porting Improv to other computer
systems would involve:
- writing a MIDI input class definition, named
MidiInPort_xxx, where xxx is the
system type. This class is inherited privately by
the class MidiInPort.
Example class definitions include:
MidiInPort_visual,
MidiInPort_linux, and
MidiInPort_unsupported.
- writing a MIDI output class definition, named
MidiOutPort_xxx, where xxx is the
system type. This class is inherited privately by
the MidiOutPort class.
Example os-specific class definitions include:
MidiOutPort_visual,
MidiOutPort_linux, and
MidiOutPort_unsupported.
- rewriting the SigTimer class
to get access to the computer's clock cycle count. Currently this class is
only usable on Pentium-based CPU's.
- There is also a KeyboardInput
class which handles single key presses from the computer keyboard.
This class is used to handle Windows 95/NT and Unix operating system
computer keyboard events in a uniform manner.
Library Class Overview
Here are brief descriptions of the C++ classes available in the library:
Most important are the set of classes which control access to Midi input and
output:
- MidiInPort -- basic high-level user access to MIDI input data.
- MidiOutPort -- basic high-level user access to MIDI output data.
The MidiInPort and MidiOutPort are very basic, and the two following classes
are intended to be the primary MIDI input/output interface:
- MidiInput -- adds useful functions to basic MidiInPort class.
- MidiOutput -- adds useful functions to basic MidiOutPort class.
The above classes depend on the following C++ classes which are used to
define access to MIDI input/output and are inherited privately:
Microsoft Windows with Windows Multimedia Library:
- MidiInPort_visual -- low-level MIDI Input access with winmm.lib.
- MidiOutPort_visual -- low-level MIDI Output access with winmm.lib.
Linux ALSA 0.9:
- Sequencer_alsa -- low-level MIDI I/O access for ALSA 0.9.
- MidiInPort_alsa -- low-level MIDI Input access for ALSA 0.9.
- MidiOutPort_alsa -- low-level MIDI Output access for ALSA 0.9.
Linux OSS:
- Sequencer_oss -- low-level MIDI I/O access for OSS.
- MidiInPort_oss -- low-level MIDI Input access for OSS.
- MidiOutPort_oss -- low-level MIDI Output access for OSS.
Dummy MIDI access:
- MidiInPort_unsupported -- fake MIDI Input access.
- MidiOutPort_unsupported -- fake MIDI Output access.
Linux with both ALSA and OSS:
- MidiInPort_linux -- low-level MIDI Input access for both OSS and ALSA.
- MidiOutPort_linux -- low-level MIDI Output access for both OSS and ALSA.
The classes MidiInPort and MidiOutPort are inherited by several other
classes, including:
- MidiPort -- combines MidiInPort and MidiOutPort into one class.
- MidiIO -- combines MidiInput and MidiOutput classes.
Classes for special MIDI devices:
- RadioBaton -- for use with Max Mathew's Radio Baton MIDI controller.
- Synthesizer -- convenience class for reading notes from a synthesizer.
- AdamsStick -- for use with Interval Corp.'s Talking Stick prototype.
- Voice -- convenience class for keeping track of note-offs.
MIDI file reading/writing classes:
- MidiFile -- Main MIDI file reading/writing class.
- MidiFileWrite -- Used for writing real-time midi output to a file.
Keyboard classes used to standardize keyboard hit programming interface
between Unix and Windows:
- KeyboardInput -- user interface to key hits.
- KeyboardInput_unix -- Unix-specific implementation.
- KeyboardInput_visual -- Windows-specific implementation.
Utility classes:
- Collection -- array which can dynamically grow and has bounds check.
- Array -- variant on the Collection class for numerical data.
- CircularBuffer -- Input buffer implementation for MidiInput data.
- FileIO -- fstream related class used for MidiFile class.
- SigTimer -- timing class for MidiInput and improv environments.
Classes for "Event Buffering" (see example program gliss.cpp for
example usage):
Miscellaneous classes:
- Idler -- used to be nice in multi-tasking operating systems.
- LineDisplay -- somewhat useless line display class.
- MidiMessage -- information packet for MidiInput messages.
- Nidaq -- National Instruments Digital Acquisition card interface.
- Options -- very useful command-line option handler.
- Performance -- Midi output for sorted data.
- PerformData -- used in Performance class.
- PerformDataRecord -- used in PerformData.
- MidiPerform -- similar to Performance class.
|