- check isDrumIndex - use as factor in determining if it's a drum channel (might not be) - within an instrument: - check program against general midi if not null - use as factor in determining kind of instrument - determine if the notes in this instrument/channel are part of a chord progression with notes on other channels, or if they should be considered a monophonic melody. file { tempo, (constant) time_signature, (constant) path, tracks: [array of { name: str }], channels: [ { index: 0, // which midi channel? (0-15) isDrumIndex: boolean (is this one maybe a drum channel?) // one instrument is active at each point in time on the channel. instruments: [ { program: general midi index or null, notes: [] } ] } ] } Result: array of arrays of notes which all meet the description "monophonic melody" Sam's plan: 1. based on directly expressed top-level ideas like general midi program, isDrumIndex, score for likelihood of being a monophonic melody 2. segment instrument contents into sub-arrays based on: - characteristics of note length distribution - characteristics of pitch distribution - characteristics of velocity distribution 3. check for basic stuff like % of notes starting simultaneously with other notes in the same instrument - If above ~5%, low score for monophonic melody. - within one instrument, simultaneously-starting notes in a monophonic melody should be very rare, only occurring as a result of accidents or very occasional diads/triads 4. check again for % of notes starting simultaneously with other notes in the same file, but not in the same instrument - If below ~80%, high score for monophonic melody (reason being that chords spread across multiple instruments/channels will probably have very high correlation here, but a monophopnic melody will probably only have "kind of high" correlation here) 5. if score exceeds a threshold, consider that entire instrument to be a monophonic melody.