Re: VSTPlugin and VST instruments
miranda-/Pt55oXH0LBWk0Htik3J/[email protected] Mon, 31 May 2021 10:51:28 +0300
| Newsgroups | gmane.comp.audio.supercollider.user |
|---|---|
| Message-ID | <[email protected]> |
hi,
here is some code i've used to play VSTs with a MIDI keyboard. it's for VSTPlugin 0.4 though, haven't tried the latest version yet.
----
s.boot;
(
SynthDef.new(\europa, { |out = 0, amp = 0.5|
Out.ar(out, VSTPlugin.ar(nil, 2, id: \europa) * amp);
}).add;
)
(
~europa = VSTPluginController(Synth(\europa, [amp: 0.5]), id: \europa);
~europa.open("/Library/Audio/Plug-Ins/VST/Europa by Reason.vst", action: {
"Europa loaded".postln;
}, editor: true);
)
~europa.editor;
MIDIIn.connectAll;
(
MIDIdef.noteOn(\keysNoteOn, { |val, num|
~europa.midi.noteOn(0, num, val);
}, chan: 0);
MIDIdef.noteOff(\keysNoteOff, { |val, num|
~europa.midi.noteOff(0, num, val);
}, chan: 0);
MIDIdef.cc(\keysSustain, { |val, num|
~europa.midi.control(0, num, 127 - val);
}, ccNum: 64, chan: 0);
MIDIdef.new(\keysPitchBend, { |val, num|
~europa.midi.bend(0, val);
}, chan: 0, msgType: \bend);
)
----
miranda
> On 2021-05-31, at 09:20:35, [email protected] wrote:
>
> Hi,
>
> please point me to an example of using a VST instrument using VSTPlugin sending midi messages WITHOUT Ndef/patterns.
>
> Cannot figure it out...
>
> Many thanks in advance.
>
> Best
>
> --
> Alessandro Fogar
>
> http://www.fogar.it
_______________________________________________
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/