3 Questions about VCO

Hi all,

I’ve three question about VCO, expecially the brand one by VCV.

  1. why you have written freq range in this way:

configParam(FREQ_PARAM, -54.f, 54.f, 0.f, "Frequency", " Hz", dsp::FREQ_SEMITONE, dsp::FREQ_C4);

rather than this?

configParam(FREQ_PARAM, -4.5f, 4.5f, 0.f, "Frequency", " Hz", 2, rack::dsp::FREQ_C4);

Aren’t they equvalent? Maybe because “54 semintones” is more readable rather than “4.5 octaves”?

  1. why so low max freq for an osc? Isn’t 5919.9 hz a tiny amount for a VCO? Usually synth/vst I’ve faced reach at least 16khz. Just curious, to learn somethigs news :slight_smile:

  2. if I use the approxExp2_taylor5 as for setPitch in VCO, it seems to works till < +1V/Oct. Over, it seems to be broken. Example:

freq = rack::dsp::approxExp2_taylor5(0.9f + 30.0f) / 1073741824; works correct, returning freq = 1.86606

freq = rack::dsp::approxExp2_taylor5(1.0f + 30.0f) / 1073741824; seems to be broken, returning freq = -2.0f. Am I wrong? Where? Or a bug? Not sure why it works on your code :open_mouth:

Thanks

2 Likes

They’re effectively equivalent, but the param value in the first needs to be divided by 12 to be treated 1V/oct. For this reason I recommend the parameter range in the second example.

I don’t remember why I chose ~6 kHz. It’s pretty low. It’s nice for oscillators to go up to 20 kHz without pushing it higher with CV.

2 Likes

Ah ok! Not sure why you use (wrote) the first example so :smiley:

I see. The fact is: CV external mod usually is between -5 and 5 V. Thus, if I set a param like this (which goes ~16k):

configParam(FREQ_PARAM, -6.0f, 6.0f, 0.f, "Frequency", " Hz", 2, rack::dsp::FREQ_C4);

the risk is that CV modulation won’t cover the whole range of the knob (since it will go between -5.0f and 5.0f, not -6.0f and 6.0f). Maybe that’s the case? How would you do this?

Also: I’ve edited the original question, please note I’ve added a 3° question :slight_smile:

2 Likes

I noticed this too some time ago but thought I am doing something wrong…

4 Likes

I also incidentally noticed this yesterday. What’s going on with that calculation? How can it work in the Fundamental VCO code but apparently not in other code? :thinking:

edit : One explanation could be that the scalar and SIMD implementations of approxExp2Floor are producing different results. The Fundamental VCO uses the SIMD version.

2 Likes

True. I think that’s the only reason that it works and mine (us) don’t.

@Vortico can you check it out?

The proper thing to do here would be to log a bug in GitHub.

1 Like

Feel free to open it and got credits to yourself :slight_smile: Not very able to write decent issues to GitHub right now, I should learn from people.

ha - thanks, but since I have not observed this issue myself that would require I do actual work :wink: I will say that I used the SIMD version and it seems to work fine, so that tip about approxExp2Floor seems pretty on point.

1 Like

1V/octave signals have no range. The relationship between frequency f and a 1V/oct CV signal V is f = f_0 2^V, and the domain of that function is (-\infty,\infty). There’s no point in thinking that the range of knob should correlate in any way to the range of a 1V/oct input (which doesn’t exist).

2 Likes