The Multi Core Multi threads, multi-core optimization in audio processing can provide an important improvement of the global calculation capacity.
It can be interesting to know how Usine deals with multi-core CPU’s and more generally multi-threading. Choosing the most efficient profile can improve global performances and reduce the latency.
In Usine they are 3 kind of separated process:
the main process: It’s main sound card process. This process is crucial because, as the sound flow is constant over the time, it need a constant CPU charge to be executed properly without audio drops.
the graphic engine: It’s the process where are drawn all visual controls of Usine. Usine considers this process as a low priority task. But unfortunately drawing objects on a screen can consume an important amount of CPU…
additional threads: Usine creates additional thread (nb thread) to ensure a better repartition a the calculation on the different CPU cores.
The main process executes:
incoming/outgoing audio from/to the sound card and the driver
master section included insert patch
global synchronization
midi input/output included remotes
midilearn, keylearn processing
dashboard
recording (direct to disk)
The graphic engine executes:
The additional threads executes:
Depends on the nb threads parameter. Let see some examples.
nb threads = 2: Usine creates 1 (nb threads-1) additional thread. In this case the additional thread executes all tracks tracks 1,2,3,4,etc.
nb threads = 3: Usine creates 2 (nb threads-1) additional thread. In this case the additional thread 1 executes tracks 1,3,5,7,etc, additional thread 2 executes tracks 2,4,6,8,etc.
=====Few remarks=====
Having more threads than tracks is useless…
Generally, try to choose nb threads = 4 or 8.
Unfortunately, unlike that we can read in most advertising, this technology has several drawbacks that you have to know.
For example if the BLOC size is 128 and the sampling rate is 44100Hz the additional latency will be 124/44.100 = 2.9 milliseconds
If the latency is crucial for your live-set and you use auxiliary buses or tracks buses, set the nb thread = 1.