Tool for calculating average note in a midi file


    Apr 28 2012 | 2:46 am
    Hi All,
    I am undertaking some statistical research into a set of musical scores (midi files - which contain 4 midi channels). For the research I would like to determine the mean note/frequency of each of the scores, but also take into account the note duration and velocity (for example if a note is longer and louder it will have a greater influence on the resultant mean).
    I have only been using max for a short bit and am certainly not a pro. I was wondering if someone might be able to give me some advice on how I might be able to build a patch which would be able to perform this analysis...or let me know if there is an existing piece of software/patch which already exists.
    Hope I have explained this alright.
    Thanks a bunch in advance, George

    • Apr 28 2012 | 7:52 am
      i only do such things in realtime, but it should be very easy to do it on a file.
      - load it into [detonate] - user [uzi] and [counter] to run through the file - get sum of all note values using [accum] - divide through number of note on events, which you counted with another [counter].
      -110
    • Apr 29 2012 | 1:24 am
      here's a patch I made a while ago which analyses note velocities-- you should be able to adapt it to your needs