I would like a VST plug-in that can receive MIDI note inputs, store the last note played, but not issue the note to its output until the start of the next bar.
A sort of real-time quantiser?
I’ve dug around and not found anything that does this. Anyone aware of a possible solution?
Recently I’ve been using the Metronome in C4 as the clock source (“play” active). It seems to quantize the notes (with sticky property) ? I’m not sure this helps your use case, but I found it handy to keep everything tidy in my composition!
I’ve been meaning to have another play with Bluecat’s Plug’n Script.
There’s an example that sends events on a metronome. I should be able to hack that.
The nice thing about Plug’n Script is that it exports complete independent vsts.
Well it’s working. The example chord generator is doing what it should. All I need to do now is build the plug-in I need!
Looking at the script I think this is going to be way beyond my OO ability.
Yep, same for BlueCats’ scripting. Looking at the code I’m completely lost. To get from here to where I want to be would be a long, hard slog. Maybe I could rustle up a simple MIDI transposer, but storing notes and syncing to a MIDI clock source? That’s a lot to get under my belt from where I am now. I think I have to accept my limitations!
I’m a pretty mediocre coder but can usually get a result.
The demo fo Plug’n Script should be enough to work with.
The example code that is most useful is the /MIDI FX/midi metronome.cxx
It deals with working out when it needs to send on the first beat of the bar. It all based on time sig, position in the block, block size, etc. Quite confusing without a nicely worked example with diagrams.
I’m getting pretty close to a result though.
The spec I’m working to:
Take only the most recent note sent to the plugin and hold it until the next first beat of the next bar.
After sending the note on, send a note off event after a preset duration. (it doesn’t attempt to measure the duration of the received note on)
It sends the note on with the same velocity as played.
I’ll send over what I’ve done after I’ve had another play.
Here’s a first build as a VST2.
You’ll need the .dll and the folder.
There’s no gui, there’s no need; just the one slider for duration.
I’ve only tested with 4/4 time sig. Send On Bar.zip (4.7 MB)
It worked fine with wide mix of time sigs in Cantabile.
I don’t fully understand how the timings are calculated and this is holding me back from optimising it.
Is the duration parameter actually useful? I could just set it to a fixed value.