Tool for calculating average note in a midi file

Apr 28, 2012 at 2:46am

Tool for calculating average note in a midi file

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

#63274
Apr 28, 2012 at 7:52am

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

#228277
Apr 29, 2012 at 1:24am

here’s a patch I made a while ago which analyses note velocities– you should be able to adapt it to your needs

– Pasted Max Patch, click to expand. –
#228278

You must be logged in to reply to this topic.