Vst Time Code into MIDI Clock


#1

I would like to write a simple plugin that converts VST timing information into MIDI Clock messages. I have little practical knowledge about writing timing accurate applications in VST environment, could anyone help me with some basic design for such a plugin.

I also would like to know if VST sends all the information needed for such a conversion.

The idea basicly is to allow Hosts that don’t send SYNC information, or send it badly to be able to sync other applications/hardware.


#2

Good idea. I think there’s probably enough info in the VST stream to be able to pump out midi clock. Haven’t got time to help you design it though!


#3

i’ll try to crak this one myslef, looks like antoher 72hour weekend with a lot of cofeee and cigarettes.


#4

some basic concepts

  • get time information from getCurrentPositionInfo() called within processBlock() (as in the example of the AudioPlugin)

  • create a seperate thread (created in AufioFilterBase not the GUI) that opens a MIDI Output (selected first)

  • call this thread to send a MIDI Clock message (24/quarter note, this is how VST timing is done also, form what i’ve been reading in VST docs)

that’s what i can think of for now, am not sure about the thread timing though ? will this be good enough ?


#5

All sounds sensible. You could alternatively just pass the midi messages out of the filter as its output, and let the host worry about sending them to the device. That’d work in tracktion, though I don’t know if many other hosts could handle it.


#6

that’s what i wanted to do but as an option (additional MIDI Out device on the list). Though hosts like FLStudio have weird MIDI implementations. I wanted to write (and still am, this plug will hopefully become this) a SysEx sending plugin to control old vintage hardware, but FLStduio discard all MIDI that’s longer than 3 bytes, and i think SysEx in VST has appeared after VST 2.2 (before that the structre for MIDI SYSEX was not documented).


#7

Atomix, are you still working on this sys-ex plugin? Any luck yet? I’m interested in exactly the same thing and have started something, but you’re probably further along.


#8

yeah i’m working on it everyday after work, for now features include

  • dynamic panels (tabs with panles, each panel is a different controler surface, defined in a XML file, any kind of MIDI message is possible, sysex, rpn/nrpn, cc, raw data in form of F0:00:xx:04 where xx is a variable)

  • each panel has it’s own hardware or To Vst Host MIDI Output

  • MIDI Outputs are re-usable, different panles can use the same MIDI Output (hardware)

  • selectable randomize function per panel, amount of randomization can be chosen, also controllers to be affected can be selected

  • native preset sotrage and snapshot sending (all values of a panel are sent as a “snapshot” of a preset)

and many more like LFO’s for each parameter, but it’s a work in progress and it will take some time to finish, if anyone is interested i’d be glad to set up a SVN repos for this, it’s going to be opensource anyway.


#9

I was working on a massive panel designer app for my final year project. It being a final year project though, it sucked up all my time and i got thoroughly exhausted with it [it wasn’t much fun for me, especially as i had no real use for it for myself]. I got it to work with what hardware i had to test it with, and lost interest.

I think it’s all here

final year project if you want to have a look and rip anything you like out of it. it was going to be free opensource anyway, so i may as well share it now. from what i remember it was reasonably well commented, but i can’t remember if the source there is the most recent or not.

Anyway, have a look and help yourself.


#10