First plugin

So I’m building my first plugin/module. This is what I want to do, I post it here, not so much so someone tell me what to do, but I wonder how I go about finding how to go about it. I’m looking into the API and I am not even sure how to search about thing like volume (I guess it might be related to voltage?)

I want

1- A hardcoded frequency (on 3 differents octaves). 2- A volume knob

3- In gate to trigger the sounds (which would always play if not triggered) 4- In for volume (would override the volume on the module itself)

4- 2 outputs for left and right.

I got the UI with the input/output/knobs at the right place, and loaded as variable.

How do I check if there is an input? and if there is no Input to get the value from the knob I have setup?

For 2 outputs I get:

 outputs[LEFTOUT_OUTPUT].setVoltage(5.f * sine);  
 outputs[RIGHTOUT_OUTPUT].setVoltage(5.f * sine);

For the static frequency:

  float freq = 126.27f;                                                              
   // Accumulate the phase
  phase += freq * args.sampleTime;
  if (phase >= 0.5f)
   phase -= 1.f;
 // Compute the sine output
  float sine = std::sin(2.f * M_PI * phase);

But that doesn’t seem to output a sine of 126.27 for example, it seems way too low.

Anyway, I just need a kick in the right direction to go about learning all these basis.


These VCOs are super simple, and do put out the correct pitch. GitHub - squinkylabs/Demo: A collection of code and articles of interest to VCV users and developers.

Nice, this is really great! Did I miss that from the manual?

I tried to read through the Fundamental modules but they are quite complex already for a newcomer like me. It’s nice to see really simple patches like that.

These modules are demo only, not in the library. Although my BasicVCO is quite good, and directly descended from these. And no, certainly nothing of mine has ever been mentioned by vcv.


Thanks for posting, didn’t realize you had done this. Time to get squinkified.

1 Like