Multi-threading is coming to nuSpin

A Premium Live Performance Experiencematt_blue

I have been busy behind the scenes adding multi-threading to nuSpin.? Multi-threading gives a synth the ability to take full advantage of every processing core on a computer.? That means you can play more notes and make more processor intensive programs that will still run in real time.? The goal with nuSpin is to provide a premium live performance experience, and this latest work pushes the synth one step further toward that goal.

 

Implementation

What is involved in implementing multi-threading?? It boils down to allowing as many parts of the signal processing to occur in parallel as possible.? With audio, there will always be some parts that cannot broken into simultaneous operations, like program wide FX or LFO processing.? The obvious place to start is splitting up the active notes among the available cores.? Since nuSpin can play more than one program at a time, the processing for each program can occur simultaneously.? The trick is figuring out how to separate out the inputs needed for each stage so that threads do not try to change the same data at the same time.

Complicationsthreads

What makes implementing multi-threading a challenge is the heuristic of how the operating system schedules threads and the underlying hardware of the cores.? So the next step was to run a thread monitor and make sure each thread is scheduled with an appropriate amount of work and is not being blocked by other threads. This can?take a bit of trial and error.? Because digital signal processing uses floating point math, hyper-threading does not provide much of a benefit.? I?found I was able to get one processing thread per core running solidly.? Any more than that and the OS would preempt one of the threads.

 

The Results

 

I found I could scale up the number of playable voices by a factor roughly equivalent to the number of physical cores.? This should provide a big improvement in the performance of nuSpin.? If you are a current owner of nuSpin, you will receive this update for free once it is complete.? I anticipate being able to release the latest work before NAMM.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

*

%d bloggers like this: