Midi playback - alternative to FileStream(DShow9)?

For a patch I have been working on for some time now, I need some basic midi file playback. That part is probably already a few years old and uses 2x FileStream(DShow9), one which is going to a port for sound creation (for example just the basic Microsoft GS Wavetable Synth) and one which routes the notes back into my patch for recording using LoopBe1.

I am wondering if there is a better more modern alternative to this method, as the FileStream is pretty unreliable, especially since there are a multitude of different midi formats. Sometimes FileStream just gets stuck and refuses to play any longer. Sometimes plays for a single frame and then gets stuck.

I could just use an external program like abelton live to handle all midi playback and sound creation, but would like to have something that works using only vvvv.

Thanks for any suggestions or pointers to alternatives.

Current (very old) setup for midi playback:

filestream_midi_playback.v4p (10.5 KB)

MIDI FILES.zip (153.9 KB)

have you tried the MidiFilePlayer (VAudio) that comes with: https://vvvv.org/contribution/vvvv.audio-pack-alpha

Thanks @joreg, I have had a brief look at them before and just again now, but I think they do too much of what I am already doing anyways, like actually reading the whole file and then playing it back.

The problem with that is, that putting in the bpm by myself is not good. The bpm is stored in the file already and it should use the stored bpm.

Mainly my patch uses live midi note input from different midi instruments, but it can switch to using the midi notes from a midi file being played (sort of like a demo mode).

I have made a midi-note-recorder with lots of help from @tonfilm to record the live midi coming in and might as well use the same to sort of re-record the midi coming from a file.

So what I am really just looking for is a Filestream component that is more reliable. As far as I can see Filestream(VAudio) doesnt play back midi files. Also using LoopBe1 to route midi out of vvvv and straight back into vvvv seems like an unnecessary hack - especially since LoopBe is pretty quick to switch to mute since it detects coming in and out of the same software, which then mutes the midi, if too many notes are playing at the same time.

In the end I would like to just get the same output as MidiNote (ie. just a spread of note velocities), but coming from a midi file being played, without routing midi out and back in to vvvv.

Its starting to look like an external player will be more reliable, since that DShow9 Filestream is so unreliable. Not sure if this is an audio driver issue or what, since I cant see any pattern when and why it would fail to play back some midi files, but might be due to having 2 filestreams simultaneously. Unfortunately thats the only way to output to 2 different midi ports as far as I can tell.

did you try with midi-ox? it has an option to playback files.
the Sanford midi library also has a player class that we can import, but haven’t looked deeper into that. that might be the most promising option. can’t give you a timetable for that one yet, but i’ll make an issue in our bug tracker for it.

Yup, I use Midi-Ox a lot and playing and receiving midi from other software is not the issue. But since I want our software to be as stand-alone as possible (it already has an elaborate GUI and basically only runs inside 1 or 2 renderer windows), I would love to have most thing run natively inside vvvv.

I dont really get it, there doesnt seem to be much logic as to when it works and when it doesnt. Usually it plays for about 0.1 sec (1 frame!?) and then stops.

But this stupid routing of Midi through virtual ports is not ideal yet. Basically I have 2 filestreams, one which sends to a virtual port, which is then picked up by a MidiNote node on the same virtual port, since there seems to be no way to directly extract the stream of notes playing from a midi file playing back, and the other goes to another virtual port for the sound creation (Arturia Analog Lab at the moment).

So I ideally a Midi playback node would be able to directly link to a MidiNote, MidiController, etc node without rerouting. Then you have another MidiOut node, which can directly take the stream and output it on another midi port. That would save a lot of overhead and at least 1 virtual midi port.

Thanks for working on this :)

ps: oh yeah @tonfilm, I fixed the sustain problem on that midi recorder node you made for me in VL, in case you want the updated version. Works really well now and observes sustain correctly.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.