artifastring icon indicating copy to clipboard operation
artifastring copied to clipboard

Allow operation at arbitrary sample rates

Open nickbailey opened this issue 5 years ago • 0 comments

These changes permit the creation of an ArtifastringInstrument at a user-specified sample rate without compromising normal operation at the default internal rate ARTIFASTRING_INSTRUMENT_SAMPLE_RATE. This is achieved by resampling the impulse responses of the various convolution kernels on demand when an optional sample rate parameter differing from the internal one is passed to an ArtifastringInstrument constructor.

Pros: easier to write apps using this library for use with audio frameworks which specify the sample rate (such as JACK on Mac/Linux) without requiring the audio daemon to run a 44100Hz.

Cons: libsamplerate is an additional dependency; output normalisation is only approximate and changes slightly with sample rate (see comment at https://github.com/nickbailey/artifastring/blob/master/artifastring/artifastring_instrument.cpp#L690)

As the supplied version of Eigen no longer compiles cleanly, I have altered configure.ac to use an independently installed version. configureing --with-eigen=... can be used to select an alternative source if they aren't in /usr/include/eigen3.

nickbailey avatar Jun 23 '19 11:06 nickbailey