clone45 / voxglitch

Modules for VCV Rack
GNU General Public License v3.0
98 stars 16 forks source link

Looper playback is attenuated #236

Open grough opened 5 months ago

grough commented 5 months ago

Voxglitch Looper appears to apply a -20dB attenuation to any file it plays back. This may be done by design, but I find myself having to multiply Looper's output signal by 10 to achieve unity gain on playback.

Steps to reproduce:

  1. Using VCV Recorder, record a signal with an amplitude range of -10V..10V and save it to disk as test.wav
  2. Load the resulting test.wav file from disk into Voxglitch Looper
  3. Observe the amplitude range of Looper's playback is -1V..1V

In my view, a less surprising behavior would be for Looper to play the file back at the same amplitude at which it was recorded.

Backward compatibility aside, I think this change would result in playback at unity gain:

- outputs[AUDIO_OUTPUT_LEFT].setVoltage(left_audio * volume);
- outputs[AUDIO_OUTPUT_RIGHT].setVoltage(right_audio * volume);
+ outputs[AUDIO_OUTPUT_LEFT].setVoltage(left_audio * volume * 10.0);
+ outputs[AUDIO_OUTPUT_RIGHT].setVoltage(right_audio * volume * 10.0);

Thank you for reading and for your fantastic modules

clone45 commented 5 months ago

This very likely to be a bug, and thank you so much for catching it. What I'll likely do is scale the output from -5v to +5v, but provide a few different range options in the context menu, as well as a "backward-compatible" range for -1.0 to +1.0. Sorry for the inconvenience! Please be patient as I'm going through a lot of changes to my codebase at the moment and it might take a little time to fix this. :-)

grough commented 5 months ago

Sounds good to me :) It can easily be worked around by boosting the output, but the new options you mentioned would save a little patching if they were to be added. Thanks for your response