Responding To Vsti Midisource (ivstpluginmidisource) Events?

Hi folks,

I’m a bit new to this, so you’ll have to forgive me if my quetion doesn’t make much sense.

Anyway, I’m attempting to build a VST plugin that sends NoteOn and NoteOff midi messages to the host. It all seems to be going, as far as the debugger tells me- Process is invoked on the host with a MIDI string representing a note (see below for gross technical details) , but the software isn’t registering any note pushes.

So, three questions:

  1. Am I going about this the right way? Is Renoise designed to respond to MIDI events from a VST plugin like this?
  2. Is sending a NoteOn all I need to do to play a note?
  3. How do I get it to make noise, even if I get it working? I’m sending pure signal data- no audio. What do I do to assign a sound to my instrument?

I am a new musician, but an old programmer- I’m pretty confident that if it can be done and someone can point me in the right direction I can get this going… :)

Technical stuff- this is my test signal:

invokes Process(event[]) on the host, sends a midi byte array consisting of 0x90 (note on, channel 0), 0x60 (middle C), 0x40 (mid-strength velocity)

Hi again,

I no longer need an answer to 3, assuming samples behave the same way under MIDI instruments as they do with other VSTis :)

Question 1 still stands: Can Renoise respond to MIDI signals sent from a VSTi? Or, to put it another way, can I use a VSTi to add notes to the current track in the pattern editor?

Just to clarify- this question is strictly for the Renoise devs, and VSTi authors- the rest of you can be forgiven if your eyes start to glaze over lol

I will rephrase question 2 a bit…

At the moment I am attempting to send MIDI messages- specifically tune data, but controls are in the works- to Renoise via the MidiProcessor component of a VST host (Renoise in this case). The plugin API I am using is VST.Net rather than the native Steinberg VST SDK, but it seems to do everything it claims to do so far- it uses a Steinberg wrapper that allows plugins to be loaded as if they were native, and is generally quite nifty. Hopefully the namespaces are similar enough that references to the API won’t be gobbledegook :P

The plugin I have written implements IVstPluginMidiSource, and has a type of “Synth”, since that seemed to be what puts the “i” in “VSTi”. I have an AudioProcessor implemented for timing.

When an event occurs on my instrument peripheral (to wit: a Rock Band guitar peripheral), the following occurs:

  1. The instrument event is translated to a NoteOn (button pressed) or NoteOff (button released) MIDI message, and added to a queue.
  2. When a call is made to the Process(event[]) method in the AudioProcessor, the following occurs:
  3. The host’s MidiProcessor complenent is fetched (using Host.getInstance())
  4. The queue is sent to the MidiProcessor by invoking its Process(events[]) method

That seems to be enough to satisfy the assorted tutorials I’ve read. However, as previously stated, no corresponding note is played in Renoise when this occurs.

So, what am I doing wrong here? Do I need to, for example, send and receive CLOCK and TICK messages? Regularly? Does Renoise need to be treated as a Midi slave, and the plugin as a Midi master? Whatever happened to that crispy bacon we had before the war?

Incidentally “learn C++ and use the native API” IS an acceptable answer to this question (I already learned C# for this, one more language isn’t going to make much of a difference), but I’d really prefer it if it was an answer of last resort. Oh, and I know about keymappers already- I want to do a bit more than “if button A is pressed, map it to the C key” ;)

Well, the short answer is, that Renoise currently doesn’t really support MIDI VST plugins, because of some missing routing functionality.

You can either wrap it in another modular host like energyXT instead and export the recorded MIDI file and load it in Renoise again.

Another quite specific idea might be to generate Renoise compatible XML from your queue in the clipboard or to the disk.

Thanks man, that’s a big help- means It’s not JUST my implementation which was the problem, which was driving me nuts ;)

Your second idea intrigues me, XML basically being my kept pet in any other language ;) This still doesn’t allow realtime transcription though, right? :) Still, it’s a start…

Anyway, I’m quite liking this Renoise dealy… Very intuitive, once you get used to it. Is there any word as to whether said routing functionality is being introduced in future releases?

With XML you won’t get any realtime results. For small parts, not longer than a pattern, you could generate clipboard compatible XML data. Better seems to me though, to build a small XRNS instead (it’s a ZIP file with XML and samples inside). Personally i’d rather go for a standard MIDI implementation though and use another host to record. The advantage is, if Renoise supports these plugins later you won’t have to change anything. The XML idea seems pretty hacky in that regard. :)

Also no word when something like this get’s implemented. Try searching the ideas and suggestions forum and add a vote to one of the threads there. ;)

Yes it is a sorely missed function in Renoise especially with plugins like Catanya and other more basic Arps being released recently

Like Beatslaughter my suggestion would be to test in a different host
You can run Reaper for free to test this out and it will Rewire nicely with Renoise too

Bungle

Thanks guys :)

I get some positive results for my plugin from VSTHost (standalone testing host)… Most of the more useful hosts I’ve tried crash as soon as they come into contact with VST.Net though, so I’m going to go back and recode it in C++ while there’s still a relatively small amount of code to rewrite- wish me luck :P

Man… Reaper’s intuitive, isn’t it? ;) Guess if Harmonix use it there must be something to it…