Greetings all. So I’m working on a program that allows me to patch a few different instruments together dynamically at runtime, essentially a semi-modular synth. Initially I had input attenuators on my filter instrument which would take an a-rate input signal and multiply it based on an attenuator knob. When patching an LFO that was outputting an a-rate signal with an amplitude of 1 (keeping it within audio level) I found that the program would crash when I attempted to scale up the a-rate output of the LFO a large degree (I was just multiplying it by the current k-rate attenuation value which is allowed in the range of 0.001-10k. Essentially my question is, is it better to determine and adjust the amplitude of a signal before calling the opcode on the LFO itself, or is there a way to scale the signal once it is received? Essentially the issue I’m trying to figure out is how to handle an instrument that can operate both as an audio source and modulator and whether or not it’s better to adjust the output on the outputting module or to adjust it on the input module once received.
Any insights, tips, etc are greatly appreciated. Sorry if that was poorly worded, feel free to ask for any clarification if I was horrendously unlear.
Thanks in advance!