artifastring
artifastring copied to clipboard
Allow operation at arbitrary sample rates
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. configure
ing --with-eigen=...
can be used to select an alternative source if they aren't in /usr/include/eigen3
.