mididb - Create, maintain and query a melodic index for MIDI files
mididb [options] COMMAND [parameters]
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).
The following options are supported:
mididb -f lead.mdb -x findmidi query.mid
-a Use summary file (for analysis functions)
time The start time (in milliseconds) of the segment to use. Does not apply to all commands Default: 'start of the file'
classifier The part classifier to use. Default:
hybrid, other options are:
factory The database factory to use (e.g.
time The end time (in milliseconds) of the segment to use. Does not apply to all commands. Default: 'end of the file'
file Specify a different database filename. Has no effect on non-DB operations. Default:
distance Specify how similar a contour must be over the entire query. Default:
-h Displays help similar to this page.
-i Perform validation of search results (if useful).
size Define the number of pitch directions per atomic unit. Note - this only applies to db creation, 'lc' and 'qeg'. Default:
distance Specify how similar a contour must be per atomic unit. Default:
mapping Specify the contour map to use. Available maps are:
limit Define the limit on near match set for contours. Default:
part Specify a part of the midi file to use in the operation. Valid parts are:
lead. Default is to use everthing but drums.
nths Specify the 1/nths of a note to quantise input midi to. Note - set to
0 to prevent quantisation. Default:
limit Define the limit on the number of matches returned. Note - this applies to DB search and time indexing. Default:
value Specify a value for operations which require parameters.
-x Enable extended functionality of some 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]
- Add a MIDI file to the database.
- [addlist | al]
- Add a list of MIDI files to the database.
- [makelink | ml]
- Add a link to the database.
- [create | cr]
- Create a database.
- [find | f]
- Search the database for the contour.
- [findmidi | fm]
- Search the database using a MIDI file as the query.
- [follow | fo]
- 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]
- Displays the part classification of the tracks in the file.
- [contours | co]
- Displays full file info - including contours. The -b and -e options can be used to specify a segment of the file.
- [nearmatch | nm]
- Displays the near match set for this contour.
- [savemidi | sm]
- 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]
- Displays the tempo map for the MIDI file.
- [timeindex | ti]
- Displays the time indexes of contours in the MIDI file.
- [timeindexmidi | tim]
- Same as timeindex, using a MIDI file as the query.
- Defragment chains in the database file. Also currently has no standard feedback to user (just sits there).
- Outputs the least popular contours based on hits and chains. The -v switch defines the size of the chart to compile.
- [distgraph | dg]
- 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]
- Outputs stats, suitable for graphing, which shows the frequency of database matches and uniqueness of contours.
- [ffreqgraph | ffg]
- 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.
- Outputs the most popular contours based on hits and chains. The -v switch defines the size of the chart to compile.
- [qexpgraph | qeg]
- Analyse the size of expanded queries (for the given atomic length).
- [accuracy | acc]
- Evaluate the accuracy of the database. Uses the current search parameters.
- [describe | desc]
- Describe a set of midi files, as listed in the input file.
- [evalqexp | eqx]
- 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]
- Evaluate the time taken to perform a search (uses the given database). The -v switch defines the time limit for the test (in minutes).
- Implemented by midi_db_main.cpp.
Copyright ©1996-2006 Steven Blackburn - About
MaART - MaART on