MIDI2GMN 1.0 (FERMATA) Overview 1. Introduction 2. New Features 3. Calling Syntax 4. Tempo Detection 5. Quantization 6. Pattern Matching 7. The Syntax Of FERMATA.INI, DEFAULT.PAT 8. Version History and Future Plans 9. Credits & References 1. Introduction midi2gmn was written 1998-2000 by Juergen Kilian as part of the GUIDO toolkit. It converts Standard MIDI files into GUIDO Music Notation. The new version 1.0 includes improved features of version 0.4 and powerfull new features (some as prototype implementations). For questions and problem reports, please contact Juergen Kilian (kilian@iti.informatik.tu-darmstadt.de). 2. new features since 0.4 - improved MIDI meta-event handling - supports .ini file for specifying parameter values - support of multiple filenames - improved voice separating algorithem - tempo detection (prototype) - inferring of \slur and \stac - key detection - chord detection (prototype) - ornament detection (prototype, using k-Nearest Neighbour approach) Because the current GUIDO NoteViwer does not support ornaments, all detected ornaments are written as \text<"ornamentType"> into the GUIDO output. This will be changed with the next release! 3. Calling syntax a) midi2gmn [options] Input filename will be taken from FERMATA.INI b) midi2gmn [options] Reads and converts file .mid into .gmn c) midi2gmn [options] Reads and converts file .mid ... .mid into .gmn ... .gmn The following options can be used in commandline: -d Relation between played and notated note-duration Example: midi2gmn -d90 -> played note-durations are 90% of written durations See also section 7:PLAYDURATION -h Display commandline options All not specified parameters/options will be taken from FERMATA.INI For the description of the fermata.ini parameters see section 7. 4. Tempo Detection midi2gmn v1.0 offers two methods for tempo detection: a) based on clicktrack MIDI-Events of a single track or a single MIDI channel can be used as virtual metronome clicks. Every event will be recognized as a tactus-level beat. From these tactus beats the tempo profile will be calculated. Parameters in fermata.ini (see also Section 7): DETECTTEMPO=CLICKTRACK ;set tempo detection on CLICKTRACK=n ;clicktrack number [CLICKCHANNEL=1..16 ;0==none] TACTUSLEVEL=n/d ; n/d = note-duration aof a single metronom beat b) based on statistical analysis The 'one' of each bar must be emphasized (intensity) in one or more voices. By using the given time-signature (meter), the tempo-profile can be calculated. Parameters in fermata.ini: DETECTTEMPO=STATISTICS METER=n/d ;time signature of piece 5. Quantization To allow multiples of durational values for attackpoints and durations, DEFAULT.MSK is used. This file includes two entries ATTACKS=noteface1,...,notefaceN DURATIONS=noteface1,...,notefaceN The noteface values are separated by ',' spaces are not allowed!!! Example: ATTACKS=1/2,1/4,1/16 DURATIONS=1/2,1/4,1/8 6. Pattern matching To improve the quantization quality (mainly the durations), a pattern matching algorithm can be activated. The rhythmic pattern can be defined in "default.pat". midi2gmn uses only pattern of the same length for pattern matching. If pattern of different lengths occur in default.pat, the user will be asked for the pattern length to use. The pattern length should be equal to the barlength of the piece. To use the pattern matching features, "PATTERN" must be set to "ON" in 'fermata.ini' Syntax of default.pat: - each pattern is represented in a single line - remarks are marked by ";" (until line end) - Pattern are defined by the noteface values of the note durations - rests are marked with "_" Example: 1/4 1/4 1/4 1/4 ;remark 1/8 1/8 1/4 1/4 1/4 _*1/8 1/8 1/4 1/4 1/4 7. The Syntax of the FERMATA.INI Initialisation File The file contains settings for all parameters used by midi2gmn. The parameter names must start a line and are separated from their values by '='. Remarks start with ";" and last until the end of line. Parameters: FILENAME description: filename(s) of input MIDI-File(s) val: filename1,..,filenameN remark: separated by "," no whitespaces allowed!!! PLAYDUDATION description: relation between played and notated noteface values val: 0.0 - 1.99 or 0 - 199 remark: unit is %, 100% means notes where played as written = standard notation Software uses sometimes 80% for MIDI-Export (ref. section 3.) PATTERN description : set pattern matching on/off val : ON - use default.pat OFF - no pattern matching (ref. section 6.) ;------------ settings for tempo detection ------------ DETECTTEMPO description : select type of tempo detection val : OFF - no tempo detection STATISTICS - tempo detection by statistics (ref. section 4) CLICKTRACK - tempo detection by clicktrack (ref. section 4) CLICKTRACK description : select track for click events (in MIDI-File type 1) val: 0..n remarks : in MIDI-File type 0 use "0" and setting "CLICKCHANNEL" (ref. section 4) CLICKCHANNEL description : select channel of click events val : 1..16 - select channel 0 - select all channels of clicktrack (ref. section 4) TACTUSLEVEL description : specify note-duration of clicknotes val : n/d (ref. section 4) METER description : for the current version of tempo detection the time signature is needed val : n/d ;----------------------------------------------- ; inference and output of GUIDO-tags DETECTKEY description : handling of \key -tag val : OFF - no detection MIDIFILE - use key information of MIDI-File ON - detect if no information in MIDI-File, ask if MIDI-File contains information KEY description : handling of \key-tag val : OFF - don't use ON - write inferred/read key information to GUIDO-Files DETECTMETER description : handling of \meter -tag val : OFF - no detection MIDIFILE - use key information of MIDI-File ON - detect if no information in MIDI-File, ask if MIDI-File contains information remark : meter detection is not implemented yet! SLUR description : handling of \slur-tag val : OFF - don't use ON - detect slurs STACC description : handling of \stacc-tag val : OFF - don't use ON - detect staccato marks ;--don't change the followong entries --------------------------------------------- ;max distance for recognition of two equal attackpoints [ms] EQUAL_TIME=60 ;max time for recognition of legato overlapping[ms] LEGATO_TIME=152 ;max time for recognition of staccato rests [ms] STACCATO_TIME=150 ;max duration for recognition of grace notes and legato [ms] ORNAMENT_TIME=120 ;----------------------------------------------- ;level for intensity stress detection ;0 -> 1 STRESSINTENS remarks : don't change ;---Ornament detection, don't change-------------------------------------------- ORNAMENT1=(C_SINGLE,0,0,DECRESC,0,META_GRACE_AT_ONSET} ORNAMENT2={C_SINGLE,0,0,CRESC,0,META_GRACE_PRE_ONSET} ORNAMENT3={C_TWO,DIR_UP,DIR_STAY,0,A_SMALL_UP,META_MORDENT_UP} ORNAMENT4={C_TWO,DIR_DOWN,DIR_STAY,0,A_SMALL_DOWN,META_MORDENT_DOWN} ORNAMENT5=(C_MANY,0,0,0,A_SMALL_UP,META_TRILL} ORNAMENT6={C_FOUR,0,0,0,A_SMALL_ALTER,META_TURN} ORNAMENT7={C_MANY,DIR_UP,DIR_UP,0,A_BIG_UP,META_GLISSANDO} ORNAMENT8={C_MANY,DIR_DOWN,DIR_DOWN,0,A_BIG_DOWN,META_GLISSANDO} ;----------------------------------------------- 8. Version History and Future Plans midi2gmn 2.0 (codename HEISENBERG) will include - improved tempo detection - meter detection - improved chord detection - improved slur and staccato inferring - detection of key/meter/tempo changes - ... 9. Credits & References More information on GUIDO Music Notation can be found at: http://www.informatik.tu-darmstadt.de/AFS/GUIDO Special thanks to Holger H. Hoos, Keith Hamel and Kai Renz for ideas and discussions.