Delphi ASIO & VST sourceforge project
-
Christian Budde Christian Budde https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=25572
- KVRAF
- Topic Starter
- 1538 posts since 14 May, 2004 from Europe
Hi Daniel,
I look forward for your contribution. And if you need some help with DSP things don't hesistate to call me. The only thing is, that I'm a bit busy at the moment, so my answers may take some time.
Christian
I look forward for your contribution. And if you need some help with DSP things don't hesistate to call me. The only thing is, that I'm a bit busy at the moment, so my answers may take some time.
Christian
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
Daniel
A typical threading setup for audio/midi apps, as has been mentioned, often all GUI is on the 'main thread'. That is because many GUI systems are not thread-safe, including Delphi VCL and Mac Carbon GUI functions.
Even if someone writes a very simple host and doesn't explicitly create any threads except the main thread, the program's operation can still end up running several threads. On XP and Vista, it looks like a MultiMedia timer at least sometimes spawns a new thread, but it might not always do that on all Windows versions. And very often the soundcard driver will call into the host on the soundcard's thread(s).
So a simple audio/midi program that was just written with one simple main thread, could actually be 'unintentionally' running with three or more threads. The host code triggered by the multimedia timer, and host code triggered by the soundcard driver, can cause a lot of yer host code to be running multi-threaded even if you didn't design it thataway. I only mention that because folks should be aware of multithreading issues even if they didn't set out to write a multithreaded app (grin).
====
The plugin layout in a host is typically parallel arrays of series chains of plugins. For instance, there might be multiple audio tracks with one or more plugins series chained on each audio track, and also mutliple synthesizer plugins with optional audio plugins chained to the output of each synth.
When the soundcard asks the host for an audio buffer, the host must call all of those series chains in order, and then mix all the parallel outputs together, before it can satisfy the soundcard's buffer request. If the host doesn't satisfy the soundcard's request quick enough, you get a dropout or stutter, and a few 'bad attitude' soundcard drivers will bluescreen your computer if the host is excessively late returning from the soundcard's callback.
So there is plenty of opportunity to try to speed things up with multi-cpu processing, but it is very unlikely that any one plugin will get called re-entrantly.
Say you have an audio bass track going thru a compressor and chorus and EQ. A vocal track going thru a compressor and EQ. A synthesizer plugin going thru an EQ and flanger. An FX send submix driving a reverb plugin.
The bass track has to be processed by the compressor plugin before the bass track can be handed off to the chorus plugin, and it has to be processed by the chorus plugin before it can be passed to the EQ plugin. The signals from the other 'parallel' streams have to make similar series handoffs thru their plugin chains.
Then a submix of the FX send must be prepared from the effected tracks, and sent to that global reverb.
Finally after all that is done, the final mix including the FX return from the global reverb, can be completed and the finished buffer passed to the soundcard.
So the host has to wait on each plugin in each series chain, before it can send the audio to the next plugin in each series chain. So it is very unlikely the host will be sending new audio to a plugin while the host is waiting for that plugin to render previous audio sent to the plugin.
One way to use multi-cores would be to process different sets of series chains on different cores. But it would sitll be non-reentrant series calls.
A typical threading setup for audio/midi apps, as has been mentioned, often all GUI is on the 'main thread'. That is because many GUI systems are not thread-safe, including Delphi VCL and Mac Carbon GUI functions.
Even if someone writes a very simple host and doesn't explicitly create any threads except the main thread, the program's operation can still end up running several threads. On XP and Vista, it looks like a MultiMedia timer at least sometimes spawns a new thread, but it might not always do that on all Windows versions. And very often the soundcard driver will call into the host on the soundcard's thread(s).
So a simple audio/midi program that was just written with one simple main thread, could actually be 'unintentionally' running with three or more threads. The host code triggered by the multimedia timer, and host code triggered by the soundcard driver, can cause a lot of yer host code to be running multi-threaded even if you didn't design it thataway. I only mention that because folks should be aware of multithreading issues even if they didn't set out to write a multithreaded app (grin).
====
The plugin layout in a host is typically parallel arrays of series chains of plugins. For instance, there might be multiple audio tracks with one or more plugins series chained on each audio track, and also mutliple synthesizer plugins with optional audio plugins chained to the output of each synth.
When the soundcard asks the host for an audio buffer, the host must call all of those series chains in order, and then mix all the parallel outputs together, before it can satisfy the soundcard's buffer request. If the host doesn't satisfy the soundcard's request quick enough, you get a dropout or stutter, and a few 'bad attitude' soundcard drivers will bluescreen your computer if the host is excessively late returning from the soundcard's callback.
So there is plenty of opportunity to try to speed things up with multi-cpu processing, but it is very unlikely that any one plugin will get called re-entrantly.
Say you have an audio bass track going thru a compressor and chorus and EQ. A vocal track going thru a compressor and EQ. A synthesizer plugin going thru an EQ and flanger. An FX send submix driving a reverb plugin.
The bass track has to be processed by the compressor plugin before the bass track can be handed off to the chorus plugin, and it has to be processed by the chorus plugin before it can be passed to the EQ plugin. The signals from the other 'parallel' streams have to make similar series handoffs thru their plugin chains.
Then a submix of the FX send must be prepared from the effected tracks, and sent to that global reverb.
Finally after all that is done, the final mix including the FX return from the global reverb, can be completed and the finished buffer passed to the soundcard.
So the host has to wait on each plugin in each series chain, before it can send the audio to the next plugin in each series chain. So it is very unlikely the host will be sending new audio to a plugin while the host is waiting for that plugin to render previous audio sent to the plugin.
One way to use multi-cores would be to process different sets of series chains on different cores. But it would sitll be non-reentrant series calls.
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Hello,
when I use Steinberg's Hyphersonic 2 with MiniHostCore,
I have repeatedly hanging notes (often). I have not noticed
this, with other plugins.
Has anybody an idea, what I can change in MiniHostCore?
with best regards
Norbert
when I use Steinberg's Hyphersonic 2 with MiniHostCore,
I have repeatedly hanging notes (often). I have not noticed
this, with other plugins.
Has anybody an idea, what I can change in MiniHostCore?
with best regards
Norbert
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Sorry, I must correct it. I have today the new version tested with B4. The same problem here, too.Norbert Stellberg wrote: when I use Steinberg's Hyphersonic 2 with MiniHostCore,
I have repeatedly hanging notes (often). I have not noticed
this, with other plugins.
Any ideas ?
with best regards
Norbert
-
Christian Budde Christian Budde https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=25572
- KVRAF
- Topic Starter
- 1538 posts since 14 May, 2004 from Europe
Sorry the interna of the minihost was always Tobybear's business. I just adapted it to make it part of the open source project. So either see for yourself or ask Tobybear, since my time is very limited (as always).
Christian
Christian
-
Christian Budde Christian Budde https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=25572
- KVRAF
- Topic Starter
- 1538 posts since 14 May, 2004 from Europe
I just set up a mailing list for news about the development. This is probably necessary since there are right now 2 active developers working on that project.
The list will be active in about 6-24 hours. If someone is interested in the development and like to have some news about the roadmap, feel free to join the list.
Christian
The list will be active in about 6-24 hours. If someone is interested in the development and like to have some news about the roadmap, feel free to join the list.
Christian
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Hello developers 
a little bug in
library VSTPascalScript;
Please don't set the path to direct. Never has the code in C:\Code 
with best regards
Norbert
a little bug in
library VSTPascalScript;
Code: Select all
uses
Forms,
DVSTEffect,
DVSTModule,
PSDM in 'C:\Code\VSTPack\Examples\Plugins\PascalScript\PSDM.pas' {PascalScriptDataModule: TVSTModule},
PSGUI in 'C:\Code\VSTPack\Examples\Plugins\PascalScript\PSGUI.pas' {FmPascalScript};
with best regards
Norbert
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Hi,
sorry, I am again.
Any other bugs:
In any programs btw. plugins the variable
is unknown.
This is in
fReeverbModule,
ASIOVSTModule,
DecimatorModule,
DitherNoiseshaperDM................. aso
This file is missing:
uPSRuntime.pas
.
.
and a lot of messages while compiling.
with best regards
Norbert
sorry, I am again.
Any other bugs:
In any programs btw. plugins the variable
Code: Select all
outputs: TArrayOfSingleDynArray; sampleframes: Integer);
This is in
fReeverbModule,
ASIOVSTModule,
DecimatorModule,
DitherNoiseshaperDM................. aso
This file is missing:
uPSRuntime.pas
.
.
and a lot of messages while compiling.
with best regards
Norbert
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Hi Duncan,duncanparsons wrote: Been meaning to mail you Norbert - will do shortly. I've had all sorts of work related issues!
DSP
nice to hear from you
Has you the plugin Steinberg Hyphersonc availabel ?
If it is, please can you check, does this plugin work whith MiniHost Core ?
Or is an other user here, who can check this ?
Thanks a lot.
with best regards
Norbert
-
Norbert Stellberg Norbert Stellberg https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=37198
- KVRist
- 78 posts since 16 Aug, 2004
Hello,
following problems:
1. I cannot compile MiniHost Core:
here the compiler stops:
for i := 0 to length(ASIOHost.OutputChannelInfos) - 1 do
^^^^^^^^^^^^^^^^^^^^
I see, ASIOHost.OutputChannelInfos is now defined as
property OutputChannelInfos[index : Integer]
How I must set the index ???
2. MiniHost Core has in *.dfm an unknown entry
ExplicitTop = -3
I cannot compile with this entry. I think, it is a new entry
from a higher Delphi the 7
with best regards
Norbert
following problems:
1. I cannot compile MiniHost Core:
here the compiler stops:
for i := 0 to length(ASIOHost.OutputChannelInfos) - 1 do
^^^^^^^^^^^^^^^^^^^^
I see, ASIOHost.OutputChannelInfos is now defined as
property OutputChannelInfos[index : Integer]
How I must set the index ???
2. MiniHost Core has in *.dfm an unknown entry
ExplicitTop = -3
I cannot compile with this entry. I think, it is a new entry
from a higher Delphi the 7
with best regards
Norbert
-
- KVRist
- 186 posts since 16 May, 2004 from Norway
When processing MidiEvents in FLS, the host does not use DeltaFrames or any other timestamps in the TVstMidiEvent... Using other sequencers gives me DeltaFrames.
- There can be like 9600 samples or whatever to next ProcessReplacing, so making a VSTi time correct to MidiEvents in FLS is beyond me.
.....Help! What am I missing here?
- There can be like 9600 samples or whatever to next ProcessReplacing, so making a VSTi time correct to MidiEvents in FLS is beyond me.
.....Help! What am I missing here?
-
- KVRAF
- 1981 posts since 29 Feb, 2004
You are not missing anything ...TRN76 wrote:When processing MidiEvents in FLS, the host does not use DeltaFrames or any other timestamps in the TVstMidiEvent... Using other sequencers gives me DeltaFrames.
- There can be like 9600 samples or whatever to next ProcessReplacing, so making a VSTi time correct to MidiEvents in FLS is beyond me.![]()
.....Help! What am I missing here?
If a host does not supply DeltaFrames, then that is a bug in the host which *should* be fixed by the host developer(s)
So I am afraid you will have to get in contact with FL to supply a solution ...
EnergyXT has the same problem ...
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
...not an error in FL or in eXT. It's just the way they are coded...
The events that arrive are synced to the beginning of the process/replacing buffers, so the deltaframe is always zero. If you get loads of messages one sample apart, you'll get alot of calls to process/replacing only one sample in length. This way they can provide sample accurate automation for both MIDI and VST.
If you set the 'fixed buffers' switch, you'll probably find you get deltaframes values>0
You need to be ready in your processing for highly variable length buffers
DSP
The events that arrive are synced to the beginning of the process/replacing buffers, so the deltaframe is always zero. If you get loads of messages one sample apart, you'll get alot of calls to process/replacing only one sample in length. This way they can provide sample accurate automation for both MIDI and VST.
If you set the 'fixed buffers' switch, you'll probably find you get deltaframes values>0
You need to be ready in your processing for highly variable length buffers
DSP


