MidiFile measure Pos

Hi :)
I’m trying to setup an eviroment in VVVV for making Real Time rendered Music videos streaming an audio Track and its midi file along side each other, The addition of the new midi nodes in the latest release is awesome ! ;) cheers guys! But… I still wishing that the filestream node would output more data for midi files like, BPM, Beat type, Position in measure etc… (just like the midiclock node) instead of just the duration and position in seconds… At the moment the only ways I can think of would be to grab the BPM from the midi file somehow, and use it as a divisor for the duration in seconds (pain). Or stream the midi and/or audio files from another app also sending a midiclock signal… So for the Gods of VVVV i have 3 questions

  • will the filestream or any other node output BPM or Measure info from midi files streamed from inside VVV??

  • will the new Timeliner App (which is an awesome idea by the way) be able to load midi files and display/send BPM measure info ?

  • Is there a work around to this that I have totally over looked or just not realised because I am a total noob… ;)

Any help would be greatly appreciated.

Kindest regards and happy patchin… Peace


i don’t wanna spoil anything here, but i’d put my bet on the timeliner…

Cool… Looking forward to a resolution for this one… I’m sure it would open a lot of doors leading to greater creative freedom for many people.

looking at the MIDI file specification i bet you could use Reader and RegExpr to parse out the Tempo messages directly from the file data. But i agree this is a little tedious.

thanks oschatz…

I might give it a go tonight, I guess once its setup it wont be so tedious BPM -> MPB -> SPB and then use seconds per beat in conjuction with the position output pin from filestream, and divide away to get different beat resolutions lengths in seconds… It’ll be interesting to see how accurate this method is :)



Ok… I’ve made a bit of progress… and taken your advice, cheers oschatz.
I’ve managed to isolate the two hex bytes that specify the “division” in the midi file. but I can’t figure out how to decode them as an integer value in the (Motorola) “Big Endian” byte order within VVVV, (as specified in the MIDI file specification info oschatz so kindly posted a link to :)

Can someone out there help me ?

Ah sweet… sorted it out :)
I knew there would be a magical node burried in VVVV somewhere that converts hex / binary strings in to numbers! :D

the “ord” node…

took me long enough to find it tho…
heres an example patch I just finished…

now I can go to bed… :L

caseHexEx_03.v4p (9.3 kB)