If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
CPU threads
9 posts
• Page 1 of 1
CPU threads
Long preamble incoming, sorry .... !
Some of you know that for the last couple of years I've been developing a 'church organ' synthesis model in Flowstone. Been working with FS64 most of this year and I keep telling myself I've nearly finished ... ! (Very few believe this round here )
I've arrived at the following : I now have a 'Voicer' (.exe), in which the various pipe-rank sounds are set up and adjusted, and a 'Player' (.exe) which consists of multiple 'pipe ranks' (= organ stops). Ranks can be loaded from the library files (my own format) that are produced by the Voicer. All working well.
My 'rank' generator comprises 3 poly waveform players + 2 envelope generators + a noise generator, and various other bits & pieces. In the arrangement I've devised I can quickly copy & paste as many ranks as I wish into a Player module.
The ASIO sound card I generally use is 'multi-client', meaning it can run several ASIO .exe progs at the same time (most cards can't do this), so an actual physical organ would potentially consist of several of my Players running together. On a big organ maybe 2 or 3 Players would be needed for each organ keyboard/pedaboard. Say 5 Players for a modest 2 manual organ.
So far so good. In recent tests Players have been loaded with 8 or 9 ranks, and in tests on my i7 PC I've been able to run 7 or 8 such Players simultaneously, that's 60 organ stops, maybe 70+ organ stops. Result - Yay!
However if I a) were to try and put 60 ranks into a single Player (no chance!), or b) if I try and go down the more obvious VST route, I can't get anything remotely like this capacity. What's going on?
The word 'threads' keeps coming up when I research this. Does anyone have some pro insight? I have very little idea of what 'thread' even means!
I get the impression that FS normally runs in a single CPU thread, and that, hence, if I run multiple instances of an exported .exe they each run in different threads, which would explain my rather surprising extra capacity. Is that right? Whereas - I'm assuming - if I run them as a vst version in, say, Cantabile, I don't get this bonus because Cantabile itself runs in a single thread.
Anyone know about this high level thread stuff? (And more importantly am I making any sense ?!! )
I seem to already have a solution, but I'm forever intrigued to know what's actually going on inside this whirring black box on my desk!
H
Some of you know that for the last couple of years I've been developing a 'church organ' synthesis model in Flowstone. Been working with FS64 most of this year and I keep telling myself I've nearly finished ... ! (Very few believe this round here )
I've arrived at the following : I now have a 'Voicer' (.exe), in which the various pipe-rank sounds are set up and adjusted, and a 'Player' (.exe) which consists of multiple 'pipe ranks' (= organ stops). Ranks can be loaded from the library files (my own format) that are produced by the Voicer. All working well.
My 'rank' generator comprises 3 poly waveform players + 2 envelope generators + a noise generator, and various other bits & pieces. In the arrangement I've devised I can quickly copy & paste as many ranks as I wish into a Player module.
The ASIO sound card I generally use is 'multi-client', meaning it can run several ASIO .exe progs at the same time (most cards can't do this), so an actual physical organ would potentially consist of several of my Players running together. On a big organ maybe 2 or 3 Players would be needed for each organ keyboard/pedaboard. Say 5 Players for a modest 2 manual organ.
So far so good. In recent tests Players have been loaded with 8 or 9 ranks, and in tests on my i7 PC I've been able to run 7 or 8 such Players simultaneously, that's 60 organ stops, maybe 70+ organ stops. Result - Yay!
However if I a) were to try and put 60 ranks into a single Player (no chance!), or b) if I try and go down the more obvious VST route, I can't get anything remotely like this capacity. What's going on?
The word 'threads' keeps coming up when I research this. Does anyone have some pro insight? I have very little idea of what 'thread' even means!
I get the impression that FS normally runs in a single CPU thread, and that, hence, if I run multiple instances of an exported .exe they each run in different threads, which would explain my rather surprising extra capacity. Is that right? Whereas - I'm assuming - if I run them as a vst version in, say, Cantabile, I don't get this bonus because Cantabile itself runs in a single thread.
Anyone know about this high level thread stuff? (And more importantly am I making any sense ?!! )
I seem to already have a solution, but I'm forever intrigued to know what's actually going on inside this whirring black box on my desk!
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: CPU threads
A thread is basically just a chunk of processing given to the operating system to execute. The operating system can then decide how to share the available processing time and CPU cores between all of the current threads.
Your analysis is spot on, as far as I can tell. FlowStone's audio processing is indeed single-threaded, though it does use separate threads for the MIDI, Ruby, and GUI processing parts. And, as you say, multiple instances of an .exe will each have their own separate threads, allowing them to potentially be processed in parallel.
The situation with VST hosts is a little more complex, as they can work in different ways. I don't know Cantabile, but it's certainly possible that it's single-threaded. There are also hosts which will use a single thread per-track to spread the processing more widely across CPU cores. Things which are arranged in series, like a chain of FX on the same track, will generally share a thread, as in principle they can't be processed in parallel - each has to wait for the previous one in the chain to finish.
Your analysis is spot on, as far as I can tell. FlowStone's audio processing is indeed single-threaded, though it does use separate threads for the MIDI, Ruby, and GUI processing parts. And, as you say, multiple instances of an .exe will each have their own separate threads, allowing them to potentially be processed in parallel.
The situation with VST hosts is a little more complex, as they can work in different ways. I don't know Cantabile, but it's certainly possible that it's single-threaded. There are also hosts which will use a single thread per-track to spread the processing more widely across CPU cores. Things which are arranged in series, like a chain of FX on the same track, will generally share a thread, as in principle they can't be processed in parallel - each has to wait for the previous one in the chain to finish.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: CPU threads
Thanks Trog, that gives me great confidence.
I'm pretty happy with my multiple .exe solution, although it will necessitate an upmarket audio interface such as RME or Marian, which support multi-client ASIO.
It was only by luck that I've been using a Miditech Audiolink 24/96 (no longer in production unfortunately) which happens to have a multi-client driver, designed by Ploytec ( https://www.ploytec.com/ ) - a rather clever guy named Markus Medau. It wasn't until I switched to a Steinberg box that I realised multi-client wasn't the norm! (Btw I read that on a Mac, multiple audio app support is never an issue in the first place, and neither is multi interface support - dang ...)
It still amazes me that when pressing an armfull of notes my PC is happy to simultaneously run in excess of 3000 oscillators & 2000 envelope generators without flinching!
Hoping to put together a complete physical organ soon. Until quite recently I imagined this might need more than one PC (ouch..!) but after endless refining and optimisation I seem to have cracked it now
H
I'm pretty happy with my multiple .exe solution, although it will necessitate an upmarket audio interface such as RME or Marian, which support multi-client ASIO.
It was only by luck that I've been using a Miditech Audiolink 24/96 (no longer in production unfortunately) which happens to have a multi-client driver, designed by Ploytec ( https://www.ploytec.com/ ) - a rather clever guy named Markus Medau. It wasn't until I switched to a Steinberg box that I realised multi-client wasn't the norm! (Btw I read that on a Mac, multiple audio app support is never an issue in the first place, and neither is multi interface support - dang ...)
It still amazes me that when pressing an armfull of notes my PC is happy to simultaneously run in excess of 3000 oscillators & 2000 envelope generators without flinching!
Hoping to put together a complete physical organ soon. Until quite recently I imagined this might need more than one PC (ouch..!) but after endless refining and optimisation I seem to have cracked it now
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: CPU threads
I’m really looking forward to seeing and hearing the finished project Hugh!
Just to re-cap and clarify for myself, is it thus the case that on an 8 core CPU you will be better off with 8 executables than 8 VSTi instances in a DAW (assuming you have a multi-client interface)?
Cheers
Spogg
Just to re-cap and clarify for myself, is it thus the case that on an 8 core CPU you will be better off with 8 executables than 8 VSTi instances in a DAW (assuming you have a multi-client interface)?
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: CPU threads
Spogg wrote:Just to re-cap and clarify for myself, is it thus the case that on an 8 core CPU you will be better off with 8 executables than 8 VSTi instances in a DAW (assuming you have a multi-client interface)?
No. IT just depends on how the DAW is constructed. Look for keywords like "sandboxed". In Reaper, for example, each plugin runs in its own independend thread. But there are quite some DAWs nowadays that do it as well. They just call it different, like the keyword I mentioned.
But there is also a difference between multi-threading and multi-processing. If the latter is given (again, Reaper is a good example for it) all cores of a CPU are used. Else only one core is used. But both solution can (and mostly will) be multi-threaded.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: CPU threads
Spogg wrote:Just to re-cap and clarify for myself, is it thus the case that on an 8 core CPU you will be better off with 8 executables than 8 VSTi instances in a DAW (assuming you have a multi-client interface)?
Certainly seemed to have proved that in my case, but as far as I understand it not because of the no. of cores, (which are of benefit to every scenario), but because individual executables will run in individual threads, of which I think there can be hundreds running on a cpu.
My case is unusual though, but it suits me because I have no requirement for any function that a DAW or a Vst-Host would normally provide, so I can avoid that overhead too. What I'll end up with is a single-purpose PC, and take note ... Reverb - unless I provide a reverb effect in each and every instance, which would seem a bit counter-productive, my only route will be to provide an external stand-alone unit*. But in organ-world I'm fine with that.
H
*(Unless anyone knows how to patch in between the oututs of executables and ASIO out? That sounds hard ...)
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: CPU threads
Just thinking out loud but maybe you could use a 2nd sound card.
Its input (hopefully digital) would take the stereo audio out from the organ and its output would be to the amplifier. Then you could patch a virtual reverb into the audio path of the 2nd sound card.
I’ve use Voicemeeter as a virtual ASIO mixer but I abandoned it due to high CPU and odd glitches in the routed sound. For my videos I use the motherboard sound chip to record me and the synth and that works pretty well, even though the signal goes through A to D and D to A conversions.
I once tried to use two USB audio interfaces (both Focusrite) but they wouldn’t play together. I’ve since read that you should always use different manufacturers’ products for 2 USB audio interfaces. Something to do with Windows and USB identification I think.
The other thing that came to mind is that the different organ divisions will generate slightly different ambient factors in a real pipe organ environment. It would interest me to know if that’s worth trying and if it added to the authenticity.
Cheers
Spogg
Its input (hopefully digital) would take the stereo audio out from the organ and its output would be to the amplifier. Then you could patch a virtual reverb into the audio path of the 2nd sound card.
I’ve use Voicemeeter as a virtual ASIO mixer but I abandoned it due to high CPU and odd glitches in the routed sound. For my videos I use the motherboard sound chip to record me and the synth and that works pretty well, even though the signal goes through A to D and D to A conversions.
I once tried to use two USB audio interfaces (both Focusrite) but they wouldn’t play together. I’ve since read that you should always use different manufacturers’ products for 2 USB audio interfaces. Something to do with Windows and USB identification I think.
The other thing that came to mind is that the different organ divisions will generate slightly different ambient factors in a real pipe organ environment. It would interest me to know if that’s worth trying and if it added to the authenticity.
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: CPU threads
Again, I wouldn't compare to the worst case scenario, but test with multi-processing and multi-threading software like Reaper, Reason or Ableton Live (if "Live" is an aspect that led you to choose cantabile). I'm pretty sure you'll get way better results than with Cantabile.
With Reaper, there's even another possible route: Reaper can outsource plugin processing to other PCs, by getting the processed stream back via network (via ReaMote). Because of the network buffering, the latency can become quite large, so not suited for live performances.
With Reaper, there's even another possible route: Reaper can outsource plugin processing to other PCs, by getting the processed stream back via network (via ReaMote). Because of the network buffering, the latency can become quite large, so not suited for live performances.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: CPU threads
Interesting, thanks for that tulamide.
I'm a fan of Reaper, have used it exclusively for recording in recent years .. but invariably with gaps of many months, so I usually have to learn it all over again
Yes, 'live' was my reason for checking out Cantabile (with my 'muso' hat on), I've used a similar vst-host called 'Forte' in the past on stage. Don't need to address this again just yet, but thanks for your wisdom.
Just on organ reverb again .. in my entire 'organ builder career' (I'm so-called retired now) I only added reverb units a handful of times, just in home installations. Churches and halls automatically take care of themselves, which is much better! Nothing sounds more stupid & inappropriate than an electronic organ featuring a cathedral-sized reverb in a modest sized room .
H
I'm a fan of Reaper, have used it exclusively for recording in recent years .. but invariably with gaps of many months, so I usually have to learn it all over again
Yes, 'live' was my reason for checking out Cantabile (with my 'muso' hat on), I've used a similar vst-host called 'Forte' in the past on stage. Don't need to address this again just yet, but thanks for your wisdom.
Just on organ reverb again .. in my entire 'organ builder career' (I'm so-called retired now) I only added reverb units a handful of times, just in home installations. Churches and halls automatically take care of themselves, which is much better! Nothing sounds more stupid & inappropriate than an electronic organ featuring a cathedral-sized reverb in a modest sized room .
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 85 guests