My goal is to have the audio source come out the vst to benefit from midi grid and avoid virtual audio latency, its working , the other goal from all this is to modify my signal while live playing (on my couch)
is this possible? so far i could not work out the server section of the vst to wire stuff from IDE so I compiled the synth we see as a .scsyndef extension.
But its bit weird for instance argument freq if i force the modulation via the āinternal plugin stateā vst menu option then it can be modulated but it does not anymore compute the grid key information, also it would be nice not to have to compile the synth def to do more dev like experimenting
at some point i got some synth showing in the server section of the vst but couldnt do anything with them and donāt even know how i got them there haha
Is this vst3 mean to work ?
I found also this other rep but wanted some acknowledgement from community before to compile this one too
Thanks to all =)
edit: the main question maybe was is there a documention for using the vst?
I successfully used it in a Reaper project, to use JPverb for its lovely ambient-ness.
If I recall correctly, there are two modes: MIDI and fx mode. In MIDI mode, the VST layer processes MIDI messages and plays the chosen SynthDef in response to them. In fx mode, one synth is loaded at startup time and it processes audio on the hardware input buses.
It doesnāt contain the full language, so control methods are limited. You shouldnāt expect plugincollider to do everything, or even most of, what the full SC environment can do. Each plugincollider instance is meant to be a small, limited-scope processor. When I used it for JPverb, that was enough.
You can connect sclang in the IDE to a running plugincollider server by creating a Server.remote in the language.
Requested notification messages from server 'nil'
/notify : already registered
nil - already registered with clientID 0.
nil - handling login request though already registered -
This seems to be a login after a loss of network contact -
- reconnected with the same clientID as before, so probably all is well.
Does this mainly allow me to send messages as code below?
n = NetAddr("localhost", 8898);
// Example sending symbols, integers, and a float
n.sendMsg('/s_new', \my_mini, 2000, 0, 0, \freq, 80.midicps);
n.sendMsg('/n_free',s.defaultGroup.nodeID);
// The initial forward slash can be omitted
n.sendMsg(\n_set, 2000, \gate, 1);
to refer to your answer
In MIDI mode, the VST layer processes MIDI messages and plays the chosen SynthDef in response to them
Is it possible to send a synth from IDE or is it only synthdef loaded from compiled .scsyndef files? thanks
omg wanring eveyone when compiling for vst use the name freq is reserved value for wiring with key change on the grid
below would take grid key change
(
[
SynthDef(\third, {
arg freq = 82.406889228217; // Base pitch (40 Hz, a low E)
var maxH = 80;
var nyquist = SampleRate.ir * 0.5;
var sig;
// Generate harmonics 4 to 10
sig = Mix.fill(maxH - 3, { |i|
var n = i + 4; // Start from the 4th harmonic
var f = freq * n; // Frequency for the nth harmonic
var amp = 1 / (n ** 0.7); // Amplitude falloff
// Ensure the frequency doesn't exceed Nyquist limit
f = f.min(nyquist);
SinOsc.ar(f, 0, amp); // Generate sine wave for this harmonic
});
sig = sig * 0.1*EnvGen.kr(Env.perc(releaseTime: 0.2),doneAction: 2); // Final scaling
Out.ar(0, sig ! 2); // Output stereo
})
].writeDefFile("/third", "/Users/davidmignot/Desktop");
)
below wont and freeze at same key
(
[
SynthDef(\third, {
arg filou = 82.406889228217; // Base pitch (40 Hz, a low E)
var maxH = 80;
var nyquist = SampleRate.ir * 0.5;
var sig;
// Generate harmonics 4 to 10
sig = Mix.fill(maxH - 3, { |i|
var n = i + 4; // Start from the 4th harmonic
var f = filou * n; // Frequency for the nth harmonic
var amp = 1 / (n ** 0.7); // Amplitude falloff
// Ensure the frequency doesn't exceed Nyquist limit
f = f.min(nyquist);
SinOsc.ar(f, 0, amp); // Generate sine wave for this harmonic
});
sig = sig * 0.1*EnvGen.kr(Env.perc(releaseTime: 0.2),doneAction: 2); // Final scaling
Out.ar(0, sig ! 2); // Output stereo
})
].writeDefFile("/third", "/Users/davidmignot/Desktop");
)
Itās not quite clear from your comment, but Iām going to guess that this is not actually connecting to the pluginās server ā because the serverās name is nil, Iām guessing that you didnāt provide any arguments to Server.remote.
But the most important thing when connecting to a server thatās been started in some other process is: where to find it for communication ā that is, Server.remote is kinda pointless without a NetAddr.
When I wrote that, I was winding down for sleep, so I briefly pointed you to the method and hoped that you would look it up in the help and see what arguments were needed.
Once you connect sclang to the remote plugin server (āremoteā meaning that this sclang instance didnāt start the server), then you can use all the normal Synth etc methods on it.
(Btw, yes, freq and gate are long-standing conventions in SC SynthDefs. Iād also guess that plugincollider transmits velocity into amp with some scaling, but I havenāt tried it and Iām not sure.)
var addr = NetAddr("127.0.0.1", 8899);
addr.sendMsg("/s_new", "\pluckyTest", s.nextNodeID, 0, 1);
and sounds comes out succesfully from vst ^^
but at contrary to a loaded .scsyndef synth, its not triggered by the ableton midi grid
I think there is something to do with the system of server/node/group section shown below but impossible to figure if that could be it or how to instanciate something in it
I tried something ultra clumsy to wire MIDI from ableton to sc and routine/trigger the .sendMsg using the ableton midi data and it comes out the vst with an offset probably caused by all the come and go in between modules =(
Please is there a way to connect the MIDI from ableton to sc vst just inside ableton and using the flow i got going until this last issue? This way synth can be very easily edited from IDE it looks like a very handy way to enjoy UI sequencing and sc synthesis.
If youāre playing MIDI notes in plugincollider, the s_new messages are 100% generated by the VST. Sclang canāt intervene in that. But when you change the SynthDef from outside, future s_new messages have to use the new def
Normally we think of one big server thatās doing everything. Plugincollider is based on the idea of each plugin (each server) having a small, focused job: this one plays MIDI, that one processes an effect. That means letting go of the usual SC way of thinking. At first, I didnāt get it either ā I thought it would need to have a full language interpreter ā but after trying it, I see the point.