Delphi ASIO & VST sourceforge project

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi,

I'm now using Delphi 2009 and downloaded the latest source from the Subversion repository. I see there's now a D12 set of projects but I had a lot of difficulty getting things to compile, and when I did my first test plugin crashed in VST hosts so I think there's some stuff (I'm guessing unicode issues) still to iron out. Before I wade in trying to pinpoint the problems I just wanted to check whether other people already had it working in D2009 successfully in which case I may be missing something.

Many thanks.

Post

Hi Chrispy
Chrispy wrote:I'm now using Delphi 2009 and downloaded the latest source from the Subversion repository. I see there's now a D12 set of projects but I had a lot of difficulty getting things to compile, and when I did my first test plugin crashed in VST hosts so I think there's some stuff (I'm guessing unicode issues) still to iron out. Before I wade in trying to pinpoint the problems I just wanted to check whether other people already had it working in D2009 successfully in which case I may be missing something.
I built the D12 package based on the D11 packages. It might not be up-to-date though. The reason is, that I don't have D2009. I got some reports about things necessary to get it running. I changed some of the issues, but there still might remain some of the point (I didn't like the suggested workarounds, which meant a drawback for other Delphi version).

If you have any suggestions, just let me know,

Christian

Post

Christian Budde wrote:Hi Chrispy
If you have any suggestions, just let me know,
Christian
This page seems to have a good description of the things to look out for with the unicode conversion:

http://www.micro-isv.asia/2008/08/get-r ... d-unicode/

I went through the main units such as DAV_VSTEffect.pas and changed any Char arrays to AnsiChar, such as:

TVstParameterPropertyRecord = packed record
...
Caption: array[0..63] of {$IFDEF UNICODE} AnsiChar {$ELSE} Char {$ENDIF};
...

Likewise I changed PChar's to PAnsiChar's. Then in units like DAV_VSTCustomModule.pas I changed code such as:

FEffect.uniqueID[4 - i] := {$IFDEF UNICODE} AnsiChar(Value) {$ELSE} Value {$ENDIF}

And... now plugins are working in my host. However, whether I've found everything remains to be seen.

Thinking about it, there's not really any need to use the $IFDEF's for a lot (all?) of these - I'm thinking it would be safe to change "Char" to "AnsiChar" in the code (i.e. being explicit about the type rather than relying on Delphi's alias) and it would compile on D2009 and pre-D2009. So maybe that's the way to go; make all Char's explicitly AnsiChar where necessary (i.e. where there's no benefit from unicode), likewise for PChar->PAnsiChar and string -> AnsiString.

Post

Chrispy wrote:So maybe that's the way to go; make all Char's explicitly AnsiChar where necessary (i.e. where there's no benefit from unicode), likewise for PChar->PAnsiChar and string -> AnsiString.
I did so and it should now hopefully compile out of the box.

Kind regards,

Christian

Post

Hello,
I use the newest source from repository with Delphi 7

Now I will made any tests with WINE.
But not a program of all samples does find an ASIO driver.
Asio drivers are installed. Other programs does find this drivers.
Has here anybody an idee, why I cannot see an ASIO driver?

with best regards
Norbert

Post

Christian, Guys,

I'm having a difficult time figuring out how exactly chunk exchanging with the host is handled in this setup. I see there's a TMemoryStream called "chunk" declared. What am I supposed to do with it? Simply open it and write to it? Do I also need to manage the accompanying chunk descriptor record manually or is that done automatically?

Cheers,
Bram

Post

brambos wrote:I'm having a difficult time figuring out how exactly chunk exchanging with the host is handled in this setup. I see there's a TMemoryStream called "chunk" declared. What am I supposed to do with it? Simply open it and write to it? Do I also need to manage the accompanying chunk descriptor record manually or is that done automatically?
The chunk handling is indeed not very clearly defined. There are some examples that make use of storing the parameters within a chunk, but I can't say which one exactly (I know the plugin merger template uses this, but beside I can't remember).

However, from the VST interface point of view it's nothing more than a pointer to a memory and the size of that 'chunk'. It's your job to interprete this chunk to parameters and your job to form the parameters to a chunk when it comes to saving.

For handling the chunks I introduced the two events 'OnBeforeProgramChange' and 'OnAfterProgramChange'. It's still a lot of work here to make it more smooth and 'integrated'.

Also note 'OnGetChunkParameter', which is used to interprete the parameter from a chunk. It queries the parameter value by an index. Use the ParameterChange to store the parameter values back into your chunk.

I am still working on another important project, but as soon as I have some spare time I'll definitely have a look into this as it is necessary for some other plugins (e.g. the convolution stuff I recently added).

Kind regards,

Christian

Post

Hi,

tomorrow morning I got the idea of having a dedicated forum for the Delphi ASIO & VST stuff here at KVR. Since there is no manual or help file, this might be a good thing to store some information.

Any thoughts?

Kind regards,

Christian

PS: If there are about five or more persons interested in this, I'll ask Ben for it.

Post

I think it would be good. Other than STK (which it incorporates!), it's probably the most wide ranging DSP archive around; and being pascal is still very readable to all.

Also, it would free this thread from being a catch all for any kind of DAV questions :)

DSP
Image

Post

Thanks for reacting, Christian.
Christian Budde wrote:The chunk handling is indeed not very clearly defined. There are some examples that make use of storing the parameters within a chunk, but I can't say which one exactly (I know the plugin merger template uses this, but beside I can't remember).
I'll have a look at those. Good to know there's a working example around. That should give me enough pointers (sic) to figure it out.
Christian Budde wrote:However, from the VST interface point of view it's nothing more than a pointer to a memory and the size of that 'chunk'. It's your job to interprete this chunk to parameters and your job to form the parameters to a chunk when it comes to saving.
I'm aware of that, since I've had to handle those chunks in Tunafish. Hence I was expecting a pointer variable of sorts in the OnGetChunkParameter declaration but there wasn't. I stumbled on some chunk related objects here and there, but I couldn't quite figure out if they were also created/initialized and whether I was supposed to mess with them at all or to leave them alone.

Cheers!

Post

Hi Brambos,

I added an example to the SVN repository of how it should work. Unfortunatly it doesn't work that good. It might also be the host I was trying (a modified version of my VST Plugin Analyser), but I'm not sure.

At least you can have a look. The name is 'Chunk Demo' and you can find it under examples. The effect itself is a chaos product of a crossover filters, a pitchshifter, a compressor and a bunch of filters...

Kind regards,

Christian

Post

Christian Budde wrote:Hi Brambos,

I added an example to the SVN repository of how it should work. Unfortunatly it doesn't work that good. It might also be the host I was trying (a modified version of my VST Plugin Analyser), but I'm not sure.

At least you can have a look. The name is 'Chunk Demo' and you can find it under examples. The effect itself is a chaos product of a crossover filters, a pitchshifter, a compressor and a bunch of filters...

Youz da man!

8)

Post

brambos wrote:
Christian Budde wrote:Hi Brambos,

I added an example to the SVN repository of how it should work. Unfortunatly it doesn't work that good. It might also be the host I was trying (a modified version of my VST Plugin Analyser), but I'm not sure.

At least you can have a look. The name is 'Chunk Demo' and you can find it under examples. The effect itself is a chaos product of a crossover filters, a pitchshifter, a compressor and a bunch of filters...

Youz da man!
Let me know if it is working. Or what is still necessary to get it working. And if you have better ideas on how to implement this, just let le know,

Christian

Post

Christian Budde wrote:
brambos wrote:Youz da man!
Let me know if it is working. Or what is still necessary to get it working. And if you have better ideas on how to implement this, just let le know,
Will do. I just had a peek at the code and it makes much more sense now. I'll test and tweak this (with Cubase) to get it to work and let you know if/what needs to be changed.

Cheers!

Post

Hi Christian Budde,

Sorry, for my poor English...

Many thanks for your great DAV project for Delphi developers:-)
I know this, there is only your components in our small world which I've been learned more knowledge of ASIO, VST and DSP!

You're a hero as other(Tobybear, Duncan Parsons etc...) for me and my family!
Please, don't stop the WinAmp stuff!

Can you please add a Paypal button to donate unlimited money for DAV project on your private website page under Delphi title?

For you and all heros, I wish all the best!

Best regards,

Salih Sertkaya

Post Reply

Return to “DSP and Plugin Development”