Open m-roberts opened 3 years ago
Think there's some other NEON flag in poly_values.h or something.
Builds fine on arm64, but fails on armhf. Error being:
from ../ports/vitalium/source/unity_build/common.cpp:18:
../ports/vitalium/source/synthesis/framework/poly_values.h: In static member function ‘static vital::poly_float::simd_type vital::poly_float::div(vital::poly_float::simd_type, vital::poly_float::simd_type)’:
../ports/vitalium/source/synthesis/framework/poly_values.h:592:14: error: ‘vdivq_f32’ was not declared in this scope
return vdivq_f32(one, two);
^~~~~~~~~
../ports/vitalium/source/synthesis/framework/poly_values.h:592:14: note: suggested alternative: ‘vzipq_f32’
return vdivq_f32(one, two);
^~~~~~~~~
vzipq_f32
Possible fix here https://github.com/DISTRHO/DISTRHO-Ports/commit/67cdebbd2472380ac5c4339ac82fba4749b0e6da An alternative code path for armhf is already in the codebase, but was simply not enabled.
If this is all the changes needed, I should have builds that are compatible with rasp-pi in some minutes.
It works! direct deb files in https://kx.studio/Repositories:Plugins as usual.
I'd really like to see Vital running on a Raspberry Pi if anyone can run it.
I tried on a MOD Dwarf (so arm64 device with quadcore 1.3GHz CPU) and even at 1024 frames, I could not make any sound without xruns with the included presets. The default patch does work, but it is not very interesting of course.
Seeing this performance, and taking into mind that the MOD platform runs a highly-optimized RT no-X11 system, I do not think the current release can run on a Pi in any decent form.
Unsurprisingly, vital[ium] runs very well on the apple M1
Hmm do you know if it's using the fallback FFT in the build? KissFFT (the fallback) is really slow so if it's not hooking into FFTW then it's going to be really inefficient. I think Vital should be fast enough to run on MOD if you have a fast enough FFT on there.
I've been meaning to switch away from FFTW and statically link something in instead anyway. May look into that.
I set the juce flag to indicate using fftw as shared library, it seems to be active.
strings /usr/lib/lv2/vitalium.lv2/vitalium.so | grep fft
libfftw3f.so
fftwf_plan_dft_1d
fftwf_plan_dft_r2c_1d
fftwf_plan_dft_c2r_1d
fftwf_destroy_plan
fftwf_execute_dft
fftwf_execute_dft_r2c
fftwf_execute_dft_c2r
That libfftw3f.so
should really be libfftw3f.so.3
though it doesn't change much here as the first is a symlink to the second.
How can we know if juce was able to hook into fftw?
Back when I did some tests for the older Duo model, running 32bit/armhf, the ffmpeg provided FFT was faster than FFTW. On ARM platforms, NE10 is usually a good choice for this, in case using FFTW is not possible.
Yeah I really need to replace FFTW. There's a FourierTransform wrapper that chooses libraries in src/common/fourier_transform.h. Probably wouldn't be hard to extend it to another lib.
I've got my hands full but maybe the next time I'm fooling around on a Pi I'll see about ne10
Also, I think there are some 32 bit runtime problems, probably to do with memory alignment. I don't really want to spend time fixing them because 32 bit setups are rare and shrinking.
right I can confirm to see issues on a win32 target as well (windows 32bit). the only way I had to make the plugin work there was to use -O0, thus disabling optimizations.
I ran
sudo apt-get build-dep .
to install build dependencies.Then I ran
make
: