You just need to hope that Delphi version developer uses supports multiple inheritance at all.Mark Vera wrote:Interfaces are nothing to fear even in Delphi.
Don't know if anyone noticed... VST3
- KVRAF
- 4030 posts since 7 Sep, 2002
-
- KVRAF
- Topic Starter
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
nah, nor is it likely to. Object Pascal is designed not to. You can implement mulitple interfaces, and I've seen some idiots across the web claiming that that mean's you can do MI... errr.. nope!
To replicate multiple inheritance means doing it yourself, and doing merges of functionality, which isn't ideal. I can understand why Borland did it, it helps keep the TObject hierarchy clean, and avoids potentially nasty stuff in the compiler. FP doesn't support it either.
DSP
To replicate multiple inheritance means doing it yourself, and doing merges of functionality, which isn't ideal. I can understand why Borland did it, it helps keep the TObject hierarchy clean, and avoids potentially nasty stuff in the compiler. FP doesn't support it either.
DSP
-
- KVRist
- 176 posts since 22 Jul, 2005 from United Kingdom
That may all be true, but Interfaces remind me of my (and many other developers') fruitless attempts to get a DirectX plug-in working in Delphi... I mean, *something* must have caused it not to work, and it has always remained a mystery why, at least to me (and I think to a lot of other devs as well).Mark Vera wrote:Interfaces are nothing to fear even in Delphi. Personally I like interfaces, it's elegant, clean and easy way to extend without worrying about backwards compatibility problems. One of my favourites features in Delphi language is the super easy interface syntax.
Then I think:
1) DirectX is (a *lot* of) COM interfaces and stuff;
2) VST is (until 2.4) clean .dll work with a simple exported function;
3) DirectX didn't work under Delphi, for reasons unknown;
4) VST is a breeze under Delphi...
1+2+3+4 -> Stay away from COM interfaces!
At least, that's what my conclusion would be...
Do we *need* COM interfaces? Why not go the simple-exported-function-route, like VST did?
I know it is perfectly possible to work with COM interfaces in Delphi. But as long as nobody can explain to me why it didn't work for DirectX plug-ins, and as long as it's not clear to me that we actually need them, why go there? Why not use something tried and proven?
- KVRist
- 352 posts since 8 Jul, 2003
Thing with interfaces is that they are meant to be abstract interfaces. There's no problem with multiple inheritance there. Object implements the methods in the interfaces and the interface is just way to "query" subset of the object's methods in a cross-compatible way. One object can implement multiple interfaces. Sure in C++ one might do it so that one object implements one interface and then you multi-inherit one master object to be returned. In Delphi same is archived with one big object.
Basically the object pointer is then passed around and the IUnknown base implementation guarantees cross-compatibility and way for different languages to query the function tables/subsets (and that is interfaces) from the object. As long as the interface definition stays same, object can rearrange it's methods and change it's implementation anyway it wants - interface is still the same.
Same thing applies for implementing own interfaces. Plugin developers and host developers can easily extend their own objects and publish new interface definitions as each interface has unique GUID. It does not interfere the VST3 communication in anyway and host/plugin can just query if such extension interfaces exists.
In Delphi querying interfaces is dead easy with it's 'as' keyword. Much simpler than in C++. Right now all the function pointers and structures i.e. in VST2 are in away more harder to use than interfaces in Delphi. Especially as Delphi does the reference counting automatically. In C++ you need to call those add/remove reference methods yourself (or use the helper class provided in VST3SDK).
Biggest work no doubt for Delphi translation is writing the implementations of few basic interfaces for plugin which the VST3SDK already provides ready made. But that was the case with VST2 too.
Basically the object pointer is then passed around and the IUnknown base implementation guarantees cross-compatibility and way for different languages to query the function tables/subsets (and that is interfaces) from the object. As long as the interface definition stays same, object can rearrange it's methods and change it's implementation anyway it wants - interface is still the same.
Same thing applies for implementing own interfaces. Plugin developers and host developers can easily extend their own objects and publish new interface definitions as each interface has unique GUID. It does not interfere the VST3 communication in anyway and host/plugin can just query if such extension interfaces exists.
In Delphi querying interfaces is dead easy with it's 'as' keyword. Much simpler than in C++. Right now all the function pointers and structures i.e. in VST2 are in away more harder to use than interfaces in Delphi. Especially as Delphi does the reference counting automatically. In C++ you need to call those add/remove reference methods yourself (or use the helper class provided in VST3SDK).
Code: Select all
var
FVstHost: IHostApplication;
FVstHostExt: ICustomHostApplicationExtension;
FVstHost := (FComponentBase.getHostContext() as IHostApplication);
FVstHostExt := (FComponentBase.getHostContext() as ICustomHostApplicationExtension);
{ and then just call the host functions ie. FVstHost.getName(); }
jouni - www.markvera.net - Stardrive Studio - Orionology
- KVRist
- 352 posts since 8 Jul, 2003
I have no idea what the DX plugin stuff do what would make things break. Never tried DX plugins with Delphi. Last time I checked the DX plugin documentation I couldn't believe how messy thing they had done. Clearly over-engineered. However the Microsoft Direct3D interfaces work fine as long you have the header files of the interfaces.heeb wrote: That may all be true, but Interfaces remind me of my (and many other developers') fruitless attempts to get a DirectX plug-in working in Delphi... I mean, *something* must have caused it not to work, and it has always remained a mystery why, at least to me (and I think to a lot of other devs as well).
But as long as nobody can explain to me why it didn't work for DirectX plug-ins, and as long as it's not clear to me that we actually need them, why go there? Why not use something tried and proven?
When I look the VST3SDK interfaces, they are very clearly laid. Nothing as horrible as the DX plugin documentation. Sure, few things could be done a bit better way to give bow for Delphi programmers too, but generally I see no problems there. As long as their FUnknown interface is proper.
jouni - www.markvera.net - Stardrive Studio - Orionology
-
- KVRist
- 257 posts since 20 Mar, 2006
-
- KVRian
- 975 posts since 31 Jan, 2005
That video was far more awful then that with the girls and the cup.
-
- KVRian
- 770 posts since 2 Apr, 2003
Oh great, punters see that sort of thing and we're screwed.OverDose wrote:WNAMM08: Steinberg VST3 Explained (Video)
http://www.sonicstate.com/news/shownews.cfm?newsid=6044
I can't believe he could stand there with a straight face and talk about better specification and documentation!
"Our third party partners are really happy to get this next step of VST technology"
And then he gets people expecting ports from March.
Shame there weren't any developers around to shout a shorus of "BOLLOCKS!"
-
- KVRAF
- Topic Starter
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
No, but we can post comments to the new item, and anywhere it is referred to...JonHodgson wrote:Oh great, punters see that sort of thing and we're screwed.OverDose wrote:WNAMM08: Steinberg VST3 Explained (Video)
http://www.sonicstate.com/news/shownews.cfm?newsid=6044
I can't believe he could stand there with a straight face and talk about better specification and documentation!
"Our third party partners are really happy to get this next step of VST technology"
And then he gets people expecting ports from March.
Shame there weren't any developers around to shout a shorus of "BOLLOCKS!"
DSP
-
- KVRAF
- Topic Starter
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
- KVRAF
- 2187 posts since 25 Jan, 2007 from the back room, away from his wife's sight (or so he thinks)
wow, that's hilarious.
Cakewalk by Bandlab / FL Studio
Squire Stratocaster / Chapman ML3 Modern V2 / Fender Precision Bass
Formerly known as arke, VladimirDimitrievich, bslf, and ctmg. Yep, those bans were deserved.
Squire Stratocaster / Chapman ML3 Modern V2 / Fender Precision Bass
Formerly known as arke, VladimirDimitrievich, bslf, and ctmg. Yep, those bans were deserved.
- KVRian
- 1010 posts since 6 Aug, 2005 from England
That guy's lucky I wasn't there.... to ask some questions.OverDose wrote:WNAMM08: Steinberg VST3 Explained (Video)
http://www.sonicstate.com/news/shownews.cfm?newsid=6044
Seriously though, what else is he going to say? He wouldn't be much of a salesman if he wasn't positive!
Dave Hoskins. http://www.quikquak.com
-
- KVRian
- 852 posts since 3 Aug, 2001 from Belgium
FL Studio will support VST3, if possible.Aleksey Vaneev wrote:It's more important to get support from FL Studio staff. It's obvious they are getting less money from each user than Steinberg or Cakewalk, but their userbase is huge. Host's userbase is much more important to independent plug-in developers than the amount of money host developer makes: users may share money with us while host developers won't.
I'm translating the sdk to Delphi as a side project at the moment, so it will take some time before I know if there will be any major stumbling blocks.
-
- KVRian
- 852 posts since 3 Aug, 2001 from Belgium
The thing I hate about interfaces in Delphi is that Delphi takes care of AddRef and Release. I'd much rather call these myself, so I know exactly what's going on.Mark Vera wrote:Interfaces are nothing to fear even in Delphi. Personally I like interfaces, it's elegant, clean and easy way to extend without worrying about backwards compatibility problems. One of my favourites features in Delphi language is the super easy interface syntax.
For DX support I had a lot of problems with this (all worked out in the end though). For VST3 I expect the same kind of problems. Nothing fatal, but annoying bugs.



