DISTRHO / Cardinal

Virtual modular synthesizer plugin
https://cardinal.kx.studio/
GNU General Public License v3.0
2.22k stars 153 forks source link

Adding plugin Sapphire, modules Elastika, Moots. #451

Closed cosinekitty closed 1 year ago

cosinekitty commented 1 year ago

I was able to get Sapphire integrated and working in Cardinal.

image

I notice the CPU overhead of Elastika is much higher than I encounter in VCV Rack. Elastika does quite a bit of SIMD number crunching. Is there something special I need to do in order to get that working in Cardinal also? Thanks!

falkTX commented 1 year ago

how are you measuring the cpu load? with the provided rack per-module meter?

2 things come to mind for performance on a per-module basis:

  1. cardinal has SSE2 as base, SSE3 is achieved through simde (except macOS, though potentially changing)
  2. flush-to-zero cpu flag is not always enabled, depends on how you test things, standalone vs host too. so could be some denormals getting in the way.

for overall performance, cardinal is always single-threaded in its audio, so it shows up as consuming more cpu in typical cpu measuring tools

cosinekitty commented 1 year ago

You are right, it was the thread count. When I change VCV Rack to use 1 thread, the CPU performance numbers are identical with Cardinal's. Thank you for clearing that up!

falkTX commented 1 year ago

Ok that makes sense yeah.

Somehow CI is not running here, but since you tried it already lets assume things are good. We can always fix things as needed later.

Merging, thanks a lot!