VST3 in Delphi

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Vokbuz wrote: Thu Mar 21, 2019 10:09 am OT: Russian programmers more likely to say "говнокод". Bad code is a very polite translation. No offence. :)

Well, this is also an option, mostly young programmers uses. Those who are now around 50 years and older do not use the word "говнокод" :D

Post

Eduur wrote: Thu Mar 21, 2019 6:03 am I don't get the errors you get, in fact everything compiles cleanly. What version are you using?
Hi Eduur!
I mainly use Delphi XE8. But I also have the latest Delphi 10.3.
Checked your code on Delphi XE8. But now I'm busy, so I can check your plugins any time soon on Delphi 10.3.
Eduur wrote: Thu Mar 21, 2019 6:03 am On AnsiStrings/string. String is the default preferred way of working with strings in Delphi.
I am comparing with C source code (ftypes.h), where types are defined like this:

Code: Select all

    uchar   = AnsiChar;
    char8   = AnsiChar;
    puchar   = ^uchar;
    pchar8   = ^char8;
    char16 = WideChar;
    pchar16 = PWideChar;
In Delphi XE - string = WideString
in older Delphi versions - string = AnsiString
Often faced with the problem of inoperability of plugins due to this circumstance.

Post

I would also like to implement this work in Lazarus/FPC. But I still haven’t found the working code of the plugins on Lazarus, because there is a unrecoverable bug when trying to make GUI form visible.

Post

nice! after a lengthy 'affair' with c++, i'm getting back to my favourite programming language, and will certainly have a look at this! (i'm using fpc in linux, though)

Post

tor.helge.skei wrote: Mon Apr 08, 2019 11:50 am nice! after a lengthy 'affair' with c++, i'm getting back to my favourite programming language, and will certainly have a look at this! (i'm using fpc in linux, though)
:tu:
Working in C++ and similar languages is in my opinion a peculiar fashion. I also dislike this tendency of C++ leadership in the audio programming world. After all, you must agree that Pascal is more beautiful than C++, it's like writing in Pascal is comparable to poetry, and in C++ you get prose.
The time has come to create serious cross-platform libraries for the Object Pascal (Delphi/Lazarus)!
I will promote this process in every way! :wink:

Post

All my stuff found at SynthFont.com is written in Delphi, always the latest Rad Studio. I have this VST instrument VSTSynthFont I might like to make a VST3 version.

Post

File missing: UVst3Utils
Kenneth

Post

And where is the procedure AssignString?
Kenneth

Post

This year's world Delphi conference was cancelled. One of the Delphi developers is sick, and the other doesn't want to go alone.

(this joke is 10 years old, at least) :P
Blog ------------- YouTube channel
Tricky-Loops wrote: (...)someone like Armin van Buuren who claims to make a track in half an hour and all his songs sound somewhat boring(...)

Post

krundt wrote: Tue Mar 10, 2020 2:28 pm And where is the procedure AssignString?
Kenneth
in uvst3utils. :wink: No idea how uvst3utils got missing, but i uploaded it again. If you're going to use this let me know and get in touch..

Post

I compiled your sample. I replaced all your output to CodeSite with Delphi's DebugOutput to get the output into DBWin32.
*Reaper* finds and loads your plugin, as expected. *Cakewalk* from Bandlab as well. **Cubase** doesn't find your plugin (odd). I do not get any output in DBWin32 indicating that it is even testing it to see what it is. *Cantabile* finds it, loads it, but crashes when opening the editor (last two outputs are CEditController.CreateView and CPlugView.Attached). *Mixcraft(9)* finds it but crashes when trying to use it (last output is  CPlugView.Attached, CPlugView.OnSize and then Access Violation at 0000000011a1acc9: 48 8b 04 c8 48 63 4d 2c 8b 55 24 89).
So, I would say 50% luck so far?
Any ideas?
(If you feel like it you can contact med directly at kenneth at synthfont dot com)
Kenneth
 

Post

Correction: for Cubase I had the file in the wrong folder. Adding the folder to Cubase's list of VST folders DID help just a bit. Cubase now sees the file but doesn't like it at all. It calls these two functions while analyzing (that is, after asking Cubase to update all VSTs): CPluginFactory.CountClasses and CPluginFactory.GetClassInfo:0. That's it. The file is not further inspected or accepted.
I have four other VST3 instruments registered by Cubase, so I know it must work.

Post

Hmm. that's a bit disappointing. But I think this is normal when writing wrapper code for several Hosts. Anyone interested in diving deeper?
(Or just wait for some genius to come up with a simple plugin open source platform, supported by all major DAWs...)

Post

Eduur wrote: Thu Mar 12, 2020 3:10 pm Hmm. that's a bit disappointing. But I think this is normal when writing wrapper code for several Hosts. Anyone interested in diving deeper?
(Or just wait for some genius to come up with a simple plugin open source platform, supported by all major DAWs...)
I'm thought about implementing a stable VST framework for Delphi, and this thought came - to port from C++ the IPlug2 framework. However, it is very huge work, which is not real without an infusion of finance, as according to approximate subjections can take half a year or even a year. :(

Post

I tried Free Pascal with VST 2, but it just wasn't fast enough in the end. No matter how much optimization I tried, it was always about 50% slower, on average, compared to the C++ code.

That said, I took whatever VST 2 SDK code I could find and stripped it down to a single file, going over it line by line with the original C++. My final code base is about 2/3 number of lines of code as C++, is much neater and tighter, and if I finished the Windows side of things, it would be much simpler to improve and maintain the single code base and cross-compile. I'll continue to futz with it, but until optimization is improved in the compiler, I don't think it's really useable, except if you are creating a cross-platform interface to contain hand-assembly or C processing routines for the heavy lifting.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post Reply

Return to “DSP and Plugin Development”