MIDI Database for Content-Based Retrieval

Name

mididb - Create, maintain and query a melodic index for MIDI files

Synopsis

mididb [options] COMMAND [parameters]

Description

Create, maintain and query a melodic index for MIDI files.

First, an index must be created. The following creates an index called lead.mdb using 10 pitch directions and secondary contours.

mididb -f lead.mdb -k 10 -x create

Files are then added to the index. It is possible to use a classifier to select parts of the file to add. Here, the lead parts of file.mid, as determined by the hybrid classifier, are added to the index.

mididb -f lead.mdb -c hybrid -p lead add file.mid

The index can then be queried. The following example uses a midi file with the secondary contour (which gives more specific results but requires a more accurate query).

mididb -f lead.mdb -x findmidi query.mid

Options

The following options are supported:

-a Use summary file (for analysis functions)

-b time The start time (in milliseconds) of the segment to use. Does not apply to all commands Default: 'start of the file'

-c classifier The part classifier to use. Default: hybrid, other options are: stats; net and knearest

-d factory The database factory to use (e.g. onix ).

-e time The end time (in milliseconds) of the segment to use. Does not apply to all commands. Default: 'end of the file'

-f file Specify a different database filename. Has no effect on non-DB operations. Default: sbh

-g distance Specify how similar a contour must be over the entire query. Default: 2

-h Displays help similar to this page.

-i Perform validation of search results (if useful).

-k size Define the number of pitch directions per atomic unit. Note - this only applies to db creation, 'lc' and 'qeg'. Default: 12

-l distance Specify how similar a contour must be per atomic unit. Default: 2

-m mapping Specify the contour map to use. Available maps are: dowling; extended; alphabet. Default: dowling

-n limit Define the limit on near match set for contours. Default: 20000

-p part Specify a part of the midi file to use in the operation. Valid parts are: acc; bass; drums and lead. Default is to use everthing but drums.

-q nths Specify the 1/nths of a note to quantise input midi to. Note - set to 0 to prevent quantisation. Default: 32

-r limit Define the limit on the number of matches returned. Note - this applies to DB search and time indexing. Default: 50

-v value Specify a value for operations which require parameters.

-x Enable extended functionality of some commands.

Commands

Most commands are have a full and a short version, i.e. both add and a are commands to add a file to a database. They are not case sensitive. Commands supported are:

[add | a] MIDI_file
Add a MIDI file to the database.
[addlist | al] List_file
Add a list of MIDI files to the database.
[makelink | ml] MIDI_file Destination
Add a link to the database.
[create | cr]
Create a database.
[find | f] contour
Search the database for the contour.
[findmidi | fm] MIDI_file
Search the database using a MIDI file as the query.
[follow | fo] contour
Search the database links pertaining to the contour.
[calcexpand | ce]
Display the estimates for the sizes of expanded queries. The -v option specifies the size of the query to consider.
[classify | cl] MIDI_file
Displays the part classification of the tracks in the file.
[contours | co] MIDI_file
Displays full file info - including contours. The -b and -e options can be used to specify a segment of the file.
[nearmatch | nm] contour
Displays the near match set for this contour.
[savemidi | sm] Input_MIDI_file Output_MIDI_file
Performs all standard processing on the input and then saves it. This is primarily useful as a debug tool - to be sure of what is being used to query or add to the database.
[showparams | sp]
Displays the architecture of the DB.
[tempomap | tm] MIDI_file
Displays the tempo map for the MIDI file.
[timeindex | ti] MIDI_file contour
Displays the time indexes of contours in the MIDI file.
[timeindexmidi | tim] MIDI_file contour
Same as timeindex, using a MIDI file as the query.
defrag destination-file
Defragment chains in the database file. Also currently has no standard feedback to user (just sits there).
bottom output_file
Outputs the least popular contours based on hits and chains. The -v switch defines the size of the chart to compile.
[distgraph | dg] output_file
Outputs stats, suitable for graphing, which shows the distribution of matches across the database. The -v switch gives the resolution of the graph.
[freqgraph | fg] output_file
Outputs stats, suitable for graphing, which shows the frequency of database matches and uniqueness of contours.
[ffreqgraph | ffg] output_file
Similar to freqgraph but simulates query expansion. The -v switch defines the percentage (1-100) of the database to sample.
[listcontours | lc]
Displays a list of all possible contours (for the given atomic length).
[mksummary | ms]
Makes a summary file which can be used for some analysis functions.
top output_file
Outputs the most popular contours based on hits and chains. The -v switch defines the size of the chart to compile.
[qexpgraph | qeg] output_file
Analyse the size of expanded queries (for the given atomic length).
[accuracy | acc] query_file output_file
Evaluate the accuracy of the database. Uses the current search parameters.
[describe | desc] input_file output_file
Describe a set of midi files, as listed in the input file.
[evalqexp | eqx] output_file
Evaluate the time taken to perform query expansion (for the given atomic length). The -v switch defines the time limit for the test (in minutes). The -x switch indicates that brute force matching should be used.
[timefind | tf] output_file
Evaluate the time taken to perform a search (uses the given database). The -v switch defines the time limit for the test (in minutes).
Remarks:
Implemented by midi_db_main.cpp.

Copyright ©1996-2006 Steven Blackburn - About MaART - MaART on SourceForge