pierreguillot / Camomile

An audio plugin with Pure Data embedded that allows to load and to control patches
GNU General Public License v3.0
905 stars 64 forks source link

Feature suggestion: Support for 64 bit floating point audio processing #242

Open aviloff opened 3 years ago

aviloff commented 3 years ago

64 bit floating point audio is becoming increasingly important to recreate analog audio. Currently Camomile reduces sample bit depth to 32 bit floating point. Is this a Camomile or PureData issue? Will 64 bit audio functionality become available?

macOS 10.15.7 Reaper 6.21 Camomile 1.0.8 beta4 Pd 0.51.4

pierreguillot commented 3 years ago

This should be related to https://github.com/libpd/libpd/issues/276.

pierreguillot commented 3 years ago

On the JUCE side, the plugin has to implement the method AudioProcessor::supportsDoublePrecisionProcessing() that should return true and then implement the double version of AudioProcessor::processBlock().

On the pd/libpd side, the definition PD_FLOATSIZE should be set to 64. It means that Pd can only perform 32-bit float precision or 64-bit float precision, not both with the same binary. So we would have a Camomile-32-bit-float-precision and a Camomile-64-bit-float-precision.

In theory, that should not be too complicated to do. I'm just not very confident in the 64-bit precision support of Pd but we could mark this version as "unstable" or "being tested" until we find all the potential issues.

aviloff commented 3 years ago

Thanks for looking into the matter, Pierre!

I think that with 64 bit audio support not only will Camomile bring freedom to music creators in terms of functionality, but also provide the highest quality audio and more accurate sound/data analysis. A branch/build, even though unstable at first would be a great step. I could make basic test plugins for this version.

danomatika commented 2 years ago

https://github.com/libpd/libpd/issues/310 is merged, so please test. Also, see the libpd feature/multi-hooks branch for multiple instance & duoble-precision. :)