docb / dbRackModules

GNU General Public License v3.0
15 stars 1 forks source link

PAD2 Enhancement - fundamental freq mode and CV control #21

Closed DaveBenham closed 2 years ago

DaveBenham commented 2 years ago

The fundamental frequency definitely has a significant impact on the resultant sound. I generally find that as long as the value is <= the actual V/Oct pitch, then I perceive wavering pitch over time that is pleasing to my ears. As the V/Oct rises in pitch relative to the fundamental, I hear more and more "shimmer"

If the fundamental is > then V/Oct pitch, then I typically perceive stepped pitch variation over time that is jarring to my ears. Not sure if there is anything you can do about that. I am curious - Are you using the upsampling/downsampling tip from the algorithm creator? It might be interesting to try with and without, in case you haven't already.

Given that the fundamental has such a strong impact, it would be good if it had a CV input.

Beyond that, I think it might be nice if you could specify the fundamental frequency as a ratio of the incoming V/Oct. You could have a mode select (control or context menu) to control which option is used. If frequency mode, then the knob would offset the incoming V/Oct. If ratio mode, then the knob would attenuate/amplify the incoming V/Oct.

Now the big question - should the fundamental CV input be mono or polyphonic?

If computationally feasible, then allowing poly would be good, where each each channel gets its own wave table based on its own fundamental value.

If not feasible, then mono input is the obvious choice.

You could forgo a separate CV input for the fundamental, and simply use the existing V/Oct input. But I think a dedicated fundamental input gives the most flexibility.

docb commented 2 years ago

So far i understood, the algorithm is in general designed to have a pre-computed sound per midi note (or a group of) with the matching fundamental for a given set of partials . For example (discussed otherwise) if i would take the vowels you find in the presets of pad2 to make a proper ChoirPad, i would pre compute all of them. Here the advantage would be that i have a fixed sets of partials. Then the ChoirPad can simply select the pre computed wave table based on the pitch information including the correct fundamental.

It seems that the algorithm was not designed for having a v/oct below the fundamental (maybe even not above). So i have made a low fundamental 32.7 HZ by default as this leads imho to the best results. But i have made the fundamental knob as it may sound better if you know in advance that you only have higher notes.

I am not sure if we can get here something useful. I guess a wave table per voice would explode the CPU consumption. What i can try is: Take the lowest v/oct of the polyphonic v/oct input and take this as new fundamental if it differs by a given amount from the last. The fundamental knob could then offset (e.g. only negative octaves) the fundamental given by v/oct.

docb commented 2 years ago

So far i have tested: it doesn't work. The reason is that if the v/oct is changed the updated wavetable with the new fundamental is computed in the background and is only available with a noticeable delay. It can be also tested with the current version: if the fundamental is changed some intermediate clicking sound is noticeable. Pity, it sounds better if the fundamental matches the voct but i don't see so far a workaround, as all changes in the wavetable have this delay because of the computational complexity - which is thankfully not noticeable when changing partials,bw or scl.

I think the reason why it does not work is that the new wave table is too different when changing the fundamental frequency as then the frequencies of all partials are moved which is not the case when changing BW,SCL or the partial amps.

DaveBenham commented 2 years ago

Thanks for trying - yes it is a pity. I like it with the fundamental matching the lowest note, or perhaps the fundamental one octave lower than the lowest note.

docb commented 2 years ago

btw. the stepped pitch variation is fixed by using double precision for the phase.

docb commented 2 years ago

Won't do for now.