Ims

 

  idea
 
  examples
 
  programming
 
  download
   
  plans
 
  links
 
  author

 

   

 

 

 


   

                         ...and the CoDe that runs it.
                           

 

These particular programs are all written in 'Microsoft Visual Basic 6.0'. Visual Basic seems to be appropriate for this kind of programming since it handles COM interface really well, has great garbage-collection mechanism and is fairly simple to use. It is known to be the 'event-driven' language which is perfect for realtime applications of this kind. For complex projects, however, C++ would be more appropriate.

 

The structure of the IMS

The whole IMS system can be interpreted as three simple subsystems:

 
   

'Observe system' is where we analyze the midi performance and calculate our performance parameters. This procedure is usually reffered to as 'feature extraction'.

It calculates following performance parameters:

 
 - BPM tempo
 - Density of notes
 - Harmonic content
 - emotion parameter: anger
 - emotion parameter: fear
  However, all of them are being observed in two ways:
  • locally (at this very moment)
  • globally (within the whole song)

 

So, we actually have twice as much of them - the locals and the globals. The global parameters show the reference value, while the local parameters show the value in 'real-time', therefore the momentary declination of it.

  This is just an illustration of a 'tempo BPM' parameter changing over time. Notice that in the beginning the performer is playing with some tension therefore driving the song and raising the overall tempo. In the end, however, the performer is playing with a laid-back attitude consequently slowing down the tempo.
     

 

All these parameters are then used by the 'IMS engine' to calculate the appropriate actions to be performed, such as 'shaping the sound', 'triggering the ambient sounds', 'controling the rhythm section', etc.

The 'Control System' immediately executes those actions. It simply sends the appropriate MIDI events to the appropriate instruments.

Communication protocols

The comunication between the IMS and virtual midi drivers is performed via the COM interface. COM (component object model) is Microsoft's framework for developing and supporting program component objects. It allows different applications to share objects and make use of their internal functions and procedures.

 
   

This comunication procedure can only be used with applications that have a 'COM interface' (also called a 'COM server'). I use MidiOX as a host for my virtual midi drivers and luckily MidiOX does provide a COM interface.

                Set mox1 = CreateObject("MIDIOX.MoxScript.1")

This statement runs one instance of MidiOX and creates an object that represents it. All functions that MidiOX supports can now be called from my application using a statement like this:

                mox1_MidiInput('parameters')

Like this function - MidiInput for example - which simply inquires for midi input data so we can stream it directly into our application to extract our 'performance parameters' and so forth.