VCVRack / AudibleInstruments

VCV Rack plugin based on Mutable Instruments Eurorack modules
https://vcvrack.com/AudibleInstruments.html
Other
387 stars 84 forks source link

Plaits: Tuning does not match physical module #66

Closed cschol closed 5 years ago

cschol commented 5 years ago

The tuning of the Macro Oscillator 2 module is about 4 semitones sharp from the physical Plaits module when the Frequency knob is set to exactly 12:00.

Here is the current implementation:

screen shot 2018-09-23 at 5 48 40 pm

Playing around with the values, here is an updated implementation with the following line (Plaits.cpp, l.145):

// Original: patch.note = 60.f + pitch * 12.f;
patch.note = 56.25f + pitch * 12.f;

screen shot 2018-09-23 at 5 47 24 pm

I haven't looked at the code enough to understand the math, but with 56.25 the tunings match and there is almost zero drift between the two oscillators.

Now, it may as well be the physical module that is out of tune, but I figured I'd mention it.

Update:

Here is a test with the physical module at max. frequency and Macro Oscillator 2 at the original 60.0f value:

screen shot 2018-09-23 at 6 06 46 pm

That looks correct at the high end. With 56.25f the high end is actually 4 semitones flat compared to the physical module. I think it is just a matter of linearity across the pot range that is different in the physical Plaits.

Let me know if you want me to look into this further.

AndrewBelt commented 5 years ago

What's the approximate angle difference between knobs? Matching knob angles exactly isn't necessary.

cschol commented 5 years ago

This is a picture of the physical Plaits at 12:00 and the Macro Oscillator 2 matching the frequency. You can see the approximate angle difference from noon position in the picture:

screen shot 2018-09-25 at 8 02 29 pm

AndrewBelt commented 5 years ago

If I recall, it was done this way so that the default 12 o'clock pitch follows the pitch standard at https://vcvrack.com/manual/VoltageStandards.html.

cschol commented 5 years ago

Sounds good. Thanks.