Re: VSTPlugin and VST instruments
[email protected] Thu, 3 Jun 2021 09:09:10 +0200
| Newsgroups | gmane.comp.audio.supercollider.user |
|---|---|
| Message-ID | <CAEiRw5JS6nhmQCpBYj8P4JkfR5SAqCF74btyski5ZgVwOCO9OA@mail.gmail.com> |
Good answer! The only thing I would add is that you can get the MIDIProxy directly from the PluginController. Instead of creating a 'c'... > c = VSTPluginMIDIProxy(b); ...you can just use b.midi directly. Glen. On Thu., Jun. 3, 2021, 02:17 <[email protected]> wrote: > On Wed, Jun 2, 2021 at 3:28 PM <[email protected]> wrote: > > I think I should use Voicer but at the moment I don't know if it's > possible to use it with VST instruments and VSTPlugin. > > I don't think Voicer is necessary for this. > > Most VST plug-ins handle their own voice stealing -- every one that > I've ever looked at has a "polyphony" or "voices" parameter. So the > easiest way to handle voice stealing is to set the plug-in > appropriately. > > The original question was about playing a note in a VST plug-in for a > specific duration (where the duration is known in advance). > > Events already automatically do this. > > You didn't want to use patterns, but there is no requirement to use > patterns in order to use events. You can build the event yourself and > play it. > > ``` > ( > SynthDef(\vst, { arg out; > Out.ar(out, VSTPlugin.ar(numOut: 2)); > }).add; > ) > > a = Synth(\vst); > b = VSTPluginController(a); > > b.open("Vital.vst3", editor: true); > b.editor; > > // here: > (type: \vst_midi, vst: b, midinote: 64, amp: 100/127, sustain: 3).play; > ``` > > ^^ So, in the last one, it is sustaining the note for three beats -- > the release is handled for you -- and no patterns were used. > > (The VSTPluginController help file does say "VSTPlugin defines two > custom Event types which can be used in Pbind"... This is true as > stated, but if you misread it slightly, you might think that the event > types may *only* be used in Pbind. That inference is not correct. > Events are independent of patterns. They are commonly used with > patterns, but there was never any requirement that events must be > generated by patterns.) > > If you really strongly object to using events, you can schedule the > release yourself: > > ``` > c = VSTPluginMIDIProxy(b); > > ( > c.noteOn(0, 64, 100); > thisThread.clock.sched(3, { c.noteOff(0, 64) }); > ) > ``` > > hjh > > _______________________________________________ > sc-users mailing list > > info (subscription, etc.): > http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx > archive: http://www.listarc.bham.ac.uk/marchives/sc-users/ > search: http://www.listarc.bham.ac.uk/lists/sc-users/search/ >