Recent

Author Topic: Compiling a .dll  (Read 68595 times)

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Compiling a .dll
« Reply #60 on: January 06, 2018, 11:08:56 am »
I saw that instead of *.dpr (like Delphi) or *.lpr  it saves the "library VSTPlugin1;"  as *.ppr
It shouldn't save ppr if you have changed source as mentioned and rebuilt IDE. Did you rebuild IDE?

Now it works, creating a new VST Plugin project.
It can not magically start working on it's own. What did you do? Did you rebuild IDE or did something else? It is important for me to get proper feedback to know what to add to ct2laz CSV file, and if proposed patch was enough or not.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #61 on: January 06, 2018, 05:13:02 pm »
Okay, now I have three versions of a working plugin.
- ASIO VST 1.0 in Delphi 5
- ASIO VST 1.0 in Lazarus
- ASIO VST 1.3 in Lazarus (pl_ASIOVST)

But things are difficult. In Samplitude Music Studio 2014 32 Bit only the Delphi 5 version works.
In Samplitude Music Studio 2014 64 Bit all three plugins do appear, two do work.
« Last Edit: January 06, 2018, 05:34:55 pm by PeterX »
usually using latest Lazarus release version with Windows 10

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #62 on: January 06, 2018, 05:18:47 pm »
Did you rebuild IDE?
Yes. Everything's okay now. You only need to change this *.ppr to *.lpr in ct2laz.
As I'm working on code in pl_ASIOVST, the package and Lazarus needs rebuilds.


But the code in the template "VST Plugin" ist wrong, at 130:
Code: Pascal  [Select][+][-]
  1.     + 'begin' + le
  2.     + '  Application.Title:=''VST Plugin'';' + le
  3.     + '  Application.CreateForm(TVSTModule1, VSTModule1);' + le
  4.     + '  Application.Run;' + le
  5.     + 'end.';

This is correct:
Code: Pascal  [Select][+][-]
  1. begin
  2.   Application.Initialize;
  3. end.
  4.  
« Last Edit: January 06, 2018, 05:36:44 pm by PeterX »
usually using latest Lazarus release version with Windows 10

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #63 on: January 06, 2018, 05:22:03 pm »
It can not magically start working on it's own. What did you do?
I have the "VST Plugin Analyser.exe" as host.
And Magix Samplitude, and Audacity, and ... for testing.
« Last Edit: January 06, 2018, 05:37:39 pm by PeterX »
usually using latest Lazarus release version with Windows 10

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Compiling a .dll
« Reply #64 on: January 06, 2018, 08:43:05 pm »
Did you rebuild IDE?
Yes. Everything's okay now. You only need to change this *.ppr to *.lpr in ct2laz.
As I'm working on code in pl_ASIOVST, the package and Lazarus needs rebuilds.
I am glad this is clear now so I can add this new rule to CSV file of ct2laz.

But things are difficult. In Samplitude Music Studio 2014 32 Bit only the Delphi 5 version works.
In Samplitude Music Studio 2014 64 Bit all three plugins do appear, two do work.
Well, I do not know if anyone else on Lazarus is familiar with VST plugins. I guess that situation will be better once pl_ASIOVST becomes available from OPM. Until then, your best chance is to report any problem in PilotLogic forum. However, they will surely not support pl_ASIOVST in Lazarus, so you will have to download latest CodeTyphon and try to see if the problems are the same, and if they are report problems to PilotLogic forum. Sometimes you wait forever for a fix, and sometime they are pretty fast like here:
http://www.pilotlogic.com/sitejoom/index.php/forum/audio-and-video-development/3457-the-asio-hosts-both-make-the-ide-crash-immediately
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #65 on: January 06, 2018, 09:19:41 pm »
avra,

thanks very much for Your help - I have a working translation to lazarus now from the latest 1.3 ASIO-VST. That's great !

As soon as I am sure this works stable, I would like to share the Plugin Example code
to complete the pl_ASIOVST package. Also some of the GUI object test projects
of pl_ASIOVST package  do crash on runtime. Crashing examples are no good examples ..

I guess that situation will be better once pl_ASIOVST becomes available from OPM.
What's OPM ?  Online Package Manager ?
« Last Edit: January 06, 2018, 09:24:17 pm by PeterX »
usually using latest Lazarus release version with Windows 10

balazsszekely

  • Guest
Re: Compiling a .dll
« Reply #66 on: January 06, 2018, 09:27:13 pm »
Quote
@PeterX
What's OPM ?  Online Package Manager ?
Yes. ASIOVST is available since last summer in OPM.

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #67 on: January 06, 2018, 11:24:08 pm »
Quote
@PeterX
What's OPM ?  Online Package Manager ?
Yes. ASIOVST is available since last summer in OPM.
Sorry, I heard from the "Online Package Manager" the first time ever.
Will this be integrated into the "Install / deinstall Packages" dialog of Laz IDE one day ?

(just found this thread.. )
http://forum.lazarus-ide.org/index.php/topic,34297.1095.html?PHPSESSID=3rket2na8tockjq4svkjl6q1i1
usually using latest Lazarus release version with Windows 10

balazsszekely

  • Guest
Re: Compiling a .dll
« Reply #68 on: January 07, 2018, 07:25:11 am »
Quote
@PeterX
Will this be integrated into the "Install / deinstall Packages" dialog of Laz IDE one day ?
It's already integrated, just not installed by default. For more info, please read this: http://wiki.freepascal.org/Online_Package_Manager

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #69 on: January 07, 2018, 02:42:43 pm »
It's already integrated, just not installed by default. For more info, please read this: http://wiki.freepascal.org/Online_Package_Manager
Okay, now I know more  :)

I found ASIO-VST on http://packages.lazarus-ide.org/

But there it does not contain the "samples" folder.
And also no example project for a plugin.
And also the "VST Plugin" project invented with the package fails.

As this comes from PilotLogic, I expect there's nobody maintaning the package here for Lazarus ?
How can I contribute changes to the package ?
usually using latest Lazarus release version with Windows 10

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Compiling a .dll
« Reply #70 on: January 07, 2018, 02:56:22 pm »
I found ASIO-VST on http://packages.lazarus-ide.org/
But there it does not contain the "samples" folder.
It will be fixed once pl_ASIOVST is established in new ct4laz repo and OPM starts using that version.

Quote
And also the "VST Plugin" project invented with the package fails.
As this comes from PilotLogic, I expect there's nobody maintaning the package here for Lazarus ?
How can I contribute changes to the package ?
Already explained:
...your best chance is to report any problem in PilotLogic forum. However, they will surely not support pl_ASIOVST in Lazarus, so you will have to download latest CodeTyphon and try to see if the problems are the same, and if they are report problems to PilotLogic forum. Sometimes you wait forever for a fix, and sometime they are pretty fast like here:
http://www.pilotlogic.com/sitejoom/index.php/forum/audio-and-video-development/3457-the-asio-hosts-both-make-the-ide-crash-immediately
« Last Edit: January 07, 2018, 02:57:56 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #71 on: January 10, 2018, 12:12:40 am »
...your best chance is to report any problem in PilotLogic forum. ..
Okay, I'll go that way.

I still have some trouble opening the VST plugin in my software.
Reasons not clear, might be alignment problems due to wrong compiler switches.
And in some function declarations "const" is used instead of "by reference" declarations ..
Needs some testing ..

I will create an account there, tomorrow ..
« Last Edit: January 10, 2018, 11:47:51 am by PeterX »
usually using latest Lazarus release version with Windows 10

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Compiling a .dll
« Reply #72 on: January 11, 2018, 10:46:42 pm »
I still have some trouble opening the VST plugin in my software.
Reasons not clear, might be alignment problems due to wrong compiler switches.

VST Plugins loaded in C-style hosts seem to crash, compiled with debug switches on,
especially {$RANGECHECKS ON}, in my case here ..
Now with some debug switches off .. all my three derivates of the example project do compile, and run (!).
usually using latest Lazarus release version with Windows 10

 

TinyPortal © 2005-2018